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

irc: fix display of STATUSMSG CTCP ACTION to channel with cap echo-message enabled (issue #139, issue #1577)

This commit is contained in:
Sébastien Helleu
2023-05-27 15:45:17 +02:00
parent a41dff7acc
commit 649b9d0ca6
2 changed files with 24 additions and 1 deletions
@@ -2676,6 +2676,16 @@ 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 ops of channel */
RECV(":bob!user@host PRIVMSG @#test :\01ACTION\01");
CHECK_CHAN("--", "Action -> @#test: bob",
"irc_privmsg,irc_action,notify_message,nick_bob,"
"host_user@host,log1");
RECV(":bob!user@host PRIVMSG @#test :\01ACTION is testing\01");
CHECK_CHAN("--", "Action -> @#test: bob is testing",
"irc_privmsg,irc_action,notify_message,nick_bob,"
"host_user@host,log1");
/*
* valid CTCP to channel from self nick
* (case of bouncer of if echo-message capability is enabled)
@@ -2684,6 +2694,19 @@ TEST(IrcProtocolWithServer, privmsg)
CHECK_SRV("--", "CTCP query to #test: VERSION",
"irc_privmsg,irc_ctcp,self_msg,notify_none,no_highlight,log1");
/*
* valid CTCP to ops of channel from self nick
* (case of bouncer of if echo-message capability is enabled)
*/
RECV(":alice!user@host PRIVMSG @#test :\01ACTION\01");
CHECK_CHAN("--", "Action -> @#test: alice",
"irc_privmsg,irc_action,self_msg,notify_none,no_highlight,"
"nick_alice,log1");
RECV(":alice!user@host PRIVMSG @#test :\01ACTION is testing\01");
CHECK_CHAN("--", "Action -> @#test: alice is testing",
"irc_privmsg,irc_action,self_msg,notify_none,no_highlight,"
"nick_alice,log1");
/* valid CTCP to user */
RECV(":bob!user@host PRIVMSG alice :\01TEST\01");
CHECK_SENT(NULL);