From 99b2c70137fef05a5a18f439b9010ddba455f5cb Mon Sep 17 00:00:00 2001 From: David Härdeman Date: Sat, 27 Jun 2020 15:18:45 +0200 Subject: Create a shared mc protocol implementation and use it in the proxy and cmd line tool --- minecctl/misc-commands.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'minecctl/misc-commands.c') diff --git a/minecctl/misc-commands.c b/minecctl/misc-commands.c index 6b70c55..c64a005 100644 --- a/minecctl/misc-commands.c +++ b/minecctl/misc-commands.c @@ -2,6 +2,8 @@ #include "minecctl.h" #include "server.h" #include "misc-commands.h" +#include "rcon-commands.h" +#include "mc-commands.h" bool do_list(struct cfg *cfg) @@ -16,3 +18,16 @@ do_list(struct cfg *cfg) return true; } +bool +do_pcount(struct cfg *cfg) +{ + unsigned x, y; + + if (do_rcon_pcount(cfg, &y, &x)) + error("Rcon says %u/%u", y, x); + + if (do_mc_pcount(cfg, &y, &x)) + error("MC says %u/%u", y, x); + + return true; +} -- cgit v1.2.3