Beispiel #1
0
 def on_command(self, command, parameters):
     result = commands.handle_command(self, command, parameters)
     if result == False:
         parameters = ['***'] * len(parameters)
     log_message = '<%s> /%s %s' % (self.name, command,
                                    ' '.join(parameters))
     if result:
         log_message += ' -> %s' % result
         self.send_chat(result)
     print(log_message.encode('ascii', 'replace'))
Beispiel #2
0
 def on_command(self, command, parameters):
     result = commands.handle_command(self, command, parameters)
     if result == False:
         parameters = ['***'] * len(parameters)
     log_message = '<%s> /%s %s' % (self.name, command,
                                    ' '.join(parameters))
     if result:
         log_message += ' -> %s' % result
         for i in reversed(result.split("\n")):
             self.send_chat(i)
     print(log_message.replace("\n", "\\n").encode('ascii', 'replace'))
Beispiel #3
0
 def on_command(self, command: str, parameters: List[str]) -> None:
     result = commands.handle_command(self, command, parameters)
     # TODO: Move this logging into command module?
     if result == False:
         parameters = ['***'] * len(parameters)
     log_message = '<{}> /{} {}'.format(self.name, command,
                                        ' '.join(parameters))
     if result:
         log_message += ' -> %s' % result
         for i in reversed(result.split("\n")):
             self.send_chat(i)
     log.info(escape_control_codes(log_message))
Beispiel #4
0
    def on_command(self, command: str, parameters: List[str]) -> None:
        result = commands.handle_command(self, command, parameters)

        if result:
            for i in reversed(result.split("\n")):
                self.send_chat(i)