Strip several space between command and arguments, not only one

This commit is contained in:
Juhani Krekelä 2019-07-16 12:38:39 +03:00
parent 4be5f02d69
commit 45be079ee8
1 changed files with 11 additions and 1 deletions

View File

@ -214,7 +214,17 @@ def handle_user_command(backend, line):
try:
if len(line) > 0 and line[0] == '/':
command, _, rest = line.partition(' ')
index = line.find(' ')
if index != -1:
command = line[:index]
while index < len(line) and line[index] == ' ':
index += 1
rest = line[index:]
else:
command = line
rest = ''
if command == '/':
# Send quoted message