def message(self, user, channel, msg): user = user.split('!', 1)[0] nick, command, message = utils.parse_message(msg, self._commands.keys()) for plugin in self._generic_plugins: plugin.handle_message(channel, msg) if nick and command: self._commands[command](channel, message)
def message(self, user, channel, msg): user = user.split('!', 1)[0] nick, command, message = utils.parse_message(msg, self._command_plugins.keys()) for plugin in self._generic_plugins: plugin.handle_message(channel=channel, nickname=user, message=message) if (nick or channel == settings.NICKNAME) and command: self._command_plugins[command].handle_message(channel=channel, nickname=user, message=message, command=command)