From 16265ec44520c3926c11127d0a6a6bac82a53275 Mon Sep 17 00:00:00 2001 From: Nathanael Sensfelder Date: Wed, 8 Jun 2016 17:58:56 +0200 Subject: ZoO now appends anything it learns to a file. Also, removes the "pointing to [...]" message, which was used for debug purposes. --- src/io/network.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/io/network.c') diff --git a/src/io/network.c b/src/io/network.c index 45be5fb..0c9cf33 100644 --- a/src/io/network.c +++ b/src/io/network.c @@ -436,6 +436,21 @@ READ_NEW_MSG: if (ZoO_IS_PREFIX("JOIN", (net->in + cmd))) { + for (i = 1; (i < 512) && (net->in[i] != '!'); ++i) + { + } + + if ((i == 512) || (i == 1)) + { + ZoO_ERROR("Could not find JOIN username: %s", net->in); + + goto READ_NEW_MSG; + } + + *msg_offset = 1; + *msg_size = (i - 1); + net->in[i] = '\0'; + *type = ZoO_JOIN; return 0; -- cgit v1.2.3-70-g09d2