3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-30 14:49:28 +01:00

relay: fix clientbot op requirement not being checked if the sender is in the target channel

This commit is contained in:
James Lu 2018-06-07 13:19:53 -07:00
parent 1e0b0dbc70
commit 9578fd5ac3

View File

@ -1785,13 +1785,16 @@ def link(irc, source, args):
irc.proto.join(irc.pseudoclient.uid, localchan) irc.proto.join(irc.pseudoclient.uid, localchan)
irc.reply('Joining %r now to check for op status; please run this command again after I join.' % localchan) irc.reply('Joining %r now to check for op status; please run this command again after I join.' % localchan)
return return
elif not irc.channels[localchan].isOpPlus(source):
irc.error('You must be opped in %r to complete this operation.' % localchan)
return
else: else:
irc.error('You must be in %r to complete this operation.' % localchan) irc.error('You must be in %r to complete this operation.' % localchan)
return return
elif not irc.channels[localchan].isOpPlus(source):
if irc.pseudoclient and source == irc.pseudoclient.uid:
irc.error('Please op the bot in %r to complete this operation.' % localchan)
else:
irc.error('You must be opped in %r to complete this operation.' % localchan)
return
permissions.checkPermissions(irc, source, ['relay.link']) permissions.checkPermissions(irc, source, ['relay.link'])