summaryrefslogtreecommitdiff
path: root/src/irc/irc-recv.c
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2005-04-28 18:34:12 +0000
committerSebastien Helleu <flashcode@flashtux.org>2005-04-28 18:34:12 +0000
commit40d02fdffd4789306bf9784f2af6fffa3f8ba610 (patch)
treecb22d352b062e637cfcbbedc81a8221e7ed1e9fc /src/irc/irc-recv.c
parent7cc2635652835ac44b980dfa16b14ab7215b5eec (diff)
downloadweechat-40d02fdffd4789306bf9784f2af6fffa3f8ba610.zip
Added IRC command "671"
Diffstat (limited to 'src/irc/irc-recv.c')
-rw-r--r--src/irc/irc-recv.c41
1 files changed, 41 insertions, 0 deletions
diff --git a/src/irc/irc-recv.c b/src/irc/irc-recv.c
index 9145e6ccb..8b7394366 100644
--- a/src/irc/irc-recv.c
+++ b/src/irc/irc-recv.c
@@ -3617,3 +3617,44 @@ irc_cmd_recv_438 (t_irc_server *server, char *host, char *arguments)
return 0;
}
+
+/*
+ * irc_cmd_recv_671: '671' command (whois, secure connection)
+ */
+
+int
+irc_cmd_recv_671 (t_irc_server *server, char *host, char *arguments)
+{
+ char *pos_nick, *pos_message;
+
+ /* make gcc happy */
+ (void) host;
+
+ pos_nick = strchr (arguments, ' ');
+ if (pos_nick)
+ {
+ while (pos_nick[0] == ' ')
+ pos_nick++;
+ pos_message = strchr (pos_nick, ' ');
+ if (pos_message)
+ {
+ pos_message[0] = '\0';
+ pos_message++;
+ while (pos_message[0] == ' ')
+ pos_message++;
+ if (pos_message[0] == ':')
+ pos_message++;
+
+ irc_display_prefix (server->buffer, PREFIX_SERVER);
+ gui_printf_color (server->buffer,
+ COLOR_WIN_CHAT_DARK, "[");
+ gui_printf_color (server->buffer,
+ COLOR_WIN_CHAT_NICK, "%s", pos_nick);
+ gui_printf_color (server->buffer,
+ COLOR_WIN_CHAT_DARK, "] ");
+ gui_printf_color (server->buffer,
+ COLOR_WIN_CHAT, "%s\n", pos_message);
+ }
+ }
+ return 0;
+}