From 95c3099d7d14d90bfeca9daf4266d6f4cbcfa4cd Mon Sep 17 00:00:00 2001 From: dequis Date: Thu, 17 Nov 2016 12:29:42 -0300 Subject: [PATCH] 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. --- src/irc/core/irc.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/irc/core/irc.c b/src/irc/core/irc.c index 4dce3fcf..3d32794e 100644 --- a/src/irc/core/irc.c +++ b/src/irc/core/irc.c @@ -318,7 +318,16 @@ static char *irc_parse_prefix(char *line, char **nick, char **address) *nick = *address = NULL; - /* : [["!" ] "@" ] SPACE */ + /* [@tags] : [["!" ] "@" ] SPACE */ + + if (*line == '@') { + while (*line != '\0' && *line != ' ') + line++; + if (*line == ' ') { + *line++ = '\0'; + while (*line == ' ') line++; + } + } if (*line != ':') return line;