summaryrefslogtreecommitdiff
path: root/minecctl/rcon-commands.c
diff options
context:
space:
mode:
authorDavid Härdeman <david@hardeman.nu>2020-07-01 19:44:19 +0200
committerDavid Härdeman <david@hardeman.nu>2020-07-01 19:44:19 +0200
commit6057bbf9e852103c252bf3429146c5c1309bbc4a (patch)
tree341abfdf6f6d4f91e807fa1825abfc8e83ef4e3c /minecctl/rcon-commands.c
parente045a7b80cc0cb96b79456f9c74c3705989a12df (diff)
Improve the lint command further
Diffstat (limited to 'minecctl/rcon-commands.c')
-rw-r--r--minecctl/rcon-commands.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/minecctl/rcon-commands.c b/minecctl/rcon-commands.c
index fc5b932..dfe8647 100644
--- a/minecctl/rcon-commands.c
+++ b/minecctl/rcon-commands.c
@@ -371,13 +371,23 @@ bool do_stop(struct cfg *cfg)
bool do_stop_all(struct cfg *cfg)
{
struct server *server;
+ unsigned lineno;
+ const char *error;
+ bool rv = true;
list_for_each_entry(server, &cfg->servers, list) {
- server_read_config(cfg, server);
+ if (!server_read_config(cfg, server, &lineno, &error)) {
+ info("• %s: %sfail%s - invalid configuration file "
+ "(line %u: %s)",
+ server->name, ansi_red, ansi_normal,
+ lineno, error);
+ rv = false;
+ }
+ /* FIXME: error checks */
stop_one_server(cfg, server);
}
- return true;
+ return rv;
}
bool do_rcon_pcount(struct cfg *cfg, unsigned *online, unsigned *max)