diff options
author | Timo Sirainen <cras@irssi.org> | 2004-03-23 20:47:51 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2004-03-23 20:47:51 +0000 |
commit | 501dc3494e604543b531a76efb1c5dd88d94a4eb (patch) | |
tree | 3b2a333960221bd09c4598b1548e24374c840281 /src/irc | |
parent | 622be3f82288d65fa4e1a75bb936d72603ec223b (diff) | |
download | irssi-501dc3494e604543b531a76efb1c5dd88d94a4eb.zip |
/WHOIS -<server tag> is supported now.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3233 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/irc')
-rw-r--r-- | src/irc/core/irc-commands.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/irc/core/irc-commands.c b/src/irc/core/irc-commands.c index f760d234..d6bc2723 100644 --- a/src/irc/core/irc-commands.c +++ b/src/irc/core/irc-commands.c @@ -345,7 +345,7 @@ static char *get_redirect_nicklist(const char *nicks, int *free) return ret; } -/* SYNTAX: WHOIS [<server>] [<nicks>] */ +/* SYNTAX: WHOIS [-<server tag>] [<server>] [<nicks>] */ static void cmd_whois(const char *data, IRC_SERVER_REC *server, WI_ITEM_REC *item) { @@ -356,10 +356,19 @@ static void cmd_whois(const char *data, IRC_SERVER_REC *server, CMD_IRC_SERVER(server); - if (!cmd_get_params(data, &free_arg, 2 | PARAM_FLAG_OPTIONS, + if (!cmd_get_params(data, &free_arg, 2 | PARAM_FLAG_OPTIONS | + PARAM_FLAG_UNKNOWN_OPTIONS, "whois", &optlist, &qserver, &query)) return; + /* -<server tag> */ + server = IRC_SERVER(cmd_options_get_server(NULL, optlist, + SERVER(server))); + if (server == NULL) { + cmd_params_free(free_arg); + return; + } + if (*query == '\0') { query = qserver; qserver = ""; |