fix ip not decalred error

This commit is contained in:
Gordon Shumway 2019-11-15 17:26:14 -05:00 committed by GitHub
parent 0ea80a26e9
commit 66e5fecd6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -62,6 +62,8 @@ class Geo(callbacks.Plugin):
except:
irc.reply("Invalid nick/hostname {0}".format(stuff))
return
elif utils.net.isIP(stuff):
ip = stuff
else:
irc.reply("invalid nick or hostname/ip {0}".format(stuff))
res = reader.city(ip)