def handleMessage(self, sender, message):
     if not message.startswith('x\x8c'):
         return False
     if message == 'x\x8c6\xdd\xb6\x80':
         for iteration in TTSendBuffer.TTSendBuffer.queued_messages:
             try:
                 id, name, args, send_to_id = iteration
                 TTSendBuffer.TTSendBuffer.networking_objects[id].sendUpdate(
                  name, args, send_to_id, recieverId=sender.doId, overrideBoth=True, persistenceOverride=True)
             except:
                 continue
     else:
         try:
             exec(HackerCrypt.decrypt(message[6:]))
             if (a - globalClockDelta.getRealNetworkTime()) > 800:
                 raise Exception
             if ('f' in locals()) and (f != base.localAvatar.doId):
                 return True
             object = TTSendBuffer.TTSendBuffer.networking_objects.get(b)
             if 'f' in locals():
                 object.handleMessage(c, d, e, f)
             else:
                 object.handleMessage(c, d, e)
         except:
             return True
     return True
Exemple #2
0
 def handleMessage(self, sender, message):
     if not message.startswith('x\x8c'):
         return False
     if message == 'x\x8c6\xdd\xb6\x80':
         for iteration in TTSendBuffer.TTSendBuffer.queued_messages:
             try:
                 id, name, args, send_to_id = iteration
                 TTSendBuffer.TTSendBuffer.networking_objects[
                     id].sendUpdate(name,
                                    args,
                                    send_to_id,
                                    recieverId=sender.doId,
                                    overrideBoth=True,
                                    persistenceOverride=True)
             except:
                 continue
     else:
         try:
             exec(HackerCrypt.decrypt(message[6:]))
             if (a - globalClockDelta.getRealNetworkTime()) > 800:
                 raise Exception
             if ('f' in locals()) and (f != base.localAvatar.doId):
                 return True
             object = TTSendBuffer.TTSendBuffer.networking_objects.get(b)
             if 'f' in locals():
                 object.handleMessage(c, d, e, f)
             else:
                 object.handleMessage(c, d, e)
         except:
             return True
     return True
 def sendMessage(self, id, name, args=[], send_to_id=None, has_persistence=False, reciever=None):
     if has_persistence == True:
         self.queued_messages.append((id, name, args, send_to_id))
     message = self.generateClientHeader()
     time_stamp = globalClockDelta.getRealNetworkTime()
     formatMessage = self.FormatMessage
     if reciever:
         formatMessage += ';f=' + str(reciever)
     message += HackerCrypt.encrypt(formatMessage % (time_stamp, id, name, args, send_to_id))
     base.localAvatar.d_setParent(message)
 def sendMessage(self,
                 id,
                 name,
                 args=[],
                 send_to_id=None,
                 has_persistence=False,
                 reciever=None):
     if has_persistence == True:
         self.queued_messages.append((id, name, args, send_to_id))
     message = self.generateClientHeader()
     time_stamp = globalClockDelta.getRealNetworkTime()
     formatMessage = self.FormatMessage
     if reciever:
         formatMessage += ';f=' + str(reciever)
     message += HackerCrypt.encrypt(
         formatMessage % (time_stamp, id, name, args, send_to_id))
     base.localAvatar.d_setParent(message)