add bot-wide command-method option
This commit is contained in:
parent
d7e18b1826
commit
72840fc63f
1 changed files with 4 additions and 1 deletions
|
@ -36,6 +36,8 @@ class CommandMethodSetting(utils.Setting):
|
||||||
"Set the method used to respond to commands"))
|
"Set the method used to respond to commands"))
|
||||||
@utils.export("channelset", CommandMethodSetting("command-method",
|
@utils.export("channelset", CommandMethodSetting("command-method",
|
||||||
"Set the method used to respond to commands"))
|
"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",
|
@utils.export("channelset", utils.BoolSetting("hide-prefix",
|
||||||
"Disable/enable hiding prefix in command reponses"))
|
"Disable/enable hiding prefix in command reponses"))
|
||||||
@utils.export("channelset", utils.BoolSetting("commands",
|
@utils.export("channelset", utils.BoolSetting("commands",
|
||||||
|
@ -86,7 +88,8 @@ class Module(ModuleManager.BaseModule):
|
||||||
|
|
||||||
def _command_method(self, target, server):
|
def _command_method(self, target, server):
|
||||||
return target.get_setting(COMMAND_METHOD,
|
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):
|
def _find_command_hook(self, server, command, is_channel, args_split):
|
||||||
if not self.has_command(command):
|
if not self.has_command(command):
|
||||||
|
|
Loading…
Reference in a new issue