diff --git a/plugins/geoip.py b/plugins/geoip.py index 472cfe6..2dfa45f 100755 --- a/plugins/geoip.py +++ b/plugins/geoip.py @@ -25,17 +25,14 @@ def timezone(ip): @hook.command @hook.command("location") -def geoip(inp, say=None, nick=None, host=None, bot=None): +def geoip(inp, say=None, bot=None): ".geoip - Performs a location check on ." api_key = bot.config.get("api_keys", {}).get("geoip", None) if api_key is None: return "error: no api key set" - if inp == nick: - ip = host - else: - ip = inp - give = find_location(ip, api_key) - if give["country"] not in ["", " ", "-", " - "]: + + give = find_location(inp, api_key) + if give["country"] not in ["", " ", "-", " - ", None]: if give["state"] == give["city"]: localstring = give["city"] else: