summaryrefslogtreecommitdiff
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
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).
-rw-r--r--ChangeLog.asciidoc2
-rw-r--r--src/plugins/irc/irc-message.c6
2 files changed, 8 insertions, 0 deletions
diff --git a/ChangeLog.asciidoc b/ChangeLog.asciidoc
index 41b54199a..00eb7c459 100644
--- a/ChangeLog.asciidoc
+++ b/ChangeLog.asciidoc
@@ -106,6 +106,8 @@ http://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes]
* alias: change default command for alias /beep to "/print -beep"
* exec: add exec plugin: new command /exec and file exec.conf
* guile: fix module used after unload of a script
+* irc: fix extract of channel in parser for JOIN/PART messages when there is a
+ colon before the channel name (closes #83)
* irc: fix duplicate sender name in display of notice (closes #87)
* irc: fix refresh of buffer name in bar items after join/part/kick/kill
(closes #86)
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))