fix calling command in private

This commit is contained in:
Gordon Shumway 2019-12-07 22:37:01 -05:00 committed by GitHub
parent f56d94e454
commit 74e7efb385
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -49,7 +49,11 @@ class Geo(callbacks.Plugin):
except:
irc.reply("Update failed.")
return
if stuff.lower() in (nick.lower() for nick in list(irc.state.channels[channel].users)):
if not irc.isChannel(channel):
private = True
else:
private = False
if not private and stuff.lower() in (nick.lower() for nick in list(irc.state.channels[channel].users)):
try:
stuff = irc.state.nickToHostmask(stuff).split('@')[1]
ip = socket.gethostbyname(stuff)