Browse Source

change hardcoded indices to use the slice enum correctly

Natenom/support-murmur-13-1446181288462
Michael Ziegler 15 years ago
parent
commit
9c8b6a048f
  1. 14
      pyweb/mumble/MumbleCtlIce.py

14
pyweb/mumble/MumbleCtlIce.py

@ -300,11 +300,13 @@ class MumbleCtlIce_120(MumbleCtlIce_118):
return ret return ret
def registerPlayer(self, srvid, name, email, password): def registerPlayer(self, srvid, name, email, password):
# To get the real values of these ENUM entries, try
# Murmur.UserInfo.UserX.value
from Murmur import UserInfo from Murmur import UserInfo
user = { user = {
UserInfo(0): name.encode( "UTF-8" ),
UserInfo(1): email.encode( "UTF-8" ),
UserInfo(4): password.encode( "UTF-8" ),
UserInfo.UserName: name.encode( "UTF-8" ),
UserInfo.UserEmail: email.encode( "UTF-8" ),
UserInfo.UserPassword: password.encode( "UTF-8" ),
}; };
return self._getIceServerObject(srvid).registerUser( user ); return self._getIceServerObject(srvid).registerUser( user );
@ -317,9 +319,9 @@ class MumbleCtlIce_120(MumbleCtlIce_118):
def setRegistration(self, srvid, mumbleid, name, email, password): def setRegistration(self, srvid, mumbleid, name, email, password):
from Murmur import UserInfo from Murmur import UserInfo
user = { user = {
UserInfo(0): name.encode( "UTF-8" ),
UserInfo(1): email.encode( "UTF-8" ),
UserInfo(4): password.encode( "UTF-8" ),
UserInfo.UserName: name.encode( "UTF-8" ),
UserInfo.UserEmail: email.encode( "UTF-8" ),
UserInfo.UserPassword: password.encode( "UTF-8" ),
}; };
return self._getIceServerObject( srvid ).updateRegistration( mumbleid, user ) return self._getIceServerObject( srvid ).updateRegistration( mumbleid, user )

Loading…
Cancel
Save