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

irc: add alias "whois" for target buffer of messages 401/402 (closes #54)

This commit is contained in:
Sébastien Helleu
2014-04-13 11:22:22 +02:00
parent a311764d12
commit 417811ba01
8 changed files with 41 additions and 15 deletions
+20 -15
View File
@@ -508,21 +508,26 @@ IRC_PROTOCOL_CALLBACK(generic_error)
ptr_buffer = (ptr_channel) ? ptr_channel->buffer : server->buffer;
weechat_printf_date_tags (irc_msgbuffer_get_target_buffer (server, NULL,
command, NULL,
ptr_buffer),
date,
irc_protocol_tags (command, NULL, NULL, NULL),
"%s%s%s%s%s%s",
weechat_prefix ("network"),
(ptr_channel && chan_nick
&& (irc_server_strcasecmp (server, chan_nick,
ptr_channel->name) == 0)) ?
IRC_COLOR_CHAT_CHANNEL : "",
(chan_nick) ? chan_nick : "",
IRC_COLOR_RESET,
(chan_nick) ? ": " : "",
args);
weechat_printf_date_tags (
irc_msgbuffer_get_target_buffer (
server,
NULL,
command,
((strcmp (command, "401") == 0) || (strcmp (command, "402") == 0)) ?
"whois" : NULL,
ptr_buffer),
date,
irc_protocol_tags (command, NULL, NULL, NULL),
"%s%s%s%s%s%s",
weechat_prefix ("network"),
(ptr_channel && chan_nick
&& (irc_server_strcasecmp (server, chan_nick,
ptr_channel->name) == 0)) ?
IRC_COLOR_CHAT_CHANNEL : "",
(chan_nick) ? chan_nick : "",
IRC_COLOR_RESET,
(chan_nick) ? ": " : "",
args);
return WEECHAT_RC_OK;
}