aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorGravatar jesopo2019-07-04 14:06:40 +0100
committerGravatar jesopo2019-07-04 14:06:40 +0100
commit72840fc63f00d8ec71c6beb2d0b82a7caeeac479 (patch)
treea73a3c197768338f04d716ce87bf38643206e669 /modules
parentAdd -D cli arg to tolerate disconnections on startup (diff)
signature
add bot-wide command-method option
Diffstat (limited to 'modules')
-rw-r--r--modules/commands/__init__.py5
1 files changed, 4 insertions, 1 deletions
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):