From 18199b166c3df98db41c35d0f49b39661722c4cc Mon Sep 17 00:00:00 2001 From: jacob1 Date: Sun, 14 Dec 2014 17:42:36 -0500 Subject: [PATCH] fix multiple letter command prefixes --- modules/common.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/common.py b/modules/common.py index e2572b0..8e58de5 100644 --- a/modules/common.py +++ b/modules/common.py @@ -33,7 +33,7 @@ def on_privmsg(cli, rawnick, chan, msg, notice = False): # Now that is always called first. for x in set(list(COMMANDS.keys()) + (list(currmod.COMMANDS.keys()) if currmod else list())): if x and msg.lower().startswith(botconfig.CMD_CHAR+x): - h = msg[len(x)+1:] + h = msg[len(x)+len(botconfig.CMD_CHAR):] if not h or h[0] == " " or not x: for fn in COMMANDS.get(x,[])+(currmod.COMMANDS.get(x,[]) if currmod else []): try: @@ -48,7 +48,7 @@ def on_privmsg(cli, rawnick, chan, msg, notice = False): else: for x in set(list(PM_COMMANDS.keys()) + (list(currmod.PM_COMMANDS.keys()) if currmod else list())): if msg.lower().startswith(botconfig.CMD_CHAR+x): - h = msg[len(x)+1:] + h = msg[len(x)+len(botconfig.CMD_CHAR):] elif not x or msg.lower().startswith(x): h = msg[len(x):] else: