From 5fce23b52207b27bf6abe5ef94694aa4d3783de1 Mon Sep 17 00:00:00 2001 From: Luke Rogers Date: Thu, 11 Oct 2012 19:07:25 +1300 Subject: [PATCH] Removed debug code, switched to fancy new string formatting. --- plugins/geoip.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugins/geoip.py b/plugins/geoip.py index c5bb282..58d881c 100755 --- a/plugins/geoip.py +++ b/plugins/geoip.py @@ -20,7 +20,6 @@ def geoip(inp): except: return "Sorry, I can't locate that in my database." - print record data = {} if "region_name" in record: @@ -36,4 +35,4 @@ def geoip(inp): data["cc"] = record["country_code"] or "N/A" data["country"] = record["country_name"] or "Unknown" data["city"] = record["city"] or "Unknown" - return "\x02Country:\x02 %(country)s (%(cc)s), \x02City:\x02 %(city)s%(region)s" % data + return "\x02Country:\x02 {country} ({cc}), \x02City:\x02 {city}{region}".format(**data)