Browse Source

add getRegistration methods to the CTL classes as requested by esrms on IRC.

Natenom/support-murmur-13-1446181288462
Michael Ziegler 16 years ago
parent
commit
9ef3cd5029
  1. 7
      pyweb/mumble/MumbleCtlDbus.py
  2. 10
      pyweb/mumble/MumbleCtlIce.py

7
pyweb/mumble/MumbleCtlDbus.py

@ -102,6 +102,13 @@ class MumbleCtlDbus(MumbleCtlBase):
def setSuperUserPassword(self, srvid, value):
self.meta.setSuperUserPassword(dbus.Int32(srvid), value)
def getRegistration(self, srvid, mumbleid):
user = MumbleCtlDbus.converDbusTypeToNative(self._getDbusServerObject(srvid).getRegistration(dbus.Int32(mumbleid)))
return {
'name': user[1],
'email': user[2],
};
def setRegistration(self, srvid, mumbleid, name, email, password):
return MumbleCtlDbus.converDbusTypeToNative(self._getDbusServerObject(srvid).setRegistration(dbus.Int32(mumbleid), name, email, password))

10
pyweb/mumble/MumbleCtlIce.py

@ -150,6 +150,13 @@ class MumbleCtlIce_118(MumbleCtlBase):
def unregisterPlayer(self, srvid, mumbleid):
self._getIceServerObject(srvid).unregisterPlayer(mumbleid)
def getRegistration(self, srvid, mumbleid):
user = self._getIceServerObject(srvid).getRegistration(mumbleid)
return {
'name': user.name,
'email': user.email,
};
def setRegistration(self, srvid, mumbleid, name, email, password):
user = self._getIceServerObject(srvid).getRegistration(mumbleid)
user.name = name.encode( "UTF-8" )
@ -300,6 +307,9 @@ class MumbleCtlIce_120(MumbleCtlIce_118):
def unregisterPlayer(self, srvid, mumbleid):
self._getIceServerObject(srvid).unregisterUser(mumbleid)
def getRegistration(self, srvid, mumbleid):
return self._getIceServerObject( srvid ).getRegistration( mumbleid )
def setRegistration(self, srvid, mumbleid, name, email, password):
user = self._getIceServerObject( srvid ).getRegistration( mumbleid )
user['name'] = name.encode( "UTF-8" )

Loading…
Cancel
Save