summaryrefslogtreecommitdiff
path: root/mcserverctl.c
diff options
context:
space:
mode:
authorDavid Härdeman <david@hardeman.nu>2020-06-23 16:25:36 +0200
committerDavid Härdeman <david@hardeman.nu>2020-06-23 16:25:36 +0200
commit8c27290245b7bcc7cd2f72f3b4a7562294b43bbe (patch)
tree54bae7909a94bfc598df7b88d9794742daf0bb31 /mcserverctl.c
parent973ae757342b91e3e6aafd07e0c0a24af84aad98 (diff)
Split directories better
Diffstat (limited to 'mcserverctl.c')
-rw-r--r--mcserverctl.c41
1 files changed, 0 insertions, 41 deletions
diff --git a/mcserverctl.c b/mcserverctl.c
deleted file mode 100644
index 8a799a2..0000000
--- a/mcserverctl.c
+++ /dev/null
@@ -1,41 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdint.h>
-#include <inttypes.h>
-
-#include "rcon-protocol.h"
-
-
-int
-main(int argc, char **argv)
-{
- char buf[4096];
- size_t len;
- int32_t id, type;
- const char *msg, *error;
-
- fprintf(stderr, "Started\n");
-
- if (!rcon_protocol_create_packet(buf, sizeof(buf), &len,
- 1, RCON_PACKET_LOGIN,
- "test")) {
- fprintf(stderr, "Failed to create packet\n");
- exit(EXIT_FAILURE);
- }
-
- if (!rcon_protocol_packet_complete(buf, len)) {
- fprintf(stderr, "Packet not complete\n");
- exit(EXIT_FAILURE);
- }
-
- if (!rcon_protocol_read_packet(buf, len, &id, &type, &msg, &error)) {
- fprintf(stderr, "Packet parsing failed: %s\n", error);
- exit(EXIT_FAILURE);
- }
-
- fprintf(stderr, "Packet - id: %" PRIi32 ", type: %" PRIi32 ", msg: %s\n",
- id, type, msg);
-
- exit(EXIT_SUCCESS);
-}
-