1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-03 08:13:14 +02:00

irc: display STATUSMSG actions differently from standard actions on channels (closes #1577, issue #139)

This commit is contained in:
Sébastien Helleu
2023-05-27 09:32:52 +02:00
parent 93d447ffc7
commit 0babf5db23
20 changed files with 251 additions and 158 deletions
+8 -5
View File
@@ -1850,6 +1850,7 @@ IRC_COMMAND_CALLBACK(connect)
IRC_COMMAND_CALLBACK(ctcp)
{
struct t_irc_channel *ptr_channel_target;
char **targets, *ctcp_type, str_time[512];
const char *ctcp_target, *ctcp_args;
int num_targets, arg_target, arg_type, arg_args, i;
@@ -1932,12 +1933,14 @@ IRC_COMMAND_CALLBACK(ctcp)
/* display message only if capability "echo-message" is NOT enabled */
if (!weechat_hashtable_has_key (ptr_server->cap_list, "echo-message"))
{
irc_ctcp_display_send (
ptr_channel_target = irc_channel_search (
ptr_server,
irc_channel_search (ptr_server, ctcp_target),
ctcp_target,
ctcp_type,
ctcp_args);
(irc_server_prefix_char_statusmsg (ptr_server,
ctcp_target[0])
&& irc_channel_is_channel (ptr_server, ctcp_target + 1)) ?
ctcp_target + 1 : ctcp_target);
irc_ctcp_display_send (ptr_server, ptr_channel_target,
ctcp_target, ctcp_type, ctcp_args);
}
irc_ctcp_send (ptr_server, ctcp_target, ctcp_type, ctcp_args);
}