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:
2026-02-25 02:12:10 -07:00
parent fd48c97209
commit 7c9c615aed

View File

@@ -39,13 +39,11 @@ gboolean irc_parse_message(const char *words[],
if (prefix) *prefix = NULL; if (prefix) *prefix = NULL;
if (command) *command = NULL; if (command) *command = NULL;
/* See if the message starts with a prefix (sender user) */
if (words[w][0] == ':') { if (words[w][0] == ':') {
if (prefix) *prefix = &words[w][1]; if (prefix) *prefix = &words[w][1];
w++; w++;
} }
/* Check command */
if (words[w][0] == '\0') return FALSE; if (words[w][0] == '\0') return FALSE;
if (command) *command = words[w]; if (command) *command = words[w];
w++; w++;
@@ -72,11 +70,9 @@ char *irc_prefix_get_nick(const char *prefix) {
if (!prefix) return NULL; if (!prefix) return NULL;
/* Find end of nick */
end = prefix; end = prefix;
while (*end != '\0' && *end != '!' && *end != '@') end++; while (*end != '\0' && *end != '!' && *end != '@') end++;
/* Allocate string */
length = end - prefix; length = end - prefix;
return g_strndup (prefix, length); return g_strndup (prefix, length);
} }