From 72840fc63f00d8ec71c6beb2d0b82a7caeeac479 Mon Sep 17 00:00:00 2001 From: jesopo Date: Thu, 4 Jul 2019 14:06:40 +0100 Subject: add bot-wide command-method option --- modules/commands/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'modules/commands') diff --git a/modules/commands/__init__.py b/modules/commands/__init__.py index 8712c7f1..9c4d2b81 100644 --- a/modules/commands/__init__.py +++ b/modules/commands/__init__.py @@ -36,6 +36,8 @@ class CommandMethodSetting(utils.Setting): "Set the method used to respond to commands")) @utils.export("channelset", CommandMethodSetting("command-method", "Set the method used to respond to commands")) +@utils.export("botset", CommandMethodSetting("command-method", + "Set the method used to respond to commands")) @utils.export("channelset", utils.BoolSetting("hide-prefix", "Disable/enable hiding prefix in command reponses")) @utils.export("channelset", utils.BoolSetting("commands", @@ -86,7 +88,8 @@ class Module(ModuleManager.BaseModule): def _command_method(self, target, server): return target.get_setting(COMMAND_METHOD, - server.get_setting(COMMAND_METHOD, "PRIVMSG")).upper() + server.get_setting(COMMAND_METHOD, + self.bot.set_setting(COMMAND_METHOD, "PRIVMSG"))).upper() def _find_command_hook(self, server, command, is_channel, args_split): if not self.has_command(command): -- cgit v1.3.1-10-gc9f91