From a3f136279f1b8ec17dcd057c495b6f2bebd239f7 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Thu, 29 Jul 2004 07:01:40 +0000 Subject: [PATCH] Spelled publicly correctly, and moved the proper registration of the public attribute from Owner to conf.registerPlugin. --- src/Owner.py | 5 +---- src/conf.py | 7 +++++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Owner.py b/src/Owner.py index f274a8693..478ab61fb 100644 --- a/src/Owner.py +++ b/src/Owner.py @@ -107,10 +107,7 @@ def loadPluginClass(irc, module, register=None): public = True if hasattr(cb, 'public'): public = cb.public - conf.registerPlugin(name, register) - conf.supybot.plugins.get(name).register('public', - registry.Boolean(public, """Determines whether this plugin is - publically visible.""")) + conf.registerPlugin(name, register, public) assert not irc.getCallback(name) irc.addCallback(cb) return cb diff --git a/src/conf.py b/src/conf.py index 96a78d1ee..fb02f53be 100644 --- a/src/conf.py +++ b/src/conf.py @@ -95,10 +95,13 @@ def registerChannelValue(group, name, value): value.supplyDefault = True return group.register(name, value) -def registerPlugin(name, currentValue=None): - registerGlobalValue(supybot.plugins, name, +def registerPlugin(name, currentValue=None, public=True): + group = registerGlobalValue(supybot.plugins, name, registry.Boolean(False, """Determines whether this plugin is loaded by default.""", showDefault=False)) + registerGlobalValue(group, 'public', + registry.Boolean(public, """Determines whether this plugin is + publicly visible.""")) if currentValue is not None: supybot.plugins.get(name).setValue(currentValue) return registerGroup(users.plugins, name)