supybot-wizard: Fix listing of plugins during setup.

Due to the changes to prevent the global plugins dir from being set in
supybot.directories.plugins, the global plugins weren't being found.  Simply
extend the list of directories with the global directory.

Signed-off-by: James Vega <jamessan@users.sourceforge.net>
This commit is contained in:
James Vega 2009-05-18 03:26:57 -04:00
parent 0d98118247
commit 1c4738bfdc

View File

@ -55,6 +55,7 @@ import optparse
import supybot.ansi as ansi import supybot.ansi as ansi
import supybot.utils as utils import supybot.utils as utils
import supybot.plugin as plugin
import supybot.ircutils as ircutils import supybot.ircutils as ircutils
import supybot.registry as registry import supybot.registry as registry
@ -254,7 +255,7 @@ def main():
somewhere else.""") somewhere else.""")
pluginDirs = conf.supybot.directories.plugins() pluginDirs = conf.supybot.directories.plugins()
output("""Currently, the bot knows about the following directories:""") output("""Currently, the bot knows about the following directories:""")
output(format('%L', pluginDirs)) output(format('%L', pluginDirs + [plugin._pluginsDir]))
while yn('Would you like to add another plugin directory? ' while yn('Would you like to add another plugin directory? '
'Adding a local plugin directory is good style.', 'Adding a local plugin directory is good style.',
default=True): default=True):
@ -451,7 +452,7 @@ def main():
else: else:
conf.registerPlugin(module.__name__, currentValue=True) conf.registerPlugin(module.__name__, currentValue=True)
plugins = getPlugins(pluginDirs) plugins = getPlugins(pluginDirs + [plugin._pluginsDir])
for s in ('Admin', 'User', 'Channel', 'Misc', 'Config'): for s in ('Admin', 'User', 'Channel', 'Misc', 'Config'):
m = loadPlugin(s) m = loadPlugin(s)
if m is not None: if m is not None: