From 230a0503a2e6e8bd140234f3da1d2773fbb526b8 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Wed, 28 Jul 2004 02:56:08 +0000 Subject: [PATCH] Added DataFilename. --- src/conf.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/conf.py b/src/conf.py index 442bfa4a6..96a78d1ee 100644 --- a/src/conf.py +++ b/src/conf.py @@ -188,7 +188,6 @@ for (name, s) in registry._cache.iteritems(): class SpaceSeparatedSetOfChannels(registry.SpaceSeparatedListOf): List = ircutils.IrcSet Value = ValidChannel - def removeChannel(self, channel): removals = [] for c in self.value: @@ -521,6 +520,15 @@ registerGlobalValue(supybot.directories, 'plugins', 'config supybot.directories.plugins [config supybot.directories.plugins], newPluginDirectory'.""")) +class DataFilename(registry.String): + def __call__(self): + v = registry.String.__call__(self) + dataDir = supybot.directories.data() + if not v.startswith(dataDir): + v = os.path.basename(v) + v = os.path.join(dataDir, v) + return v + registerGroup(supybot, 'plugins') # This will be used by plugins, but not here. ###