Merge pull request #272 from mweinelt/catch-indexerror-on-empty-message
Don't assume text messages have a first character in command parsing
This commit is contained in:
commit
f9cc9c7872
@ -252,7 +252,7 @@ class MumbleBot:
|
|||||||
# you want to split the username
|
# you want to split the username
|
||||||
user = user.split()[0]
|
user = user.split()[0]
|
||||||
|
|
||||||
if message[0] in var.config.get('commands', 'command_symbol'):
|
if message.startswith(tuple(var.config.get('commands', 'command_symbol'))):
|
||||||
# remove the symbol from the message
|
# remove the symbol from the message
|
||||||
message = message[1:].split(' ', 1)
|
message = message[1:].split(' ', 1)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user