Uh oh, we're getting repeats. Let's fix this.

This commit is contained in:
Jeremy Fincher 2004-08-03 07:26:03 +00:00
parent 2eedf7dfad
commit 45d3d63d4b

View File

@ -573,8 +573,12 @@ utils.transactionalFile = transactionalFile
class PluginDirectories(registry.CommaSeparatedListOfStrings):
def __call__(self):
v = registry.CommaSeparatedListOfStrings.__call__(self)
return v + [_srcDir, _pluginsDir]
v = registry.CommaSeparatedListOfStrings.__call__(self)[:] # Copy!
if _srcDir not in v:
v.append(_srcDir)
if _pluginsDir not in v:
v.append(_pluginsDir)
return v
registerGlobalValue(supybot.directories, 'plugins',
PluginDirectories(['plugins'], """Determines what directories the bot will