diff options
Diffstat (limited to 'src/irc')
-rw-r--r-- | src/irc/irc-commands.c | 1 | ||||
-rw-r--r-- | src/irc/irc-recv.c | 41 | ||||
-rw-r--r-- | src/irc/irc.h | 1 |
3 files changed, 43 insertions, 0 deletions
diff --git a/src/irc/irc-commands.c b/src/irc/irc-commands.c index af048bff8..904a54e98 100644 --- a/src/irc/irc-commands.c +++ b/src/irc/irc-commands.c @@ -443,5 +443,6 @@ t_irc_command irc_commands[] = "", "", 0, MAX_ARGS, 1, NULL, NULL, irc_cmd_recv_error }, { "502", N_("can't change mode for other users"), "", "", 0, MAX_ARGS, 1, NULL, NULL, irc_cmd_recv_error }, + { "671", N_("whois (secure connection)"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_671 }, { NULL, NULL, NULL, NULL, 0, 0, 1, NULL, NULL, NULL } }; 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; +} diff --git a/src/irc/irc.h b/src/irc/irc.h index 5a16ac9ab..73da3e2d0 100644 --- a/src/irc/irc.h +++ b/src/irc/irc.h @@ -429,5 +429,6 @@ extern int irc_cmd_recv_367 (t_irc_server *, char *, char *); extern int irc_cmd_recv_368 (t_irc_server *, char *, char *); extern int irc_cmd_recv_433 (t_irc_server *, char *, char *); extern int irc_cmd_recv_438 (t_irc_server *, char *, char *); +extern int irc_cmd_recv_671 (t_irc_server *, char *, char *); #endif /* irc.h */ |