Ignore trailing space on slash commands
parent
fc113c8ef9
commit
dbdf13b51a
1
input.c
1
input.c
|
@ -109,6 +109,7 @@ void input(char *input) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
char *command = strsep(&input, " ");
|
char *command = strsep(&input, " ");
|
||||||
|
if (input && !input[0]) input = NULL;
|
||||||
for (size_t i = 0; i < COMMANDS_LEN; ++i) {
|
for (size_t i = 0; i < COMMANDS_LEN; ++i) {
|
||||||
if (strcasecmp(command, COMMANDS[i].command)) continue;
|
if (strcasecmp(command, COMMANDS[i].command)) continue;
|
||||||
COMMANDS[i].handler(input);
|
COMMANDS[i].handler(input);
|
||||||
|
|
Loading…
Reference in New Issue