diff options
Diffstat (limited to '')
-rw-r--r-- | protocols/inspircd2.c | 8 | ||||
-rw-r--r-- | protocols/inspircd3.c | 8 | ||||
-rw-r--r-- | protocols/inspircd4.c | 8 |
3 files changed, 9 insertions, 15 deletions
diff --git a/protocols/inspircd2.c b/protocols/inspircd2.c index 263f475..4a59c10 100644 --- a/protocols/inspircd2.c +++ b/protocols/inspircd2.c @@ -364,16 +364,14 @@ void * inspircd2_protocol_connection(void *type) { size_t argc = 0; size_t old_offset = offset; while (offset < msg_len) { - if (full_msg.data[offset] == ':') { - argc++; + argc++; + + if (full_msg.data[offset] == ':') break; - } while (offset < msg_len && full_msg.data[offset] != ' ') offset++; - argc++; - while (offset < msg_len && full_msg.data[offset] == ' ') offset++; } diff --git a/protocols/inspircd3.c b/protocols/inspircd3.c index 258767e..8f92fb8 100644 --- a/protocols/inspircd3.c +++ b/protocols/inspircd3.c @@ -353,16 +353,14 @@ void * inspircd3_protocol_connection(void *type) { size_t argc = 0; size_t old_offset = offset; while (offset < msg_len) { - if (full_msg.data[offset] == ':') { - argc++; + argc++; + + if (full_msg.data[offset] == ':') break; - } while (offset < msg_len && full_msg.data[offset] != ' ') offset++; - argc++; - while (offset < msg_len && full_msg.data[offset] == ' ') offset++; } diff --git a/protocols/inspircd4.c b/protocols/inspircd4.c index 8835b38..74f8a73 100644 --- a/protocols/inspircd4.c +++ b/protocols/inspircd4.c @@ -354,16 +354,14 @@ void * inspircd4_protocol_connection(void *type) { size_t argc = 0; size_t old_offset = offset; while (offset < msg_len) { - if (full_msg.data[offset] == ':') { - argc++; + argc++; + + if (full_msg.data[offset] == ':') break; - } while (offset < msg_len && full_msg.data[offset] != ' ') offset++; - argc++; - while (offset < msg_len && full_msg.data[offset] == ' ') offset++; } |