aboutsummaryrefslogtreecommitdiff
path: root/modules/commands.py
diff options
context:
space:
mode:
authorGravatar jesopo2016-03-29 14:32:01 +0100
committerGravatar jesopo2016-03-29 14:32:01 +0100
commitbf0e271546ed9b670a9da253c9bb54dc756280be (patch)
treef8c1fd72af9c059a0877bdcb9608fc34c736a3c0 /modules/commands.py
parentupdated ctcp.py. (diff)
added random.py, added code to commands.py to remove all empty strings from args_split.
Diffstat (limited to 'modules/commands.py')
-rw-r--r--modules/commands.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/commands.py b/modules/commands.py
index d31c1e3d..3815e5e8 100644
--- a/modules/commands.py
+++ b/modules/commands.py
@@ -83,7 +83,8 @@ class Module(object):
event["stderr"].write(returned).send()
return
min_args = hook.kwargs.get("min_args")
- args_split = event["message_split"][1:]
+ # get rid of all the empty strings
+ args_split = list(filter(None, event["message_split"][1:]))
if min_args and len(args_split) < min_args:
ChannelStdErr("Error", event["channel"]
).write("Not enough arguments ("