| summaryrefslogtreecommitdiff |
diff options
Diffstat (limited to 'src/io/network.c')
| -rw-r--r-- | src/io/network.c | 15 |
1 files changed, 15 insertions, 0 deletions
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; |


