aboutsummaryrefslogtreecommitdiff
path: root/modules/commands.py
diff options
context:
space:
mode:
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(