mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-10 07:50:19 +00:00
Removed redundant inline comments from the fishlim IRC parsing helpers where the comments only repeated obvious code behavior, while preserving all function docblocks and logic.
This commit is contained in:
@@ -39,13 +39,11 @@ gboolean irc_parse_message(const char *words[],
|
||||
if (prefix) *prefix = NULL;
|
||||
if (command) *command = NULL;
|
||||
|
||||
/* See if the message starts with a prefix (sender user) */
|
||||
if (words[w][0] == ':') {
|
||||
if (prefix) *prefix = &words[w][1];
|
||||
w++;
|
||||
}
|
||||
|
||||
/* Check command */
|
||||
if (words[w][0] == '\0') return FALSE;
|
||||
if (command) *command = words[w];
|
||||
w++;
|
||||
@@ -72,11 +70,9 @@ char *irc_prefix_get_nick(const char *prefix) {
|
||||
|
||||
if (!prefix) return NULL;
|
||||
|
||||
/* Find end of nick */
|
||||
end = prefix;
|
||||
while (*end != '\0' && *end != '!' && *end != '@') end++;
|
||||
|
||||
/* Allocate string */
|
||||
length = end - prefix;
|
||||
return g_strndup (prefix, length);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user