Apply the remainder of the changes.

This commit is contained in:
Krytarik Raido 2021-06-28 23:23:04 +02:00
parent 2c69f1bc05
commit f4cfdf9722

View File

@ -3222,19 +3222,12 @@ class ChanTracker(callbacks.Plugin, plugins.ChannelDBHandler):
# send messages to logChannel if configured for # send messages to logChannel if configured for
if channel in irc.state.channels: if channel in irc.state.channels:
logChannel = self.registryValue('logChannel', channel=channel) logChannel = self.registryValue('logChannel', channel=channel)
i = self.getIrc(irc) if logChannel:
if logChannel in irc.state.channels: i = self.getIrc(irc)
if logChannel == channel and irc.state.channels[channel].isHalfopPlus(irc.nick) and self.registryValue('keepOp', channel=channel): if logChannel in irc.state.channels and logChannel == channel \
if self.registryValue('announceWithNotice', channel=channel): and irc.state.channels[channel].isHalfopPlus(irc.nick) \
i.lowQueue.enqueue(ircmsgs.notice(logChannel, message)) and self.registryValue('keepOp', channel=channel):
else: logChannel = '@%s' % logChannel
i.lowQueue.enqueue(ircmsgs.privmsg(logChannel, message))
else:
if self.registryValue('announceWithNotice', channel=channel):
i.lowQueue.enqueue(ircmsgs.notice(logChannel, message))
else:
i.lowQueue.enqueue(ircmsgs.privmsg(logChannel, message))
elif len(logChannel) > 0:
if self.registryValue('announceWithNotice', channel=channel): if self.registryValue('announceWithNotice', channel=channel):
i.lowQueue.enqueue(ircmsgs.notice(logChannel, message)) i.lowQueue.enqueue(ircmsgs.notice(logChannel, message))
else: else: