mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-20 09:02:40 +01:00
Removed an XXX.
This commit is contained in:
parent
cc084d2535
commit
b9067089b1
17
src/Owner.py
17
src/Owner.py
@ -227,8 +227,6 @@ class Owner(privmsgs.CapabilityCheckingPrivmsg):
|
|||||||
# This plugin must be first; its priority must be lowest; otherwise odd
|
# This plugin must be first; its priority must be lowest; otherwise odd
|
||||||
# things will happen when adding callbacks.
|
# things will happen when adding callbacks.
|
||||||
capability = 'owner'
|
capability = 'owner'
|
||||||
_srcPlugins = ircutils.IrcSet(('Admin', 'Channel', 'Config',
|
|
||||||
'Misc', 'Owner', 'User'))
|
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
self.__parent = super(Owner, self)
|
self.__parent = super(Owner, self)
|
||||||
self.__parent.__init__()
|
self.__parent.__init__()
|
||||||
@ -310,14 +308,13 @@ class Owner(privmsgs.CapabilityCheckingPrivmsg):
|
|||||||
|
|
||||||
def do001(self, irc, msg):
|
def do001(self, irc, msg):
|
||||||
self.log.info('Loading plugins (connected to %s).', irc.network)
|
self.log.info('Loading plugins (connected to %s).', irc.network)
|
||||||
alwaysLoadSrcPlugins = conf.supybot.plugins.alwaysLoadImportant()
|
alwaysLoadImportant = conf.supybot.plugins.alwaysLoadImportant()
|
||||||
|
important = conf.supybot.commands.defaultPlugins.importantPlugins()
|
||||||
for (name, value) in conf.supybot.plugins.getValues(fullNames=False):
|
for (name, value) in conf.supybot.plugins.getValues(fullNames=False):
|
||||||
if irc.getCallback(name) is None:
|
if irc.getCallback(name) is None:
|
||||||
load = value()
|
load = value()
|
||||||
# XXX This (_srcPlugins) should be changed to the configurable
|
if not load and name in important:
|
||||||
# importantPlugins.
|
if alwaysLoadImportant:
|
||||||
if not load and name in self._srcPlugins:
|
|
||||||
if alwaysLoadSrcPlugins:
|
|
||||||
s = '%s is configured not to be loaded, but is being '\
|
s = '%s is configured not to be loaded, but is being '\
|
||||||
'loaded anyway because ' \
|
'loaded anyway because ' \
|
||||||
'supybot.plugins.alwaysLoadImportant is True.'
|
'supybot.plugins.alwaysLoadImportant is True.'
|
||||||
@ -335,12 +332,6 @@ class Owner(privmsgs.CapabilityCheckingPrivmsg):
|
|||||||
log.warning(str(e))
|
log.warning(str(e))
|
||||||
except ImportError, e:
|
except ImportError, e:
|
||||||
log.warning('Failed to load %s: %s.', name, e)
|
log.warning('Failed to load %s: %s.', name, e)
|
||||||
if name in self._srcPlugins:
|
|
||||||
self.log.exception('Error loading %s:', name)
|
|
||||||
self.log.error('Error loading src/ plugin %s. '
|
|
||||||
'This is usually rather '
|
|
||||||
'serious; these plugins are '
|
|
||||||
'almost always be loaded.',name)
|
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
log.exception('Failed to load %s:', name)
|
log.exception('Failed to load %s:', name)
|
||||||
else:
|
else:
|
||||||
|
@ -670,7 +670,6 @@ class rest(context):
|
|||||||
# additional means: Look for this (and make sure it's of this type). If
|
# additional means: Look for this (and make sure it's of this type). If
|
||||||
# there are no arguments for us to check, then use our default.
|
# there are no arguments for us to check, then use our default.
|
||||||
class additional(context):
|
class additional(context):
|
||||||
# XXX We should allow contexts as well as specs.
|
|
||||||
def __init__(self, spec, default=None):
|
def __init__(self, spec, default=None):
|
||||||
self.__parent = super(additional, self)
|
self.__parent = super(additional, self)
|
||||||
self.__parent.__init__(spec)
|
self.__parent.__init__(spec)
|
||||||
|
@ -141,7 +141,6 @@ class ValidNick(registry.String):
|
|||||||
|
|
||||||
class ValidNicks(registry.SpaceSeparatedListOf):
|
class ValidNicks(registry.SpaceSeparatedListOf):
|
||||||
Value = ValidNick
|
Value = ValidNick
|
||||||
# XXX: Duplicates?
|
|
||||||
|
|
||||||
class ValidNickAllowingPercentS(ValidNick):
|
class ValidNickAllowingPercentS(ValidNick):
|
||||||
"""Value must be a valid IRC nick, with the possible exception of a %s
|
"""Value must be a valid IRC nick, with the possible exception of a %s
|
||||||
|
Loading…
Reference in New Issue
Block a user