mirror of
https://github.com/oddluck/limnoria-plugins.git
synced 2025-04-28 22:41:08 -05:00
give 'no result' for local IPs
This commit is contained in:
parent
66e5fecd6a
commit
96e861a6ec
@ -66,10 +66,13 @@ class Geo(callbacks.Plugin):
|
|||||||
ip = stuff
|
ip = stuff
|
||||||
else:
|
else:
|
||||||
irc.reply("invalid nick or hostname/ip {0}".format(stuff))
|
irc.reply("invalid nick or hostname/ip {0}".format(stuff))
|
||||||
res = reader.city(ip)
|
try:
|
||||||
if res:
|
res = reader.city(ip)
|
||||||
irc.reply('%s, %s, %s' % (res.city.name, res.subdivisions.most_specific.name, res.country.name ))
|
if res:
|
||||||
else:
|
irc.reply('%s, %s, %s' % (res.city.name, res.subdivisions.most_specific.name, res.country.name ))
|
||||||
|
else:
|
||||||
|
irc.reply("No results found")
|
||||||
|
except:
|
||||||
irc.reply("No results found")
|
irc.reply("No results found")
|
||||||
geo = wrap(geo, ['text'])
|
geo = wrap(geo, ['text'])
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user