diff options
| author | 2018-09-09 08:59:36 +0100 | |
|---|---|---|
| committer | 2018-09-09 08:59:36 +0100 | |
| commit | 2211cb054204a4f1f6a4552853bc307c697de05c (patch) | |
| tree | b450e1f86e433679e488cdc147c1d373ee0fa9db /modules/commands.py | |
| parent | Grammar fix (diff) | |
| signature | ||
Fix a few niggles
Diffstat (limited to 'modules/commands.py')
| -rw-r--r-- | modules/commands.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/commands.py b/modules/commands.py index d6b821f0..2567880b 100644 --- a/modules/commands.py +++ b/modules/commands.py @@ -190,10 +190,14 @@ class Module(object): event["stdout"].write("Commands: %s" % ", ".join(help_available)) def usage(self, event): - command_prefix = event["target"].get_setting("command-prefix", + if event["is_channel"]: + command_prefix = event["target"].get_setting("command-prefix", event["server"].get_setting( "command-prefix", "!")) + else: + command_prefix = "" + command = event["args_split"][0].lower() if command in self.events.on("received").on( |
