Properly handle multicharacter bot prefixes
This commit is contained in:
parent
fa904d2ded
commit
4c970f6b16
|
@ -175,10 +175,10 @@ def main(conn, out):
|
|||
if inp.command == 'PRIVMSG':
|
||||
# COMMANDS
|
||||
bot_prefix = re.escape(bot.config.get("prefix", "."))
|
||||
if inp.chan == inp.nick: # private message, no command prefix
|
||||
prefix = r'^(?:['+bot_prefix+']?|'
|
||||
if inp.chan == inp.nick: # private message, no command prefix required
|
||||
prefix = r'^(?:(?:'+bot_prefix+')?|'
|
||||
else:
|
||||
prefix = r'^(?:['+bot_prefix+']|'
|
||||
prefix = r'^(?:'+bot_prefix+'|'
|
||||
|
||||
command_re = prefix + inp.conn.nick
|
||||
command_re += r'[:,]+\s+)(\w+)(?:$|\s+)(.*)'
|
||||
|
|
Loading…
Reference in New Issue