mirror of
https://github.com/weechat/weechat.git
synced 2026-06-27 21:36:37 +02:00
irc: fix colors in message with CTCP reply sent to another user
This commit is contained in:
@@ -41,6 +41,7 @@ http://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes]
|
||||
* api: add integer return code for functions hook_{signal|hsignal}_send
|
||||
* alias: change default command for alias /beep to "/print -beep"
|
||||
* guile: fix module used after unload of a script
|
||||
* irc: fix colors in message with CTCP reply sent to another user
|
||||
* irc: evaluate content of server options "username" and "realname"
|
||||
* irc: set option irc.network.autoreconnect_delay_max to 600 by default,
|
||||
increase max value to 604800 seconds (7 days)
|
||||
|
||||
@@ -278,6 +278,7 @@ irc_ctcp_reply_to_nick (struct t_irc_server *server,
|
||||
int number;
|
||||
char hash_key[32];
|
||||
const char *str_args;
|
||||
char *str_args_color;
|
||||
|
||||
hashtable = irc_server_sendf (server,
|
||||
IRC_SERVER_SEND_OUTQ_PRIO_LOW | IRC_SERVER_SEND_RETURN_HASHTABLE,
|
||||
@@ -298,6 +299,9 @@ irc_ctcp_reply_to_nick (struct t_irc_server *server,
|
||||
str_args = weechat_hashtable_get (hashtable, hash_key);
|
||||
if (!str_args)
|
||||
break;
|
||||
str_args_color = irc_color_decode (str_args, 1);
|
||||
if (!str_args_color)
|
||||
break;
|
||||
weechat_printf_tags (irc_msgbuffer_get_target_buffer (server,
|
||||
nick,
|
||||
NULL,
|
||||
@@ -315,9 +319,10 @@ irc_ctcp_reply_to_nick (struct t_irc_server *server,
|
||||
IRC_COLOR_RESET,
|
||||
IRC_COLOR_CHAT_CHANNEL,
|
||||
ctcp,
|
||||
(str_args[0]) ? IRC_COLOR_RESET : "",
|
||||
(str_args[0]) ? " " : "",
|
||||
str_args);
|
||||
(str_args_color[0]) ? IRC_COLOR_RESET : "",
|
||||
(str_args_color[0]) ? " " : "",
|
||||
str_args_color);
|
||||
free (str_args_color);
|
||||
number++;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user