Strip several space between command and arguments, not only one
This commit is contained in:
parent
4be5f02d69
commit
45be079ee8
12
ethermess.py
12
ethermess.py
|
@ -214,7 +214,17 @@ def handle_user_command(backend, line):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if len(line) > 0 and line[0] == '/':
|
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 == '/':
|
if command == '/':
|
||||||
# Send quoted message
|
# Send quoted message
|
||||||
|
|
Loading…
Reference in New Issue