Made registryValue work with dotted syntax.

This commit is contained in:
Jeremy Fincher 2004-01-21 16:25:38 +00:00
parent b2b9f64558
commit bd47403bf0
1 changed files with 6 additions and 2 deletions

View File

@ -745,10 +745,14 @@ class Privmsg(irclib.IrcCallback):
def registryValue(self, name, channel=None):
plugin = self.name()
group = conf.supybot.plugins.get(plugin)
names = name.split('.')
for name in names:
group = group.get(name)
if channel is None:
return conf.supybot.plugins.get(plugin).get(name)()
return group()
else:
return conf.supybot.plugins.get(plugin).get(name).get(channel)()
return group.get(channel)()
class IrcObjectProxyRegexp(RichReplyMethods):