Don't assume text messages have a first character in command parsing

Fixes: #271
This commit is contained in:
Martin Weinelt 2021-05-16 02:48:10 +02:00
parent f36611f07b
commit e6592f5c22
No known key found for this signature in database
GPG Key ID: 87C1E9888F856759

View File

@ -252,7 +252,7 @@ class MumbleBot:
# you want to split the username
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
message = message[1:].split(' ', 1)