def GM_login(): res=Buffer() res.write_ushort(1025) res.write_string(gm.id) res.write_string(gm.pwd) print 'GM_login_request:', gm.id, gm.pwd gm.ro.sendData(res.getValue())
def joinroom(self,roomid=-1, tableid=3): res=Buffer() res.write_ushort(1032) res.write_short(roomid) res.write_byte(tableid) res.write_string('') self.ro.sendData(res.getValue())
def login(self, u, p): self.id=u res=Buffer() res.write_ushort(1025) res.write_string(u) res.write_string(p) print 'login_request:', u, p self.ro.sendData(res.getValue())
def GM_register(u): res=Buffer() res.write_ushort(1024) res.write_string(u.id) res.write_string(u.pwd) res.write_string(u.nick) res.write_string(u.mail) res.write_short(u.sex) res.write_short(u.avata) print 'GM_register_request:' gm.ro.sendData(res.getValue())
def register(self): res=Buffer() res.write_ushort(1024) res.write_string(self.id) res.write_string(self.pwd) res.write_string(self.nick) res.write_string(self.mail) res.write_short(self.sex) res.write_short(self.avata) print 'register_request:', self.id, self.pwd self.ro.sendData(res.getValue())