summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMax Teufel <max@teufelsnetz.com>2015-02-09 20:04:46 +0100
committerSébastien Helleu <flashcode@flashtux.org>2015-02-15 15:32:07 +0100
commit1d8e6c10d765a59986bc6cb3ee03a643ee83dfd3 (patch)
tree8214e257d6ce9ba7172b87024084e4673db3c3b7 /src
parent07c7ecb6797eddaca3bd834520e112248743feb9 (diff)
downloadweechat-1d8e6c10d765a59986bc6cb3ee03a643ee83dfd3.zip
irc: format IRC message 008 (RPL_SNOMASK) (closes #144)
Diffstat (limited to 'src')
-rw-r--r--src/plugins/irc/irc-protocol.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/plugins/irc/irc-protocol.c b/src/plugins/irc/irc-protocol.c
index 87b1a7d5a..25acbc6be 100644
--- a/src/plugins/irc/irc-protocol.c
+++ b/src/plugins/irc/irc-protocol.c
@@ -2556,6 +2556,34 @@ IRC_PROTOCOL_CALLBACK(005)
}
/*
+ * 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.
*
* Message looks like:
@@ -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 },