From 9809d13d63e7336f034321fc057609deae56f99c Mon Sep 17 00:00:00 2001 From: Tiiffi Date: Mon, 5 Jan 2015 05:15:25 +0200 Subject: [PATCH] Updated help function and added raw output functionality in "packet_print" function. --- mcrcon.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/mcrcon.c b/mcrcon.c index 36cacef..4ecec91 100644 --- a/mcrcon.c +++ b/mcrcon.c @@ -331,6 +331,7 @@ void usage(void) " -H\t\tHost address or ip.\n" " -P\t\tPort. Default: 25575.\n" " -c\t\tDo not print colors. Disables bukkit color printing.\n" + " -r\t\tPrint everything in raw mode.\n" ,stdout); puts("\nInvidual commands must be separated with spaces.\n"); @@ -553,9 +554,15 @@ void print_color(int color) } } -/* this hacky mess might use some optmizing */ +/* this hacky mess might use some optimizing */ void packet_print(rc_packet *packet) { + if (raw_output == 1) { + for(int i = 0; packet->data[i] != 0; ++i) putchar(packet->data[i]); + + return; + } + int i; int def_color = 0;