Minimal message-tags handling - just skip the @ part

This adds support for the ircv3.2 message-tags wire format without
actually parsing any of the tags or adding any interface to process them
(other than the 'server incoming' signal).

The API for this stuff can be decided later.
This commit is contained in:
dequis 2016-11-17 12:29:42 -03:00
commit 95c3099d7d

View file

@ -318,7 +318,16 @@ static char *irc_parse_prefix(char *line, char **nick, char **address)
*nick = *address = NULL; *nick = *address = NULL;
/* :<nick> [["!" <user>] "@" <host>] SPACE */ /* [@tags] :<nick> [["!" <user>] "@" <host>] SPACE */
if (*line == '@') {
while (*line != '\0' && *line != ' ')
line++;
if (*line == ' ') {
*line++ = '\0';
while (*line == ' ') line++;
}
}
if (*line != ':') if (*line != ':')
return line; return line;