From 0790138e94b89eb8378b2d0b26f865b7f83faad8 Mon Sep 17 00:00:00 2001 From: Richard Darst Date: Fri, 10 Dec 2010 00:12:46 -0800 Subject: [PATCH] ircmeeting/meeting.py - update to ".none" extension Ignore-this: eed5f98634527f0cd67d4dd654df3b35 - Because of the way python dictionaries work, it is only possible to have unique extensions. To get around this for not writing files, any extension that begins in ".none" will not have files written. - Thus, use ".none1", ".none2", etc, for multiple writers that should not be written. darcs-hash:20101210081246-82ea9-6a4c8f61270f89a1414584b0af01669d7cb51f5e.gz --- doc/Manual.txt | 5 ++++- ircmeeting/meeting.py | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/doc/Manual.txt b/doc/Manual.txt index 843cdd2..ca833bc 100644 --- a/doc/Manual.txt +++ b/doc/Manual.txt @@ -491,7 +491,10 @@ along with extensions to use. For example, in '.mw':writers.MediaWiki, } -If an extension is ``.none`` the output will *not* be written to a file. +If an extension begins in ``.none`` the output will *not* be written +to a file. Note that you can't have the same extension multiple times +due to the way python dictionaries work: use ``.none1``, ``.none2``, +etc. This *can* be configured through supybot. To do this, set ``supybot.plugins.MeetBot.writer_map`` to a space-separated list of diff --git a/ircmeeting/meeting.py b/ircmeeting/meeting.py index c555fe0..bf912c9 100644 --- a/ircmeeting/meeting.py +++ b/ircmeeting/meeting.py @@ -218,7 +218,7 @@ class Config(object): if getattr(self, "dontSave", False): pass # ".none" or a single "." disable writing. - elif extension.lower() in (".none", "."): + elif extension.lower()[:5] in (".none", "."): pass else: self.writeToFile(text, filename)