From 72627d2f6efe3f3297ce466a1fdd208015a19f88 Mon Sep 17 00:00:00 2001 From: Plex Date: Wed, 15 Jun 2022 17:22:59 +0200 Subject: mcquery --- mcping.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'mcping.c') diff --git a/mcping.c b/mcping.c index 037dcc5..cc43e73 100644 --- a/mcping.c +++ b/mcping.c @@ -1,3 +1,4 @@ +#include #include #include #include @@ -55,9 +56,9 @@ int main(int argc, char *argv[]) if ((s = socket(AF_INET, SOCK_STREAM, 0)) < 0) perror("bad socket\n"); - connect_mc_server_ping(s, address, port); - send_handshake(s, protocol_ver, address, port, 1); - send_packet(s, 0x0, 0, NULL); // request packet (0x0 with no fields) + connect_mc_server(s, address, port, PING); + send_ping_handshake(s, protocol_ver, address, port, 1); + send_ping_packet(s, 0x0, 0, NULL); // request packet (0x0 with no fields) packet response = recv_packet(s); #ifdef _DEBUG -- cgit v1.2.3