summaryrefslogtreecommitdiff
path: root/minecctl/misc-commands.c
diff options
context:
space:
mode:
Diffstat (limited to 'minecctl/misc-commands.c')
-rw-r--r--minecctl/misc-commands.c18
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;
+}
+