Drop special handling of log channel also being target.

This makes it possible to decide individually whether to use
statusmsg for log messages, regardless of what channels.
This commit is contained in:
Krytarik Raido 2022-10-28 23:56:04 +02:00
parent 724f4126ef
commit 546cbab98d

View File

@ -3273,17 +3273,14 @@ class ChanTracker(callbacks.Plugin, plugins.ChannelDBHandler):
# send messages to logChannel if configured for
if channel in irc.state.channels:
logChannel = self.registryValue('logChannel', channel=channel, network=irc.network)
if logChannel:
if logChannel and logChannel in irc.state.channels:
i = self.getIrc(irc)
if logChannel in irc.state.channels and logChannel == channel \
and irc.state.channels[channel].isHalfopPlus(irc.nick) \
and self.registryValue('keepOp', channel=channel, network=irc.network):
logChannel = '@%s' % logChannel
if self.registryValue('announceWithNotice', channel=channel, network=irc.network):
i.lowQueue.enqueue(ircmsgs.notice(logChannel, message))
else:
i.lowQueue.enqueue(ircmsgs.privmsg(logChannel, message))
self.forceTickle = True
self.forceTickle = True
self._tickle(irc)
def resolve(self, irc, channels, prefix):
i = self.getIrc(irc)