mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-23 11:12:47 +01:00
Updated. Not finished, but Vee2d2 needs it.
This commit is contained in:
parent
6e062306f2
commit
aff2e6f718
@ -76,10 +76,10 @@ def describePlugin(module, showUsage):
|
||||
def clearLoadedPlugins(plugins, pluginRegistry):
|
||||
for plugin in plugins:
|
||||
try:
|
||||
pluginKey = pluginRegistry.getChild(plugin)
|
||||
pluginKey = pluginRegistry.get(plugin)
|
||||
if pluginKey():
|
||||
plugins.remove(plugin)
|
||||
except KeyError:
|
||||
except registry.NonExistentRegistryEntry:
|
||||
continue
|
||||
|
||||
_windowsVarRe = re.compile(r'%(\w+)%')
|
||||
@ -314,6 +314,7 @@ def main():
|
||||
output("""That's not a valid nick. Go ahead and pick another.""")
|
||||
|
||||
# conf.supybot.user
|
||||
if advanced:
|
||||
output("""If you've ever done a /whois on a person, you know that IRC
|
||||
provides a way for users to show the world their full name. What would
|
||||
you like your bot's full name to be? If you don't care, just press
|
||||
@ -374,24 +375,25 @@ def main():
|
||||
except registry.InvalidRegistryValue:
|
||||
# FIXME: say which ones weren't channels.
|
||||
output("""Not all of those are valid IRC channels. Be sure to
|
||||
prefix the channel with # (or +, or !, or &, but no one uses those
|
||||
channels, really).""")
|
||||
prefix the channel with # (or +, or !, or &, but no one uses
|
||||
those channels, really).""")
|
||||
|
||||
###
|
||||
# Plugins
|
||||
###
|
||||
def configurePlugin(module, advanced):
|
||||
if hasattr(module, 'configure'):
|
||||
output("""Beginning configuration for %s..."""%module.Class.__name__)
|
||||
output("""Beginning configuration for %s...""" %
|
||||
module.Class.__name__)
|
||||
module.configure(advanced)
|
||||
print # Blank line :)
|
||||
output("""Done!""")
|
||||
else:
|
||||
conf.registerPlugin(module, currentValue=True)
|
||||
conf.registerPlugin(module.__name__, currentValue=True)
|
||||
|
||||
plugins = getPlugins(pluginDirs)
|
||||
for s in ('Admin', 'User', 'Channel', 'Misc', 'Config'):
|
||||
configurePlugin(s, advanced)
|
||||
configurePlugin(loadPlugin(s), advanced)
|
||||
clearLoadedPlugins(plugins, conf.supybot.plugins)
|
||||
|
||||
output("""Now we're going to run you through plugin configuration. There's
|
||||
|
Loading…
Reference in New Issue
Block a user