blob: 52797da48fe738bd2027b8f8ad6ba9ef79373c36 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#include "utils.h"
#include "minecctl.h"
#include "server.h"
#include "misc-commands.h"
#include "rcon-commands.h"
#include "mc-commands.h"
bool do_list(struct cfg *cfg)
{
struct server *server;
/* server->filename check excludes servers created from cmdline */
list_for_each_entry(server, &cfg->servers, list)
if (server->filename)
info("%s", server->name);
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;
}
|