From fd4f4ace264a91355df46186dd88f566fb451aa5 Mon Sep 17 00:00:00 2001 From: David Härdeman Date: Tue, 23 Jun 2020 11:11:26 +0200 Subject: Move rcon to server-rcon in preparation for separate rcon tool --- idle.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'idle.c') diff --git a/idle.c b/idle.c index dd1eeee..c49846d 100644 --- a/idle.c +++ b/idle.c @@ -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); -- cgit v1.2.3