diff options
Diffstat (limited to 'minecctl/mc-commands.c')
-rw-r--r-- | minecctl/mc-commands.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/minecctl/mc-commands.c b/minecctl/mc-commands.c index 0ac20d0..d4d2846 100644 --- a/minecctl/mc-commands.c +++ b/minecctl/mc-commands.c @@ -7,8 +7,7 @@ #include "misc.h" #include "mc-protocol.h" -bool -do_mc_pcount(struct cfg *cfg, unsigned *online, unsigned *max) +bool do_mc_pcount(struct cfg *cfg, unsigned *online, unsigned *max) { struct server *server; struct saddr *saddr; @@ -24,7 +23,7 @@ do_mc_pcount(struct cfg *cfg, unsigned *online, unsigned *max) if (fd < 0) { error("%s: unable to connect", server->name); return false; - } + } /* FIXME: connect_any needs to indicate the address it used */ saddr = list_first_entry(&server->mc_addrs, struct saddr, list); @@ -33,7 +32,8 @@ do_mc_pcount(struct cfg *cfg, unsigned *online, unsigned *max) goto out; } - if (!mc_protocol_create_status_request(buf, sizeof(buf), &plen, saddr)) { + if (!mc_protocol_create_status_request(buf, sizeof(buf), &plen, + saddr)) { error("Failed to create req"); goto out; } @@ -64,7 +64,7 @@ do_mc_pcount(struct cfg *cfg, unsigned *online, unsigned *max) break; } } - + if (!mc_protocol_parse_status_reply(buf, off, online, max)) { error("Failed to get player count"); return false; @@ -74,4 +74,3 @@ out: close(fd); return rv; } - |