mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-19 08:59:27 +01:00
Channel & Dunno & Misc & RSS & Scheduler: Let the logging facility perform string templating to avoid extra format chars in argument.
This commit is contained in:
parent
a8748c3b73
commit
3f66dbc3d5
@ -70,8 +70,8 @@ class Channel(callbacks.Plugin):
|
||||
channel, msg.prefix)
|
||||
irc.sendMsg(networkGroup.channels.join(channel))
|
||||
else:
|
||||
self.log.info('Kicked from %s by %s. Not auto-rejoining.' %
|
||||
(channel, msg.prefix))
|
||||
self.log.info('Kicked from %s by %s. Not auto-rejoining.',
|
||||
channel, msg.prefix)
|
||||
|
||||
def _sendMsg(self, irc, msg):
|
||||
irc.queueMsg(msg)
|
||||
|
@ -49,7 +49,7 @@ class Dunno(plugins.ChannelIdDatabasePlugin):
|
||||
dunno = dunno.text
|
||||
prefixNick = self.registryValue('prefixNick', channel)
|
||||
env = {'command': tokens[0]}
|
||||
self.log.info('Issuing "dunno" answer, %s is not a command.' %
|
||||
self.log.info('Issuing "dunno" answer, %s is not a command.',
|
||||
tokens[0])
|
||||
dunno = ircutils.standardSubstitute(irc, msg, dunno, env=env)
|
||||
irc.reply(dunno, prefixNick=prefixNick)
|
||||
|
@ -171,9 +171,9 @@ class Misc(callbacks.Plugin):
|
||||
if tokens:
|
||||
# echo [] will get us an empty token set, but there's no need
|
||||
# to log this in that case anyway, it being a nested command.
|
||||
self.log.info('Not replying to %s in %s, not a command.' %
|
||||
(tokens[0], channel
|
||||
if channel != irc.nick else _('private')))
|
||||
self.log.info('Not replying to %s in %s, not a command.',
|
||||
tokens[0], channel
|
||||
if channel != irc.nick else _('private'))
|
||||
if irc.nested:
|
||||
bracketConfig = conf.supybot.commands.nested.brackets
|
||||
brackets = conf.get(bracketConfig, channel)
|
||||
|
@ -324,7 +324,7 @@ class RSS(callbacks.Plugin):
|
||||
for name in announced_feeds:
|
||||
feed = self.get_feed(name)
|
||||
if not feed:
|
||||
self.log.warning('Feed %s is announced but does not exist.' %
|
||||
self.log.warning('Feed %s is announced but does not exist.',
|
||||
name)
|
||||
continue
|
||||
self.update_feed_if_needed(feed)
|
||||
|
@ -87,7 +87,7 @@ class Scheduler(callbacks.Plugin):
|
||||
except AssertionError as e:
|
||||
if str(e) == 'An event with the same name has already been scheduled.':
|
||||
# we must be reloading the plugin, event is still scheduled
|
||||
self.log.info('Event %s already exists, adding to dict.' % (name,))
|
||||
self.log.info('Event %s already exists, adding to dict.', name)
|
||||
self.events[name] = event
|
||||
else:
|
||||
raise
|
||||
|
Loading…
Reference in New Issue
Block a user