Browse Source

thoughtless copypasta bound to go wrong - apart from that, it works. fixes #55

Natenom/support-murmur-13-1446181288462
Michael Ziegler 15 years ago
parent
commit
d9b461af68
  1. 8
      pyweb/mumble/models.py
  2. 2
      pyweb/mumble/views.py

8
pyweb/mumble/models.py

@ -231,7 +231,7 @@ class Mumble( models.Model ):
if not self.booted:
raise SystemError( "This murmur instance is not currently running, can't sync." );
players = self.ctl.getRegisteredPlayers(id);
players = self.ctl.getRegisteredPlayers(self.srvid);
for playerdata in players:
if playerdata[0] == 0: # Skip SuperUsers
@ -240,17 +240,17 @@ class Mumble( models.Model ):
print "Checking Player with id %d and name '%s'." % ( int(playerdata[0]), playerdata[1] );
try:
playerinstance = MumbleUser.objects.get( server=instance, mumbleid=playerdata[0] );
playerinstance = MumbleUser.objects.get( server=self, mumbleid=playerdata[0] );
except MumbleUser.DoesNotExist:
if verbose:
print 'Found new Player "%s".' % playerdata[1];
playerinstance = models.MumbleUser(
playerinstance = MumbleUser(
mumbleid = playerdata[0],
name = playerdata[1],
password = '',
server = instance,
server = self,
owner = None
);

2
pyweb/mumble/views.py

@ -201,7 +201,7 @@ def users( request, server ):
srv = get_object_or_404( Mumble, id=int(server) );
if "resync" in request.GET and request.GET['resync'] == "true":
if "resync" in request.POST and request.POST['resync'] == "true":
srv.readUsersFromMurmur();
if not srv.isUserAdmin( request.user ):

Loading…
Cancel
Save