commands now also work with newline after them

This commit is contained in:
LordMZTE 2021-03-28 14:49:34 +02:00
parent e7f20eeae0
commit ff2e7bb989
1 changed files with 2 additions and 0 deletions

View File

@ -204,6 +204,8 @@ InputBar::send()
if (text().startsWith('/')) {
int command_end = text().indexOf(' ');
if (command_end == -1)
command_end = text().indexOf('\n');
if (command_end == -1)
command_end = text().size();
auto name = text().mid(1, command_end - 1);