From 8d3340985174b4575d3a9fbf04c8ac4955d1779b 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. --- willie/modules/ip.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/willie/modules/ip.py b/willie/modules/ip.py index ca823cb8c4..b3a26d0e33 100644 --- a/willie/modules/ip.py +++ b/willie/modules/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 d06549eb1bd15cacc72af6c801af4ca70736eed1 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 --- willie/modules/ip.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/willie/modules/ip.py b/willie/modules/ip.py index b3a26d0e33..2decfd0289 100644 --- a/willie/modules/ip.py +++ b/willie/modules/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):