From fe872f26d4b62c09dd017094492f3b2712e1a0f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Wed, 28 May 2014 20:11:12 +0200 Subject: irc: fix extract of channel in parser for JOIN/PART messages when there is a colon before the channel name (closes #83) The problem was only affecting scripts or triggers using the parser. The irc plugin does not use the "channel" variable built by the parser (when parsing JOIN/PART messages). --- src/plugins/irc/irc-message.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/plugins/irc/irc-message.c b/src/plugins/irc/irc-message.c index 8c3b842f2..7721c57b3 100644 --- a/src/plugins/irc/irc-message.c +++ b/src/plugins/irc/irc-message.c @@ -151,6 +151,12 @@ irc_message_parse (struct t_irc_server *server, const char *message, /* now we have: pos --> "#channel :hello!" */ if (arguments) *arguments = strdup (pos); + if ((pos[0] == ':') + && ((strncmp (ptr_message, "JOIN ", 5) == 0) + || (strncmp (ptr_message, "PART ", 5) == 0))) + { + pos++; + } if (pos[0] != ':') { if (irc_channel_is_channel (server, pos)) -- cgit v1.2.3