mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 05:09:23 +01:00
Use conf.registerGlobalValue to ensure generated values are properly setup.
Signed-off-by: James Vega <jamessan@users.sourceforge.net>
(cherry picked from commit 0c62204809
)
Signed-off-by: Daniel Folkinshteyn <nanotube@users.sourceforge.net>
This commit is contained in:
parent
dbde5fc250
commit
23cca935cb
@ -1,6 +1,6 @@
|
|||||||
###
|
###
|
||||||
# Copyright (c) 2002-2004, Jeremiah Fincher
|
# Copyright (c) 2002-2004, Jeremiah Fincher
|
||||||
# Copyright (c) 2009, James Vega
|
# Copyright (c) 2009-2010, James Vega
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
#
|
#
|
||||||
# Redistribution and use in source and binary forms, with or without
|
# Redistribution and use in source and binary forms, with or without
|
||||||
@ -263,12 +263,12 @@ class Alias(callbacks.Plugin):
|
|||||||
f = new.instancemethod(f, self, Alias)
|
f = new.instancemethod(f, self, Alias)
|
||||||
except RecursiveAlias:
|
except RecursiveAlias:
|
||||||
raise AliasError, 'You can\'t define a recursive alias.'
|
raise AliasError, 'You can\'t define a recursive alias.'
|
||||||
|
aliasGroup = self.registryValue('aliases', value=False)
|
||||||
if name in self.aliases:
|
if name in self.aliases:
|
||||||
# We gotta remove it so its value gets updated.
|
# We gotta remove it so its value gets updated.
|
||||||
conf.supybot.plugins.Alias.aliases.unregister(name)
|
aliasGroup.unregister(name)
|
||||||
conf.supybot.plugins.Alias.aliases.register(name,
|
conf.registerGlobalValue(aliasGroup, name, registry.String(alias, ''))
|
||||||
registry.String(alias, ''))
|
conf.registerGlobalValue(aliasGroup.get(name), 'locked',
|
||||||
conf.supybot.plugins.Alias.aliases.get(name).register('locked',
|
|
||||||
registry.Boolean(lock, ''))
|
registry.Boolean(lock, ''))
|
||||||
self.aliases[name] = [alias, lock, f]
|
self.aliases[name] = [alias, lock, f]
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
###
|
###
|
||||||
# Copyright (c) 2002-2004, Jeremiah Fincher
|
# Copyright (c) 2002-2004, Jeremiah Fincher
|
||||||
# Copyright (c) 2008-2009, James Vega
|
# Copyright (c) 2008-2010, James Vega
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
#
|
#
|
||||||
# Redistribution and use in source and binary forms, with or without
|
# Redistribution and use in source and binary forms, with or without
|
||||||
@ -102,7 +102,7 @@ class RSS(callbacks.Plugin):
|
|||||||
def _registerFeed(self, name, url=''):
|
def _registerFeed(self, name, url=''):
|
||||||
self.registryValue('feeds').add(name)
|
self.registryValue('feeds').add(name)
|
||||||
group = self.registryValue('feeds', value=False)
|
group = self.registryValue('feeds', value=False)
|
||||||
group.register(name, registry.String(url, ''))
|
conf.registerGlobalValue(group, name, registry.String(url, ''))
|
||||||
|
|
||||||
def __call__(self, irc, msg):
|
def __call__(self, irc, msg):
|
||||||
self.__parent.__call__(irc, msg)
|
self.__parent.__call__(irc, msg)
|
||||||
|
@ -36,8 +36,8 @@ def registerNick(nick, password=''):
|
|||||||
p = conf.supybot.plugins.Services.Nickserv.get('password')
|
p = conf.supybot.plugins.Services.Nickserv.get('password')
|
||||||
h = 'Determines what password the bot will use with NickServ when ' \
|
h = 'Determines what password the bot will use with NickServ when ' \
|
||||||
'identifying as %s.' % nick
|
'identifying as %s.' % nick
|
||||||
v = p.register(nick, registry.String(password, h, private=True))
|
v = conf.registerGlobalValue(p, nick,
|
||||||
v.channelValue = False
|
registry.String(password, h, private=True))
|
||||||
if password:
|
if password:
|
||||||
v.setValue(password)
|
v.setValue(password)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user