From 33057f76e9b419ef40df170d30301dc47edcc4ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Beaupr=C3=A9?= Date: Tue, 9 Dec 2014 01:27:56 -0500 Subject: [PATCH 1/2] leave the AS number in display the ASN is very useful in diagnosing routing issue and distinguishing between multiple networks with the same name. the ASNs are unique, the network names are really not. --- ip.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/ip.py b/ip.py index ca823cb8c4..b3a26d0e33 100644 --- a/ip.py +++ b/ip.py @@ -117,8 +117,6 @@ def ip(bot, trigger): response += " | Region: %s" % region isp = gi_org.org_by_name(query) - if isp is not None: - isp = re.sub('^AS\d+ ', '', isp) response += " | ISP: %s" % isp bot.say(response) From 9006c4612f6a0db253bff389f37abe734545e799 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Beaupr=C3=A9?= Date: Tue, 9 Dec 2014 09:34:51 -0500 Subject: [PATCH 2/2] fix test case --- ip.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ip.py b/ip.py index b3a26d0e33..2decfd0289 100644 --- a/ip.py +++ b/ip.py @@ -87,7 +87,7 @@ def _find_geoip_db(bot): @commands('iplookup', 'ip') @example('.ip 8.8.8.8', - r'[IP/Host Lookup] Hostname: google-public-dns-a.google.com | Location: United States | Region: CA | ISP: Google Inc.', + r'[IP/Host Lookup] Hostname: google-public-dns-a.google.com | Location: United States | Region: CA | ISP: AS15169 Google Inc.', re=True, ignore='Downloading GeoIP database, please wait...') def ip(bot, trigger):