mirror of
https://github.com/weechat/weechat.git
synced 2026-07-06 09:43:13 +02:00
irc: fix display of outgoing STATUSMSG CTCP ACTION without arguments
This commit is contained in:
@@ -1318,7 +1318,7 @@ irc_ctcp_display_send (struct t_irc_server *server,
|
||||
"irc_action,self_msg,notify_none,no_highlight",
|
||||
server->nick,
|
||||
NULL),
|
||||
"%s%s -> %s%s%s: %s%s%s%s %s",
|
||||
"%s%s -> %s%s%s: %s%s%s%s%s%s",
|
||||
weechat_prefix ("network"),
|
||||
/* TRANSLATORS: "Action" is an IRC CTCP "ACTION" sent with /me */
|
||||
_("Action"),
|
||||
@@ -1328,8 +1328,9 @@ irc_ctcp_display_send (struct t_irc_server *server,
|
||||
irc_nick_mode_for_display (server, ptr_nick, 0),
|
||||
IRC_COLOR_CHAT_NICK_SELF,
|
||||
server->nick,
|
||||
IRC_COLOR_RESET,
|
||||
args);
|
||||
(args && args[0]) ? IRC_COLOR_RESET : "",
|
||||
(args && args[0]) ? " " : "",
|
||||
(args && args[0]) ? args : "");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user