コード例 #1
0
 def register_command(self, cmd, handle):
     cmds = cmd.split(",")
     for command in cmds:
         command = command.strip()
         if command:
             self.cmd_handle[command] = handle
             logging.debug("bot: command added: " + command)
コード例 #2
0
 def register_command(self, cmd, handle, no_partial_match=False, access_outside_channel=False):
     cmds = cmd.split(",")
     for command in cmds:
         command = command.strip()
         if command:
             self.cmd_handle[command] = {'handle': handle,
                                         'partial_match': not no_partial_match,
                                         'access_outside_channel': access_outside_channel}
             self.log.debug("bot: command added: " + command)