1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-01 23:36:37 +02:00

irc: fix display of outgoing STATUSMSG CTCP ACTION without arguments

This commit is contained in:
Sébastien Helleu
2023-05-27 11:57:17 +02:00
parent dbcb8d3dbf
commit 3a0141174b
2 changed files with 39 additions and 4 deletions
+35 -1
View File
@@ -675,6 +675,13 @@ TEST(IrcProtocolWithServer, SendMessagesWithoutEchoMessage)
"irc_privmsg,irc_action,self_msg,notify_none,no_highlight,"
"nick_alice,log1");
/* action on channel (with /me), no message */
server_input_data (buffer_chan, "/me");
CHECK_SENT("PRIVMSG #test :\01ACTION\01");
CHECK_CHAN(" *", "alice",
"irc_privmsg,irc_action,self_msg,notify_none,no_highlight,"
"nick_alice,log1");
/* action on channel (with /ctcp <channel> action) */
server_input_data (buffer_server, "/ctcp #test action action chan 2");
CHECK_SENT("PRIVMSG #test :\01ACTION action chan 2\01");
@@ -682,6 +689,13 @@ TEST(IrcProtocolWithServer, SendMessagesWithoutEchoMessage)
"irc_privmsg,irc_action,self_msg,notify_none,no_highlight,"
"nick_alice,log1");
/* action on channel (with /ctcp <channel> action), no message */
server_input_data (buffer_server, "/ctcp #test action");
CHECK_SENT("PRIVMSG #test :\01ACTION\01");
CHECK_CHAN(" *", "alice",
"irc_privmsg,irc_action,self_msg,notify_none,no_highlight,"
"nick_alice,log1");
/* STATUSMSG action on channel (with /ctcp @<channel> action) */
server_input_data (buffer_server, "/ctcp @#test action action chan ops");
CHECK_SENT("PRIVMSG @#test :\01ACTION action chan ops\01");
@@ -761,6 +775,11 @@ TEST(IrcProtocolWithServer, SendMessagesWithEchoMessage)
CHECK_SENT("PRIVMSG #test :msg chan 2");
CHECK_NO_MSG;
/* STATUSMSG message to channel (with /msg @<channel>) */
server_input_data (buffer_server, "/msg @#test msg chan ops");
CHECK_SENT("PRIVMSG @#test :msg chan ops");
CHECK_NO_MSG;
/* message to a nick (text in private buffer) */
server_input_data (buffer_pv, "msg pv 1");
CHECK_SENT("PRIVMSG bob :msg pv 1");
@@ -776,6 +795,11 @@ TEST(IrcProtocolWithServer, SendMessagesWithEchoMessage)
CHECK_SENT("NOTICE #test :notice chan");
CHECK_NO_MSG;
/* STATUSMSG notice to channel */
server_input_data (buffer_server, "/notice @#test notice chan ops");
CHECK_SENT("NOTICE @#test :notice chan ops");
CHECK_NO_MSG;
/* notice to a nick */
server_input_data (buffer_server, "/notice bob notice pv");
CHECK_SENT("NOTICE bob :notice pv");
@@ -786,11 +810,21 @@ TEST(IrcProtocolWithServer, SendMessagesWithEchoMessage)
CHECK_SENT("PRIVMSG #test :\01ACTION action chan 1\01");
CHECK_NO_MSG;
/* action on channel (with /ctcp) */
/* action on channel (with /me), no message */
server_input_data (buffer_chan, "/me");
CHECK_SENT("PRIVMSG #test :\01ACTION\01");
CHECK_NO_MSG;
/* action on channel (with /ctcp <channel> action) */
server_input_data (buffer_server, "/ctcp #test ACTION action chan 2");
CHECK_SENT("PRIVMSG #test :\01ACTION action chan 2\01");
CHECK_NO_MSG;
/* STATUSMSG action on channel (with /ctcp @<channel> action) */
server_input_data (buffer_server, "/ctcp @#test action action chan ops");
CHECK_SENT("PRIVMSG @#test :\01ACTION action chan ops\01");
CHECK_NO_MSG;
/* action in private (with /me) */
server_input_data (buffer_pv, "/me action pv 1");
CHECK_SENT("PRIVMSG bob :\01ACTION action pv 1\01");