diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2014-04-13 11:22:22 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2014-04-13 11:22:22 +0200 |
commit | 417811ba018f02ec0110f1b9899e17dcd2b394f7 (patch) | |
tree | fa80aa060ae40cd7b9a1410411c76b98f25660e7 /src | |
parent | a311764d1263f41fb1d6895013d34d2fe0a6477d (diff) | |
download | weechat-417811ba018f02ec0110f1b9899e17dcd2b394f7.zip |
irc: add alias "whois" for target buffer of messages 401/402 (closes #54)
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/irc/irc-protocol.c | 35 |
1 files changed, 20 insertions, 15 deletions
diff --git a/src/plugins/irc/irc-protocol.c b/src/plugins/irc/irc-protocol.c index 274c7805d..f4243c39a 100644 --- a/src/plugins/irc/irc-protocol.c +++ b/src/plugins/irc/irc-protocol.c @@ -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; } |