Removed debug code, switched to fancy new string formatting.

This commit is contained in:
Luke Rogers 2012-10-11 19:07:25 +13:00
parent 1fa16fe587
commit 5fce23b522

View file

@ -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)