summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2014-05-28 20:11:12 +0200
committerSébastien Helleu <flashcode@flashtux.org>2014-05-28 20:11:12 +0200
commitfe872f26d4b62c09dd017094492f3b2712e1a0f2 (patch)
tree0561cf55614849024cf20409eb50ea152caa6fe2 /src
parent061b8b76b64faf7ccbfee0f8277d81cb7ed5f47c (diff)
downloadweechat-fe872f26d4b62c09dd017094492f3b2712e1a0f2.zip
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).
Diffstat (limited to 'src')
-rw-r--r--src/plugins/irc/irc-message.c6
1 files changed, 6 insertions, 0 deletions
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))