def login(self): #socksend('R1L15026765035e51f') msg = stringtree.grow('R', [ '1', stringtree.grow( 'L', [self.roomid, str(self.loginid), self.passHash, '']) ]) #print msg self.sock.socksend(msg)
def joinTable(self, index): self.sock.socksend(stringtree.grow('TJ', [str(index)]))
def setTable(self, settings): self.sock.socksend(stringtree.grow('Ts', [settings]))
def swap(self, tiles): print "swapping " + tiles self.sock.socksend(stringtree.grow('GC', [tiles + '']))
def playMove(self, encMove): print "playMove in qpAction" self.sock.socksend(stringtree.grow('GW', [encMove + '']))
def privateChat(self, alias, text, me=None): if not me: me = self.me self.sock.socksend( stringtree.grow( 'Cm', [stringtree.grow('u', [alias, me]), text + '50']))
def publicChat(self, text): self.sock.socksend(stringtree.grow('Cm', ['P', text + '50']))
def tableChat(self, text): self.sock.socksend(stringtree.grow('Cm', ['t', text + '50']))
def acceptUser(self, alias): print "***ACCEPTING USER " + alias + " to table " + str(self.myTable) self.sock.socksend(stringtree.grow('TA', [alias]))