diff options
author | ache <ache@FreeBSD.org> | 2003-06-24 15:08:24 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 2003-06-24 15:08:24 +0000 |
commit | d847b7379eb60428ea9cacda8216de655f17599a (patch) | |
tree | 5bcdc1308f1e5cb2b03aec532e8296c87bc63c43 | |
parent | e33bf7eadf7cb62b4bd455685aab33a2a8041f84 (diff) | |
download | FreeBSD-src-d847b7379eb60428ea9cacda8216de655f17599a.zip FreeBSD-src-d847b7379eb60428ea9cacda8216de655f17599a.tar.gz |
While there is no su.whois-servers.net, use fallback to
ru.whois-servers.net for su domain or country
-rw-r--r-- | usr.bin/whois/whois.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.bin/whois/whois.c b/usr.bin/whois/whois.c index 729c2e2..6b8924d 100644 --- a/usr.bin/whois/whois.c +++ b/usr.bin/whois/whois.c @@ -175,6 +175,8 @@ main(int argc, char *argv[]) } while (argc-- > 0) { if (country != NULL) { + if (strcasecmp(country, "su") == 0) + country = "ru"; s_asprintf(&qnichost, "%s%s", country, QNICHOST_TAIL); whois(*argv, qnichost, flags); } else if (use_qnichost) @@ -216,8 +218,11 @@ choose_server(char *domain) return (NULL); if (isdigit((unsigned char)*++pos)) s_asprintf(&retval, "%s", ANICHOST); - else + else { + if (strcasecmp(pos, "su") == 0) + pos = "ru"; s_asprintf(&retval, "%s%s", pos, QNICHOST_TAIL); + } return (retval); } |