Ejemplo n.º 1
0
 def sendLogin(self, login, passwd):
     p = HLPacket(HTLC_HDR_LOGIN, self.nextTaskID())
     p.addBinary(DATA_LOGIN, HLEncode(login))
     p.addBinary(DATA_PASSWORD, HLEncode(passwd))
     p.addString(DATA_NICK, self.nickname)
     self.sendPacket(p, login_received)
     return self.taskDeferred()
Ejemplo n.º 2
0
 def sendIcon(self, icon):
     if icon:
         p = HLPacket(HTLC_HDR_ICON_SET)
         p.addBinary(DATA_GIFICON, icon)
         self.sendPacket(p)