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

irc: fix colors in MODE message (issue #2286)

This commit is contained in:
Sébastien Helleu
2025-11-22 10:31:57 +01:00
parent 790ce13843
commit e33ed57b47
3 changed files with 12 additions and 2 deletions
+1 -1
View File
@@ -41,7 +41,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
- api: fix parsing of date/times with timezone offset in function util_parse_time
- irc: fix warning on creation of irc.msgbuffer option when the server name contains upper case letters ([#2281](https://github.com/weechat/weechat/issues/2281))
- irc: display a warning for each unknown or invalid server option in commands /connect and /server
- irc: fix colors in ban mask (message 367) and quiet mask (message 728) ([#2286](https://github.com/weechat/weechat/issues/2286))
- irc: fix colors in messages 367 (ban mask), 728 (quiet mask) and MODE ([#2286](https://github.com/weechat/weechat/issues/2286))
- relay/api: fix crash when an invalid HTTP request is received from a client
- relay/api: return HTTP error 404 instead of 400 when the buffer is not found in resources completion and input
- relay/api: return HTTP error 400 in case of invalid body in resource ping
+1 -1
View File
@@ -2199,7 +2199,7 @@ IRC_PROTOCOL_CALLBACK(mode)
IRC_COLOR_RESET,
ctxt->params[1], /* mode */
(modes_args && modes_args[0]) ? " " : "",
(modes_args && modes_args[0]) ? modes_args : "",
(modes_args && modes_args[0]) ? IRC_COLOR_MSG(modes_args) : "",
IRC_COLOR_CHAT_DELIMITERS,
IRC_COLOR_RESET,
irc_nick_color_for_msg (ctxt->server, 1, ptr_nick, ctxt->nick),
@@ -2316,6 +2316,16 @@ TEST(IrcProtocolWithServer, mode)
"irc_mode,nick_admin,host_user@host,log3");
STRCMP_EQUAL(NULL, ptr_channel->modes);
/* ban added on channel */
RECV(":admin!user@host MODE #test +b bob!user_\00304red@host_\00304red");
CHECK_CHAN("--", "Mode #test [+b bob!user_red@host_red] by admin",
"irc_mode,nick_admin,host_user@host,log3");
/* ban removed from channel */
RECV(":admin!user@host MODE #test -b bob!user_\00304red@host_\00304red");
CHECK_CHAN("--", "Mode #test [-b bob!user_red@host_red] by admin",
"irc_mode,nick_admin,host_user@host,log3");
/* nick mode '@' on channel #test */
RECV(":admin!user@host MODE #test +o alice ");
CHECK_CHAN("--", "Mode #test [+o alice] by admin",