Channel: Fix capability check in alertOps, to check the target instead of sender.

This commit is contained in:
Valentin Lorentz 2021-09-21 21:21:21 +02:00
parent c93493901e
commit f468557899

View File

@ -950,8 +950,12 @@ class Channel(callbacks.Plugin):
if frm is not None:
s += format(_(' (from %s)'), frm)
for nick in irc.state.channels[channel].users:
if ircdb.checkCapability(msg.prefix, capability):
irc.reply(s, to=nick, private=True)
prefix = irc.state.nicksToHostmasks.get(nick)
if not prefix:
continue
if not ircdb.checkCapability(prefix, capability):
continue
irc.reply(s, to=nick, private=True)
irc.replySuccess()
@internationalizeDocstring