1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-25 12:26:40 +02:00

irc: format IRC message 008 (RPL_SNOMASK) (closes #144)

This commit is contained in:
Max Teufel
2015-02-09 20:04:46 +01:00
committed by Sébastien Helleu
parent 07c7ecb679
commit 1d8e6c10d7
+29
View File
@@ -2555,6 +2555,34 @@ IRC_PROTOCOL_CALLBACK(005)
return WEECHAT_RC_OK;
}
/*
* Callback for the IRC message "008": server notice mask.
*
* Message looks like:
* :server 008 nick +Zbfkrsuy :Server notice mask
*/
IRC_PROTOCOL_CALLBACK(008)
{
IRC_PROTOCOL_MIN_ARGS(4);
weechat_printf_date_tags (
irc_msgbuffer_get_target_buffer (server, argv[2], command, NULL, NULL),
date,
irc_protocol_tags (command, "irc_numeric", NULL, address),
_("%sServer notice mask for %s%s%s is %s[%s%s%s]"),
weechat_prefix ("network"),
irc_nick_color_for_msg (server, 1, NULL, argv[2]),
argv[2],
IRC_COLOR_RESET,
IRC_COLOR_CHAT_DELIMITERS,
IRC_COLOR_RESET,
(argv[3][0] == ':') ? argv[3] + 1 : argv[3],
IRC_COLOR_CHAT_DELIMITERS);
return WEECHAT_RC_OK;
}
/*
* Callback for the IRC message "221": user mode string.
*
@@ -5428,6 +5456,7 @@ irc_protocol_recv_command (struct t_irc_server *server,
"for themselves */ 1, 1, &irc_protocol_cb_wallops },
{ "001", /* a server message */ 1, 0, &irc_protocol_cb_001 },
{ "005", /* a server message */ 1, 0, &irc_protocol_cb_005 },
{ "008", /* server notice mask */ 1, 0, &irc_protocol_cb_008 },
{ "221", /* user mode string */ 1, 0, &irc_protocol_cb_221 },
{ "223", /* whois (charset is) */ 1, 0, &irc_protocol_cb_whois_nick_msg },
{ "264", /* whois (is using encrypted connection) */ 1, 0, &irc_protocol_cb_whois_nick_msg },