summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--minecctl/minecctl-rcon.c12
-rw-r--r--minecctl/minecctl.c4
-rw-r--r--minecctl/server.c10
-rw-r--r--minecctl/server.h8
4 files changed, 17 insertions, 17 deletions
diff --git a/minecctl/minecctl-rcon.c b/minecctl/minecctl-rcon.c
index 237ef51..eb8d335 100644
--- a/minecctl/minecctl-rcon.c
+++ b/minecctl/minecctl-rcon.c
@@ -245,7 +245,7 @@ do_status(struct cfg *cfg) {
int fd;
struct server *server;
- server = get_default_server(cfg);
+ server = server_get_default(cfg);
fd = rcon_login(cfg, server);
if (fd < 0)
return;
@@ -358,7 +358,7 @@ void
do_stop(struct cfg *cfg) {
struct server *server;
- server = get_default_server(cfg);
+ server = server_get_default(cfg);
stop_one_server(cfg, server);
}
@@ -367,7 +367,7 @@ do_stop_all(struct cfg *cfg) {
struct server *server;
list_for_each_entry(server, &cfg->servers, list) {
- read_server_config(cfg, server);
+ server_read_config(cfg, server);
stop_one_server(cfg, server);
}
}
@@ -378,7 +378,7 @@ do_pcount(struct cfg *cfg) {
unsigned current, max;
struct server *server;
- server = get_default_server(cfg);
+ server = server_get_default(cfg);
fd = rcon_login(cfg, server);
if (fd < 0)
return;
@@ -397,7 +397,7 @@ do_console(struct cfg *cfg)
int fd;
struct server *server;
- server = get_default_server(cfg);
+ server = server_get_default(cfg);
fd = rcon_login(cfg, server);
if (fd < 0)
return;
@@ -442,7 +442,7 @@ do_command(struct cfg *cfg) {
int fd;
struct server *server;
- server = get_default_server(cfg);
+ server = server_get_default(cfg);
fd = rcon_login(cfg, server);
if (fd < 0)
return;
diff --git a/minecctl/minecctl.c b/minecctl/minecctl.c
index 27c2066..324f0ef 100644
--- a/minecctl/minecctl.c
+++ b/minecctl/minecctl.c
@@ -188,7 +188,7 @@ get_optional_server_arg(char * const **argv, bool more)
usage(false);
}
- if (!set_default_server(cfg, **argv)) {
+ if (!server_set_default(cfg, **argv)) {
error("\"%s\" is not a known server or command", **argv);
usage(false);
}
@@ -389,7 +389,7 @@ main(int argc, char **argv)
parse_cmdline(argc, argv);
- get_servers(cfg);
+ server_load_known(cfg);
parse_command(&argv[optind]);
diff --git a/minecctl/server.c b/minecctl/server.c
index 8a32486..7526bb6 100644
--- a/minecctl/server.c
+++ b/minecctl/server.c
@@ -11,7 +11,7 @@
#include "server-config-options.h"
void
-read_server_config(struct cfg *cfg, struct server *server)
+server_read_config(struct cfg *cfg, struct server *server)
{
char buf[4096];
size_t off = 0;
@@ -98,7 +98,7 @@ read_server_config(struct cfg *cfg, struct server *server)
}
struct server *
-get_default_server(struct cfg *cfg)
+server_get_default(struct cfg *cfg)
{
struct server *server;
@@ -106,13 +106,13 @@ get_default_server(struct cfg *cfg)
if (!server)
die("No servers defined");
- read_server_config(cfg, server);
+ server_read_config(cfg, server);
return server;
}
bool
-set_default_server(struct cfg *cfg, const char *name)
+server_set_default(struct cfg *cfg, const char *name)
{
struct server *server;
@@ -129,7 +129,7 @@ set_default_server(struct cfg *cfg, const char *name)
}
void
-get_servers(struct cfg *cfg)
+server_load_known(struct cfg *cfg)
{
struct dirent *dent;
DIR *dir;
diff --git a/minecctl/server.h b/minecctl/server.h
index 368c1db..ccccf06 100644
--- a/minecctl/server.h
+++ b/minecctl/server.h
@@ -13,13 +13,13 @@ struct server {
struct list_head list;
};
-void read_server_config(struct cfg *cfg, struct server *server);
+void server_read_config(struct cfg *cfg, struct server *server);
-struct server *get_default_server(struct cfg *cfg);
+struct server *server_get_default(struct cfg *cfg);
-bool set_default_server(struct cfg *cfg, const char *name);
+bool server_set_default(struct cfg *cfg, const char *name);
-void get_servers(struct cfg *cfg);
+void server_load_known(struct cfg *cfg);
void server_free(struct server *server);