Пример #1
0
 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)
Пример #2
0
 def joinTable(self, index):
     self.sock.socksend(stringtree.grow('TJ', [str(index)]))
Пример #3
0
 def setTable(self, settings):
     self.sock.socksend(stringtree.grow('Ts', [settings]))
Пример #4
0
 def swap(self, tiles):
     print "swapping " + tiles
     self.sock.socksend(stringtree.grow('GC', [tiles + '']))
Пример #5
0
 def playMove(self, encMove):
     print "playMove in qpAction"
     self.sock.socksend(stringtree.grow('GW', [encMove + '']))
Пример #6
0
 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']))
Пример #7
0
 def publicChat(self, text):
     self.sock.socksend(stringtree.grow('Cm', ['P', text + '50']))
Пример #8
0
 def tableChat(self, text):
     self.sock.socksend(stringtree.grow('Cm', ['t', text + '50']))
Пример #9
0
 def acceptUser(self, alias):
     print "***ACCEPTING USER " + alias + " to table " + str(self.myTable)
     self.sock.socksend(stringtree.grow('TA', [alias]))