Esempio n. 1
0
 def transitCommand(self, senderInfo, commandData):
     self.log('Received command "{0}", transiting'.format(
         utils.commandData_to_string(commandData)))
     target = commandData['sender'] if commandData['result'][
         'responded'] else commandData['receiver']
     for client in self.clients:
         if client.info != senderInfo and client.info.name == target:
             client.sendCommand(commandData)
Esempio n. 2
0
 def sendCommand(self, commandData):
     if self.isOnline():
         self.log('Sending command "{}" to the client'.format(
             utils.lengthLimit(utils.commandData_to_string(commandData))))
         self.sendData(json.dumps(commandData))