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:
parent
1e0b0dbc70
commit
9578fd5ac3
@ -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'])
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user