Browse Source

add getConf method

Natenom/support-murmur-13-1446181288462
Michael Ziegler 15 years ago
parent
commit
60d192fc96
  1. 6
      pyweb/mumble/MumbleCtlDbus.py
  2. 11
      pyweb/mumble/MumbleCtlIce.py
  3. 3
      pyweb/mumble/mctl.py

6
pyweb/mumble/MumbleCtlDbus.py

@ -69,6 +69,12 @@ class MumbleCtlDbus_118(MumbleCtlBase):
info[str(key)] = conf[key]; info[str(key)] = conf[key];
return info; return info;
def getConf(self, srvid, key, value):
if key == "username":
key = "playername";
return self.meta.getConf(dbus.Int32( srvid ), key)
def setConf(self, srvid, key, value): def setConf(self, srvid, key, value):
if key == "username": if key == "username":
key = "playername"; key = "playername";

11
pyweb/mumble/MumbleCtlIce.py

@ -201,6 +201,13 @@ class MumbleCtlIce_118(MumbleCtlBase):
def setSuperUserPassword(self, srvid, value): def setSuperUserPassword(self, srvid, value):
self._getIceServerObject(srvid).setSuperuserPassword( value.encode( "UTF-8" ) ) self._getIceServerObject(srvid).setSuperuserPassword( value.encode( "UTF-8" ) )
@protectDjangoErrPage
def getConf(self, srvid, key):
if key == "username":
key = "playername";
return self._getIceServerObject(srvid).getConf( key )
@protectDjangoErrPage @protectDjangoErrPage
def setConf(self, srvid, key, value): def setConf(self, srvid, key, value):
if key == "username": if key == "username":
@ -408,6 +415,10 @@ class MumbleCtlIce_120(MumbleCtlIce_118):
return info; return info;
@protectDjangoErrPage
def getConf(self, srvid, key):
return self._getIceServerObject(srvid).getConf( key )
@protectDjangoErrPage @protectDjangoErrPage
def setConf(self, srvid, key, value): def setConf(self, srvid, key, value):
self._getIceServerObject(srvid).setConf( key, value.encode( "UTF-8" ) ) self._getIceServerObject(srvid).setConf( key, value.encode( "UTF-8" ) )

3
pyweb/mumble/mctl.py

@ -28,6 +28,9 @@ class MumbleCtlBase (object):
def getVersion( self ): def getVersion( self ):
raise NotImplementedError( "mctl::getVersion" ); raise NotImplementedError( "mctl::getVersion" );
def getConf(self, srvid, key):
raise NotImplementedError( "mctl::getConf" );
def setConf(self, srvid, key, value): def setConf(self, srvid, key, value):
raise NotImplementedError( "mctl::setConf" ); raise NotImplementedError( "mctl::setConf" );

Loading…
Cancel
Save