diff --git a/plugins/location.py b/plugins/geoip.py similarity index 87% rename from plugins/location.py rename to plugins/geoip.py index 83f6af7..6c05a78 100644 --- a/plugins/location.py +++ b/plugins/geoip.py @@ -20,11 +20,10 @@ def timezone(ip): return int(time) @hook.command -def locations(inp, say = None, me = None, bot = None): - ".location - Performs a GeoIP check on the ip given." +@hook.command("location") +def geoip(inp, say = None, bot = None): + ".geoip - Performs a location check on the ip given." api = bot.config['api_keys']['geoip'] - if api == "": - return "No API key" give = find_location(inp, api) if give["country"] not in [""," ","-"," - "]: if give["state"] == give["city"]: @@ -36,3 +35,4 @@ def locations(inp, say = None, me = None, bot = None): else: say("Either that wasn't an IP or I cannot locate it in my database. :(") return +