diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2023-05-25 21:51:00 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2023-05-25 22:15:41 +0200 |
commit | d9789e522fd6120c7140a6d970503cc6433a6851 (patch) | |
tree | 2d29b76f40bcc325fef97060cff8645842b0c59f /tests/unit/plugins | |
parent | 809f59dfd1afabbd9f6728f5eddbcec0e92ce697 (diff) | |
download | weechat-d9789e522fd6120c7140a6d970503cc6433a6851.zip |
irc: fix duplicated CTCP messages displayed when capability "echo-message" is enabled (issue #139)
Diffstat (limited to 'tests/unit/plugins')
-rw-r--r-- | tests/unit/plugins/irc/test-irc-protocol.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/unit/plugins/irc/test-irc-protocol.cpp b/tests/unit/plugins/irc/test-irc-protocol.cpp index b16818381..50549d984 100644 --- a/tests/unit/plugins/irc/test-irc-protocol.cpp +++ b/tests/unit/plugins/irc/test-irc-protocol.cpp @@ -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); |