diff --git a/ChangeLog.adoc b/ChangeLog.adoc index a57de7dc5..3987fe3f0 100644 --- a/ChangeLog.adoc +++ b/ChangeLog.adoc @@ -22,6 +22,10 @@ New features:: * api: add user variables in evaluation of expressions with "define:name,value" +Bug fixes:: + + * irc: fix parsing of TAGMSG message when there is a colon before the channel + [[v3.3]] == Version 3.3 (2021-09-19) diff --git a/src/plugins/irc/irc-protocol.c b/src/plugins/irc/irc-protocol.c index 808f14f31..624a126df 100644 --- a/src/plugins/irc/irc-protocol.c +++ b/src/plugins/irc/irc-protocol.c @@ -2978,12 +2978,14 @@ IRC_PROTOCOL_CALLBACK(setname) * * Message looks like: * @msgid=6gqz7dxd22v7r3x9pvu;+typing=active :nick!user@host TAGMSG #channel + * @msgid=6gqz7dxd22v7r3x9pvu;+typing=active :nick!user@host TAGMSG :#channel */ IRC_PROTOCOL_CALLBACK(tagmsg) { struct t_irc_channel *ptr_channel; const char *ptr_typing_value; + char *pos_channel; int state; IRC_PROTOCOL_MIN_ARGS(3); @@ -2994,10 +2996,12 @@ IRC_PROTOCOL_CALLBACK(tagmsg) if (!tags) return WEECHAT_RC_OK; + pos_channel = (argv[2][0] == ':') ? argv[2] + 1 : argv[2]; + ptr_channel = NULL; - if (irc_channel_is_channel (server, argv[2])) - ptr_channel = irc_channel_search (server, argv[2]); - else if (irc_server_strcasecmp (server, argv[2], server->nick) == 0) + if (irc_channel_is_channel (server, pos_channel)) + ptr_channel = irc_channel_search (server, pos_channel); + else if (irc_server_strcasecmp (server, pos_channel, server->nick) == 0) ptr_channel = irc_channel_search (server, nick); if (!ptr_channel) return WEECHAT_RC_OK;