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

irc: fix display of self CTCP message containing bold attribute (issue #1981)

This commit is contained in:
Sébastien Helleu
2023-07-18 18:48:48 +02:00
parent 7aa490e360
commit ef68312393
3 changed files with 20 additions and 15 deletions
+5
View File
@@ -10,6 +10,11 @@ This document lists all the changes for each version. +
For a list of important changes that require manual actions, please look at release notes.
[[v4.0.3]]
== Version 4.0.3 (under dev)
* irc: fix display of self CTCP message containing bold attribute (issue #1981)
[[v4.0.2]]
== Version 4.0.2 (2023-07-12)
+1 -1
View File
@@ -2995,7 +2995,7 @@ irc_protocol_privmsg_display_ctcp_send (struct t_irc_server *server,
if (!arguments || !arguments[0])
return;
pos_end = strchr (arguments + 1, '\01');
pos_end = strrchr (arguments + 1, '\01');
if (!pos_end)
return;
+14 -14
View File
@@ -2423,7 +2423,7 @@ TEST(IrcProtocolWithServer, notice)
/*
* notice to channel/user from self nick
* (case of bouncer of if echo-message capability is enabled)
* (case of bouncer or if echo-message capability is enabled)
*/
RECV(":alice!user@host NOTICE #test :a notice ");
CHECK_CHAN("--", "Notice(alice) -> #test: a notice ",
@@ -2440,7 +2440,7 @@ TEST(IrcProtocolWithServer, notice)
/*
* notice to ops of channel from self nick
* (case of bouncer of if echo-message capability is enabled)
* (case of bouncer or if echo-message capability is enabled)
*/
RECV(":alice!user@host NOTICE @#test :a notice ");
CHECK_CHAN("--", "Notice(alice) -> @#test: a notice ",
@@ -2449,7 +2449,7 @@ TEST(IrcProtocolWithServer, notice)
/*
* notice from self nick
* (case of bouncer of if echo-message capability is enabled)
* (case of bouncer or if echo-message capability is enabled)
*/
RECV(":alice!user@host NOTICE alice :a notice ");
CHECK_SRV("--", "Notice -> alice: a notice ",
@@ -2743,7 +2743,7 @@ TEST(IrcProtocolWithServer, privmsg)
/*
* message to channel/user from self nick
* (case of bouncer of if echo-message capability is enabled)
* (case of bouncer or if echo-message capability is enabled)
*/
RECV(":alice!user@host PRIVMSG #test :this is the message ");
CHECK_CHAN("alice", "this is the message ",
@@ -2757,7 +2757,7 @@ TEST(IrcProtocolWithServer, privmsg)
/*
* message to ops of channel from self nick
* (case of bouncer of if echo-message capability is enabled)
* (case of bouncer or if echo-message capability is enabled)
*/
RECV(":alice!user@host PRIVMSG @#test :this is the message ");
CHECK_CHAN("--", "Msg(alice) -> @#test: this is the message ",
@@ -2766,7 +2766,7 @@ TEST(IrcProtocolWithServer, privmsg)
/*
* message from self nick in private
* (case of bouncer of if echo-message capability is enabled)
* (case of bouncer or if echo-message capability is enabled)
*/
RECV(":alice!user@host PRIVMSG alice :this is the message ");
CHECK_PV("alice", "alice", "this is the message ",
@@ -2775,7 +2775,7 @@ TEST(IrcProtocolWithServer, privmsg)
/*
* message from self nick in private, with password hidden (nickserv)
* (case of bouncer of if echo-message capability is enabled)
* (case of bouncer or if echo-message capability is enabled)
*/
RECV(":alice!user@host PRIVMSG nickserv :identify secret");
CHECK_PV("nickserv", "alice", "identify ******",
@@ -2865,8 +2865,8 @@ TEST(IrcProtocolWithServer, privmsg)
CHECK_CHAN(" *", "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(" *", "bob is testing",
RECV(":bob!user@host PRIVMSG #test :\01ACTION is testing with \02bold\02\01");
CHECK_CHAN(" *", "bob is testing with bold",
"irc_privmsg,irc_action,notify_message,nick_bob,"
"host_user@host,log1");
RECV(":bob!user@host PRIVMSG #test :\01VERSION\01");
@@ -2884,7 +2884,7 @@ TEST(IrcProtocolWithServer, privmsg)
/*
* valid CTCP to channel from self nick
* (case of bouncer of if echo-message capability is enabled)
* (case of bouncer or if echo-message capability is enabled)
*/
RECV(":alice!user@host PRIVMSG #test :\01VERSION\01");
CHECK_CHAN("--", "CTCP query to #test: VERSION",
@@ -2894,14 +2894,14 @@ TEST(IrcProtocolWithServer, privmsg)
CHECK_CHAN(" *", "alice",
"irc_privmsg,irc_action,self_msg,notify_none,no_highlight,"
"nick_alice,host_user@host,log1");
RECV(":alice!user@host PRIVMSG #test :\01ACTION is testing\01");
CHECK_CHAN(" *", "alice is testing",
RECV(":alice!user@host PRIVMSG #test :\01ACTION is testing with \02bold\02\01");
CHECK_CHAN(" *", "alice is testing with bold",
"irc_privmsg,irc_action,self_msg,notify_none,no_highlight,"
"nick_alice,host_user@host,log1");
/*
* valid CTCP to ops of channel from self nick
* (case of bouncer of if echo-message capability is enabled)
* (case of bouncer or if echo-message capability is enabled)
*/
RECV(":alice!user@host PRIVMSG @#test :\01ACTION\01");
CHECK_CHAN("--", "Action -> @#test: alice",
@@ -2948,7 +2948,7 @@ TEST(IrcProtocolWithServer, privmsg)
/*
* valid CTCP to channel from self nick
* (case of bouncer of if echo-message capability is enabled)
* (case of bouncer or if echo-message capability is enabled)
*/
RECV(":alice!user@host PRIVMSG alice :\01CLIENTINFO\01");
if (i == 0)