1
0
mirror of https://github.com/irssi/irssi.git synced 2024-12-04 14:46:39 -05:00

/WHOIS in a query asks the queried nick's whois.

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@753 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2000-10-14 14:37:01 +00:00 committed by cras
parent 148a6692e6
commit 5733a8c6e3

View File

@ -408,7 +408,8 @@ static char *get_redirect_nicklist(const char *nicks, int *free)
} }
/* SYNTAX: WHOIS [<server>] [<nicks>] */ /* SYNTAX: WHOIS [<server>] [<nicks>] */
static void cmd_whois(const char *data, IRC_SERVER_REC *server) static void cmd_whois(const char *data, IRC_SERVER_REC *server,
WI_ITEM_REC *item)
{ {
GHashTable *optlist; GHashTable *optlist;
char *qserver, *query; char *qserver, *query;
@ -427,7 +428,10 @@ static void cmd_whois(const char *data, IRC_SERVER_REC *server)
query = qserver; query = qserver;
qserver = ""; qserver = "";
} }
if (*query == '\0') query = server->nick; if (*query == '\0') {
QUERY_REC *queryitem = QUERY(item);
query = queryitem != NULL ? queryitem->name : server->nick;
}
if (strcmp(query, "*") == 0 && if (strcmp(query, "*") == 0 &&
g_hash_table_lookup(optlist, "yes") == NULL) g_hash_table_lookup(optlist, "yes") == NULL)