diff options
author | Timo Sirainen <cras@irssi.org> | 2000-10-14 16:02:35 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2000-10-14 16:02:35 +0000 |
commit | bd19c4a7d76e9ca884a461b13e5471af80e84d44 (patch) | |
tree | a702a9b694f4fe66873840155c64ddea6fcc3df6 /src/irc/core | |
parent | 76a6b9a93157ff7b132bdf212f74be8ff8f3b481 (diff) | |
download | irssi-bd19c4a7d76e9ca884a461b13e5471af80e84d44.zip |
"/whois x x" - if x isn't found irssi now prints "there's no such nick x"
instead of complaining about unknown server x.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@755 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/irc/core')
-rw-r--r-- | src/irc/core/irc-commands.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/irc/core/irc-commands.c b/src/irc/core/irc-commands.c index ebbdf59b..12d21219 100644 --- a/src/irc/core/irc-commands.c +++ b/src/irc/core/irc-commands.c @@ -412,7 +412,7 @@ static void cmd_whois(const char *data, IRC_SERVER_REC *server, WI_ITEM_REC *item) { GHashTable *optlist; - char *qserver, *query; + char *qserver, *query, *event_402; void *free_arg; int free_nick; @@ -437,10 +437,14 @@ static void cmd_whois(const char *data, IRC_SERVER_REC *server, g_hash_table_lookup(optlist, "yes") == NULL) cmd_param_error(CMDERR_NOT_GOOD_IDEA); + event_402 = "event 402"; if (*qserver == '\0') g_string_sprintf(tmpstr, "WHOIS %s", query); - else + else { g_string_sprintf(tmpstr, "WHOIS %s %s", qserver, query); + if (g_strcasecmp(qserver, query) == 0) + event_402 = "whois event noserver"; + } server->whois_found = FALSE; irc_send_cmd_split(server, tmpstr->str, 2, server->max_whois_in_cmd); @@ -450,7 +454,7 @@ static void cmd_whois(const char *data, IRC_SERVER_REC *server, server_redirect_event((SERVER_REC *) server, query, 2, "event 318", "event 318", 1, - "event 402", "event 402", -1, + "event 402", event_402, -1, "event 311", "whois event", 1, "event 401", "whois not found", 1, NULL); if (free_nick) g_free(query); |