|
|
@ -195,11 +195,8 @@ class Mumble( models.Model ): |
|
|
|
but to Murmur as well. |
|
|
|
""" |
|
|
|
if dontConfigureMurmur: |
|
|
|
# skip murmur configuration, e.g. because we're inserting models for existing servers. |
|
|
|
return models.Model.save( self ); |
|
|
|
|
|
|
|
# check if this server already exists, if not call newServer and set my srvid first |
|
|
|
|
|
|
|
if self.id is None: |
|
|
|
self.srvid = self.ctl.newServer(); |
|
|
|
|
|
|
@ -220,7 +217,6 @@ class Mumble( models.Model ): |
|
|
|
else: |
|
|
|
self.ctl.setConf( self.srvid, 'registerhostname', '' ); |
|
|
|
|
|
|
|
# Now allow django to save the record set |
|
|
|
return models.Model.save( self ); |
|
|
|
|
|
|
|
|
|
|
@ -454,7 +450,7 @@ class Mumble( models.Model ): |
|
|
|
else: |
|
|
|
return urlunsplit(( "mumble", self.netloc, "", versionstr, "" )) |
|
|
|
|
|
|
|
connecturl = property( getURL, doc=getURL.__doc__ ); |
|
|
|
connecturl = property( getURL ); |
|
|
|
|
|
|
|
version = property( lambda self: self.ctl.getVersion(), doc="The version of Murmur." ); |
|
|
|
|
|
|
@ -533,10 +529,8 @@ class MumbleUser( models.Model ): |
|
|
|
def save( self, dontConfigureMurmur=False ): |
|
|
|
""" Save the settings in this model to Murmur. """ |
|
|
|
if dontConfigureMurmur: |
|
|
|
# skip murmur configuration, e.g. because we're inserting models for existing players. |
|
|
|
return models.Model.save( self ); |
|
|
|
|
|
|
|
# Before the record set is saved, update Murmur via controller. |
|
|
|
ctl = self.server.ctl; |
|
|
|
|
|
|
|
if self.owner: |
|
|
@ -566,7 +560,6 @@ class MumbleUser( models.Model ): |
|
|
|
# Don't save the users' passwords, we don't need them anyway |
|
|
|
self.password = ''; |
|
|
|
|
|
|
|
# Now allow django to save the record set |
|
|
|
return models.Model.save( self ); |
|
|
|
|
|
|
|
def __init__( self, *args, **kwargs ): |
|
|
@ -602,7 +595,7 @@ class MumbleUser( models.Model ): |
|
|
|
self._registration = self.server.ctl.getRegistration( self.server.srvid, self.mumbleid ); |
|
|
|
return self._registration; |
|
|
|
|
|
|
|
registration = property( getRegistration, doc=getRegistration.__doc__ ); |
|
|
|
registration = property( getRegistration ); |
|
|
|
|
|
|
|
# Texture handlers |
|
|
|
def getTexture( self ): |
|
|
|