diff options
Diffstat (limited to 'src/plugins/irc/irc-protocol.c')
-rw-r--r-- | src/plugins/irc/irc-protocol.c | 10 |
1 files changed, 7 insertions, 3 deletions
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; |