summaryrefslogtreecommitdiff
path: root/minecproxy/server.c
diff options
context:
space:
mode:
Diffstat (limited to 'minecproxy/server.c')
-rw-r--r--minecproxy/server.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/minecproxy/server.c b/minecproxy/server.c
index 84a50ee..85019b4 100644
--- a/minecproxy/server.c
+++ b/minecproxy/server.c
@@ -91,6 +91,7 @@ void server_delete_by_filename(const char *filename)
}
}
+/* FIXME: Share with minecctl */
static void server_dump(struct server *server)
{
struct server_local *local;
@@ -400,7 +401,10 @@ bool server_announce(struct server *server, int fd)
assert_return(server && fd >= 0, false);
if (server->state == SERVER_STATE_INIT ||
- server->state == SERVER_STATE_DEAD)
+ server->state == SERVER_STATE_DEAD ||
+ server->scfg.announce == SERVER_ANNOUNCE_NEVER ||
+ (server->scfg.announce == SERVER_ANNOUNCE_WHEN_RUNNING &&
+ server->state != SERVER_STATE_RUNNING))
return false;
debug(DBG_ANN, "announcing server: %s", server->name);