ircmeeting/meeting.py - ".none" extension prevents writing files

Ignore-this: cb3a6066ac65f30924cfc87cce164921
- This provides a way to make a writer not write _any_ files.
  Examples of when this would be useful would be when you use the
  MediaWiki writer and upload directly instead of saving to a file.

darcs-hash:20101210073412-82ea9-83b5efe12af594a5ff17d3268ef7b69c118c2197.gz
This commit is contained in:
Richard Darst 2010-12-09 23:34:12 -08:00
parent ee695be444
commit 64f57ddf74
2 changed files with 7 additions and 2 deletions

View File

@ -491,6 +491,7 @@ 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.
This *can* be configured through supybot. To do this, set
``supybot.plugins.MeetBot.writer_map`` to a space-separated list of

View File

@ -216,8 +216,12 @@ class Config(object):
if isinstance(text, (str, unicode)):
# Have a way to override saving, so no disk files are written.
if getattr(self, "dontSave", False):
continue
self.writeToFile(text, rawname+extension)
pass
# ".none" or a single "." disable writing.
elif extension.lower() in (".none", "."):
pass
else:
self.writeToFile(text, filename)
if hasattr(self, 'save_hook'):
self.save_hook(realtime_update=realtime_update)
return results