From 2c69f1bc05b4a8e0e03fe10a7145228b2a694d40 Mon Sep 17 00:00:00 2001 From: Nicolas Coevoet Date: Mon, 28 Jun 2021 05:38:39 +0000 Subject: [PATCH] minors improvement by Krytarik Raido --- plugin.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/plugin.py b/plugin.py index 08745d5..36f6c21 100644 --- a/plugin.py +++ b/plugin.py @@ -3226,18 +3226,14 @@ class ChanTracker(callbacks.Plugin, plugins.ChannelDBHandler): if logChannel in irc.state.channels: if logChannel == channel and irc.state.channels[channel].isHalfopPlus(irc.nick) and self.registryValue('keepOp', channel=channel): if self.registryValue('announceWithNotice', channel=channel): - i.lowQueue.enqueue(ircmsgs.IrcMsg( - 'NOTICE @%s :%s' % (logChannel, message))) + i.lowQueue.enqueue(ircmsgs.notice(logChannel, message)) else: - i.lowQueue.enqueue(ircmsgs.IrcMsg( - 'PRIVMSG @%s :%s' % (logChannel, message))) + i.lowQueue.enqueue(ircmsgs.privmsg(logChannel, message)) else: if self.registryValue('announceWithNotice', channel=channel): - i.lowQueue.enqueue(ircmsgs.IrcMsg( - 'NOTICE %s :%s' % (logChannel, message))) + i.lowQueue.enqueue(ircmsgs.notice(logChannel, message)) else: - i.lowQueue.enqueue(ircmsgs.IrcMsg( - 'PRIVMSG %s :%s' % (logChannel, message))) + i.lowQueue.enqueue(ircmsgs.privmsg(logChannel, message)) elif len(logChannel) > 0: if self.registryValue('announceWithNotice', channel=channel): i.lowQueue.enqueue(ircmsgs.notice(logChannel, message))