summaryrefslogtreecommitdiff
path: root/minecctl/rcon-commands.c
diff options
context:
space:
mode:
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)