diff options
author | David Härdeman <david@hardeman.nu> | 2020-06-26 23:20:43 +0200 |
---|---|---|
committer | David Härdeman <david@hardeman.nu> | 2020-06-26 23:20:43 +0200 |
commit | a87e894ba3f3a8915389f651fb034f0d1835630c (patch) | |
tree | 70ca77275f6c79dc869c3bd1808d35e2239c0ced /minecctl/misc-commands.c | |
parent | 957634c7c434b6c8d696ca8f4098e96a201fdfb0 (diff) |
Split misc commands into a separate file
Diffstat (limited to 'minecctl/misc-commands.c')
-rw-r--r-- | minecctl/misc-commands.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/minecctl/misc-commands.c b/minecctl/misc-commands.c new file mode 100644 index 0000000..6b70c55 --- /dev/null +++ b/minecctl/misc-commands.c @@ -0,0 +1,18 @@ +#include "utils.h" +#include "minecctl.h" +#include "server.h" +#include "misc-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; +} + |