From 84a702636783bd8ffd3685d52199acb961d6e053 Mon Sep 17 00:00:00 2001 From: James Vega Date: Wed, 1 Sep 2004 18:15:57 +0000 Subject: [PATCH] Add stripFormatting option (default True) --- plugins/ChannelLogger.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugins/ChannelLogger.py b/plugins/ChannelLogger.py index 512b2a255..c535ba4ac 100644 --- a/plugins/ChannelLogger.py +++ b/plugins/ChannelLogger.py @@ -57,6 +57,10 @@ conf.registerGlobalValue(conf.supybot.plugins.ChannelLogger, 'flushImmediately', registry.Boolean(False, """Determines whether channel logfiles will be flushed anytime they're written to, rather than being buffered by the operating system.""")) +conf.registerGlobalValue(conf.supybot.plugins.ChannelLogger, + 'stripFormatting', registry.Boolean(True, """Determines whether + formatting characters (such as bolding, color, etc.) are removed when + writing the logs to disk.""")) conf.registerChannelValue(conf.supybot.plugins.ChannelLogger, 'timestamp', registry.Boolean(True, """Determines whether the logs for this channel are timestamped with the timestamp in supybot.log.timestampFormat.""")) @@ -191,6 +195,8 @@ class ChannelLogger(callbacks.Privmsg): log = self.getLog(channel) if self.registryValue('timestamp', channel): self.timestamp(log) + if self.registryValue('stripFormatting', channel): + s = ircutils.stripFormatting(s) log.write(s) if self.registryValue('flushImmediately'): log.flush()