mirror of
https://github.com/weechat/weechat.git
synced 2026-06-25 12:26:40 +02:00
irc: fix display of outgoing CTCP when channel/private buffer doesn't exist
This commit is contained in:
@@ -1300,16 +1300,20 @@ irc_ctcp_display_send (struct t_irc_server *server,
|
||||
const char *target, const char *type, const char *args)
|
||||
{
|
||||
struct t_irc_nick *ptr_nick;
|
||||
int is_channel;
|
||||
|
||||
if (weechat_strcasecmp (type, "action") == 0)
|
||||
{
|
||||
if (channel
|
||||
&& irc_server_prefix_char_statusmsg (server, target[0]))
|
||||
if (!channel || irc_server_prefix_char_statusmsg (server, target[0]))
|
||||
{
|
||||
/* STATUSMSG action */
|
||||
/* no buffer or STATUSMSG action */
|
||||
is_channel = ((irc_server_prefix_char_statusmsg (server, target[0])
|
||||
&& irc_channel_is_channel (server, target + 1))
|
||||
|| irc_channel_is_channel (server, target));
|
||||
ptr_nick = irc_nick_search (server, channel, server->nick);
|
||||
weechat_printf_date_tags (
|
||||
channel->buffer,
|
||||
(channel) ? channel->buffer : irc_msgbuffer_get_target_buffer (
|
||||
server, target, NULL, "ctcp", NULL),
|
||||
0,
|
||||
irc_protocol_tags (
|
||||
server,
|
||||
@@ -1322,7 +1326,8 @@ irc_ctcp_display_send (struct t_irc_server *server,
|
||||
weechat_prefix ("network"),
|
||||
/* TRANSLATORS: "Action" is an IRC CTCP "ACTION" sent with /me */
|
||||
_("Action"),
|
||||
IRC_COLOR_CHAT_CHANNEL,
|
||||
(is_channel) ?
|
||||
IRC_COLOR_CHAT_CHANNEL : irc_nick_color_for_msg (server, 0, NULL, target),
|
||||
target,
|
||||
IRC_COLOR_RESET,
|
||||
irc_nick_mode_for_display (server, ptr_nick, 0),
|
||||
|
||||
Reference in New Issue
Block a user