def handle_packet(self, pkt, session): from util import Storage header = Storage() header.command = int(pkt['Command']) header.status = int(pkt['Status']) account_id, session_id = session['SessionId'].split('-', 1) self.account_id = account_id header.session_id = self.session_id = int(session_id) data = pkt._cdata.strip().encode('utf-8') YahooConnectionBase.handle_packet(self, header, data) if header.command == 241 and header.status == 0: self.server_update()
def handle_packet(self, pkt, session): from util import Storage header = Storage() header.command = int(pkt['Command']) header.status = int(pkt['Status']) account_id, session_id = session['SessionId'].split('-', 1) self.account_id = account_id header.session_id = self.session_id = int(session_id) data = pkt._cdata.strip().encode('utf-8') YahooConnectionBase.handle_packet(self, header, data) if header.command == 241 and header.status == 0: self.server_update()