diff options
Diffstat (limited to '')
-rw-r--r-- | main.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -181,10 +181,14 @@ int main(void) { int (*func)(struct string source, uint64_t argc, struct string *argv) = get_table_index(network_commands, command); if (func == 0) { - WRITES(1, STRING("WARNING: Command is unknown, ignoring...\n")); + WRITES(2, STRING("WARNING: Command is unknown, ignoring...\n")); } else { write(1, "\n", 1); - func(source, argc, argv); + int err = func(source, argc, argv); + if (err) { + WRITES(1, STRING("Disconnecting by result of the network command handler...\n")); + return 0; + } } write(1, "\n", 1); |