diff options
-rw-r--r-- | idle.c | 3 | ||||
-rw-r--r-- | meson.build | 2 | ||||
-rw-r--r-- | server-rcon.c (renamed from rcon.c) | 2 | ||||
-rw-r--r-- | server-rcon.h (renamed from rcon.h) | 4 | ||||
-rw-r--r-- | server.c | 2 |
5 files changed, 7 insertions, 6 deletions
@@ -32,6 +32,7 @@ write_byte(char **pos, char byte) #define MC_GET_STATUS 0x00 #define MC_VARINT_MAX_BYTES 5 #define MC_STATUS_REPLY 0x00 +#define MC_UNDEFINED_VERSION -1 static inline void write_varint(char **pos, int32_t orig) @@ -297,7 +298,7 @@ idle_check_get_player_count(struct server *server, struct connection *conn) pos = buf; write_byte(&pos, MC_HELO); - write_varint(&pos, -1); /* Protocol version, -1 = undefined */ + write_varint(&pos, MC_UNDEFINED_VERSION); write_str(&pos, hostname); write_byte(&pos, (port >> 8) & 0xff); write_byte(&pos, (port >> 0) & 0xff); diff --git a/meson.build b/meson.build index 34ad7b6..ca38341 100644 --- a/meson.build +++ b/meson.build @@ -39,9 +39,9 @@ mcproxy_sources = [ 'server.c', 'server-proxy.c', 'server-config.c', + 'server-rcon.c', 'announce.c', 'config-parser.c', - 'rcon.c', 'idle.c', 'ptimer.c', 'igmp.c', @@ -13,7 +13,7 @@ #include "main.h" #include "uring.h" #include "server.h" -#include "rcon.h" +#include "server-rcon.h" struct rcon { struct server *server; @@ -1,5 +1,5 @@ -#ifndef foorconhfoo -#define foorconhfoo +#ifndef fooserverrconhfoo +#define fooserverrconhfoo void rcon_refdump(struct rcon *rcon); @@ -16,10 +16,10 @@ #include "ptimer.h" #include "server.h" #include "server-proxy.h" +#include "server-rcon.h" #include "utils.h" #include "config-parser.h" #include "idle.h" -#include "rcon.h" #include "systemd.h" static bool |