Fix0red the groupz0rs.

This commit is contained in:
Jeremy Fincher 2004-02-04 15:55:03 +00:00
parent a4aff250cc
commit 952aa0e395
1 changed files with 9 additions and 9 deletions

View File

@ -108,21 +108,21 @@ class Config(callbacks.Privmsg):
name = self._canonicalizeName(name) name = self._canonicalizeName(name)
group = getWrapper(name) group = getWrapper(name)
if groups: if groups:
L = group.children.keys() L = []
for (vname, v) in group.children.iteritems():
if v.added:
L.append(vname)
if L: if L:
utils.sortBy(str.lower, L) utils.sortBy(str.lower, L)
irc.reply(utils.commaAndify(L)) irc.reply(utils.commaAndify(L))
else: else:
irc.reply('%s has no subgroups.' % name) irc.reply('%s has no subgroups.' % name)
else: else:
if hasattr(group, 'getValues'): try:
try: L = zip(*group.getValues(fullNames=False))[0]
L = zip(*group.getValues(fullNames=False))[0] irc.reply(utils.commaAndify(L))
irc.reply(utils.commaAndify(L)) except TypeError:
except TypeError: irc.error('There don\'t seem to be any values in %s'%name)
irc.error('There don\'t seem to be any values in %s'%name)
else:
irc.error('%r is not a valid configuration group.' % name)
def search(self, irc, msg, args): def search(self, irc, msg, args):
"""<word> """<word>