summaryrefslogtreecommitdiff
path: root/minecctl/minecctl-commands.h
blob: b1729f0ce0944b956052f01f547b85a795b5bf31 (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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#ifndef foominecctlcommandshfoo
#define foominecctlcommandshfoo

enum commands {
	CMD_INVALID = 0,
	CMD_LIST,
	CMD_LINT,
	CMD_STATUS,
	CMD_PING,
	CMD_STOP,
	CMD_STOPALL,
	CMD_PCOUNT,
	CMD_COMMAND,
	CMD_COMMANDS,
	CMD_CONSOLE,
};

static struct command_list {
	const char *name;
	enum commands cmd;
} command_list[] = { {
			     .name = "list",
			     .cmd = CMD_LIST,
		     },
		     {
			     .name = "lint",
			     .cmd = CMD_LINT,
		     },
		     {
			     .name = "status",
			     .cmd = CMD_STATUS,
		     },
		     {
			     .name = "ping",
			     .cmd = CMD_PING,
		     },
		     {
			     .name = "stop",
			     .cmd = CMD_STOP,
		     },
		     {
			     .name = "stopall",
			     .cmd = CMD_STOPALL,
		     },
		     {
			     .name = "pcount",
			     .cmd = CMD_PCOUNT,
		     },
		     {
			     .name = "cmd",
			     .cmd = CMD_COMMAND,
		     },
		     {
			     .name = "cmds",
			     .cmd = CMD_COMMANDS,
		     },
		     {
			     .name = "console",
			     .cmd = CMD_CONSOLE,
		     },
		     {
			     .name = NULL,
			     .cmd = CMD_INVALID,
		     } };

#endif