aboutsummaryrefslogtreecommitdiff
path: root/modules/commands.py
diff options
context:
space:
mode:
authorGravatar dngfx2018-09-09 08:59:36 +0100
committerGravatar dongfix2018-09-09 08:59:36 +0100
commit2211cb054204a4f1f6a4552853bc307c697de05c (patch)
treeb450e1f86e433679e488cdc147c1d373ee0fa9db /modules/commands.py
parentGrammar fix (diff)
signature
Fix a few niggles
Diffstat (limited to 'modules/commands.py')
-rw-r--r--modules/commands.py6
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(