mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 19:19:32 +01:00
Added DataFilename.
This commit is contained in:
parent
fb8fc70221
commit
230a0503a2
10
src/conf.py
10
src/conf.py
@ -188,7 +188,6 @@ for (name, s) in registry._cache.iteritems():
|
|||||||
class SpaceSeparatedSetOfChannels(registry.SpaceSeparatedListOf):
|
class SpaceSeparatedSetOfChannels(registry.SpaceSeparatedListOf):
|
||||||
List = ircutils.IrcSet
|
List = ircutils.IrcSet
|
||||||
Value = ValidChannel
|
Value = ValidChannel
|
||||||
|
|
||||||
def removeChannel(self, channel):
|
def removeChannel(self, channel):
|
||||||
removals = []
|
removals = []
|
||||||
for c in self.value:
|
for c in self.value:
|
||||||
@ -521,6 +520,15 @@ registerGlobalValue(supybot.directories, 'plugins',
|
|||||||
'config supybot.directories.plugins [config supybot.directories.plugins],
|
'config supybot.directories.plugins [config supybot.directories.plugins],
|
||||||
newPluginDirectory'."""))
|
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.
|
registerGroup(supybot, 'plugins') # This will be used by plugins, but not here.
|
||||||
|
|
||||||
###
|
###
|
||||||
|
Loading…
Reference in New Issue
Block a user