diff options
Diffstat (limited to 'minecctl')
-rw-r--r-- | minecctl/minecctl-commands.h | 10 | ||||
-rw-r--r-- | minecctl/minecctl.c | 12 | ||||
-rw-r--r-- | minecctl/misc-commands.c | 2 | ||||
-rw-r--r-- | minecctl/misc-commands.h | 2 | ||||
-rw-r--r-- | minecctl/rcon-commands.c | 2 | ||||
-rw-r--r-- | minecctl/rcon-commands.h | 2 |
6 files changed, 15 insertions, 15 deletions
diff --git a/minecctl/minecctl-commands.h b/minecctl/minecctl-commands.h index b946271..909c48d 100644 --- a/minecctl/minecctl-commands.h +++ b/minecctl/minecctl-commands.h @@ -6,8 +6,8 @@ enum commands { CMD_INVALID = 0, CMD_LIST, CMD_LINT, + CMD_INFO, CMD_STATUS, - CMD_PING, CMD_STOP, CMD_STOPALL, CMD_PCOUNT, @@ -28,12 +28,12 @@ static struct command_list { .cmd = CMD_LINT, }, { - .name = "status", - .cmd = CMD_STATUS, + .name = "info", + .cmd = CMD_INFO, }, { - .name = "ping", - .cmd = CMD_PING, + .name = "status", + .cmd = CMD_STATUS, }, { .name = "stop", diff --git a/minecctl/minecctl.c b/minecctl/minecctl.c index 9a43fc3..925092e 100644 --- a/minecctl/minecctl.c +++ b/minecctl/minecctl.c @@ -156,8 +156,8 @@ _noreturn_ static void usage(bool no_error) "Valid commands:\n" " list list known servers\n" " lint check validity of server configuration files\n" - " status [SERVER] show status of SERVER (or all known servers)\n" - " ping [SERVER] check if SERVER is running\n" + " info [SERVER] show information about a running SERVER (or all known servers)\n" + " status [SERVER] check if SERVER (or all known servers) is running and accessible\n" " stop [SERVER] stop SERVER\n" " stopall stop all known servers (including ADDR)\n" " pcount [SERVER] get player count for SERVER\n" @@ -335,13 +335,13 @@ static void parse_command(struct cfg *cfg, char *const *argv) } cfg->cmd = do_stop_all; break; - case CMD_STATUS: + case CMD_INFO: get_optional_server_arg(cfg, &argv, false); - cfg->cmd = do_status; + cfg->cmd = do_info; break; - case CMD_PING: + case CMD_STATUS: get_optional_server_arg(cfg, &argv, false); - cfg->cmd = do_ping; + cfg->cmd = do_status; break; case CMD_STOP: get_optional_server_arg(cfg, &argv, false); diff --git a/minecctl/misc-commands.c b/minecctl/misc-commands.c index 1870e07..c7c09d0 100644 --- a/minecctl/misc-commands.c +++ b/minecctl/misc-commands.c @@ -155,7 +155,7 @@ bool do_pcount(struct cfg *cfg) return true; } -bool do_ping(struct cfg *cfg) +bool do_status(struct cfg *cfg) { struct server *server; const char *error; diff --git a/minecctl/misc-commands.h b/minecctl/misc-commands.h index ac2fd54..ebb6ccd 100644 --- a/minecctl/misc-commands.h +++ b/minecctl/misc-commands.h @@ -8,6 +8,6 @@ bool do_lint(struct cfg *cfg); bool do_pcount(struct cfg *cfg); -bool do_ping(struct cfg *cfg); +bool do_status(struct cfg *cfg); #endif diff --git a/minecctl/rcon-commands.c b/minecctl/rcon-commands.c index 61a682c..0c4fd7e 100644 --- a/minecctl/rcon-commands.c +++ b/minecctl/rcon-commands.c @@ -226,7 +226,7 @@ static bool get_one_status(int fd, char *buf, size_t len, const char *cmd, return false; } -bool do_status(struct cfg *cfg) +bool do_info(struct cfg *cfg) { char buf[4096]; char tbuf[4096]; diff --git a/minecctl/rcon-commands.h b/minecctl/rcon-commands.h index 84d5529..b2ae75d 100644 --- a/minecctl/rcon-commands.h +++ b/minecctl/rcon-commands.h @@ -2,7 +2,7 @@ #ifndef foorconcommandshfoo #define foorconcommandshfoo -bool do_status(struct cfg *cfg); +bool do_info(struct cfg *cfg); bool do_stop(struct cfg *cfg); |