diff options
author | David Härdeman <david@hardeman.nu> | 2020-06-27 15:18:45 +0200 |
---|---|---|
committer | David Härdeman <david@hardeman.nu> | 2020-06-27 15:18:45 +0200 |
commit | 99b2c70137fef05a5a18f439b9010ddba455f5cb (patch) | |
tree | b0c08cfce14019cd634e6b4b84d0cf0f6e8eee6a /minecctl/misc-commands.c | |
parent | a87e894ba3f3a8915389f651fb034f0d1835630c (diff) |
Create a shared mc protocol implementation and use it in the proxy and cmd line tool
Diffstat (limited to 'minecctl/misc-commands.c')
-rw-r--r-- | minecctl/misc-commands.c | 15 |
1 files changed, 15 insertions, 0 deletions
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; +} |