1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-30 14:56:39 +02:00

irc: fix duplicated CTCP messages displayed when capability "echo-message" is enabled (issue #139)

This commit is contained in:
Sébastien Helleu
2023-05-25 21:51:00 +02:00
parent 809f59dfd1
commit d9789e522f
19 changed files with 211 additions and 108 deletions
@@ -2381,6 +2381,14 @@ TEST(IrcProtocolWithServer, privmsg)
RECV(":bob!user@host PRIVMSG #test :\01VERSION\01");
RECV(":bob!user@host PRIVMSG #test :\01DCC SEND file.txt 1 2 3\01");
/*
* valid CTCP to channel from self nick
* (case of bouncer of if echo-message capability is enabled)
*/
RECV(":alice!user@host PRIVMSG #test :\01VERSION\01");
CHECK_SRV("--", "CTCP query to #test: VERSION",
"irc_privmsg,irc_ctcp,self_msg,notify_none,no_highlight,log1");
/* valid CTCP to user */
RECV(":bob!user@host PRIVMSG alice :\01TEST\01");
CHECK_SENT(NULL);
@@ -2415,6 +2423,14 @@ TEST(IrcProtocolWithServer, privmsg)
"), name: file.txt, 3 bytes (protocol: dcc)");
CHECK_SENT(NULL);
/*
* valid CTCP to channel from self nick
* (case of bouncer of if echo-message capability is enabled)
*/
RECV(":alice!user@host PRIVMSG bob :\01VERSION\01");
CHECK_SRV("--", "CTCP query to bob: VERSION",
"irc_privmsg,irc_ctcp,self_msg,notify_none,no_highlight,log1");
/* close xfer buffer */
if (xfer_buffer)
gui_buffer_close (xfer_buffer);