From bf0e271546ed9b670a9da253c9bb54dc756280be Mon Sep 17 00:00:00 2001 From: jesopo Date: Tue, 29 Mar 2016 14:32:01 +0100 Subject: added random.py, added code to commands.py to remove all empty strings from args_split. --- modules/commands.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'modules/commands.py') 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 (" -- cgit v1.3.1-10-gc9f91