Cleaner output for nonexistent entries.

This commit is contained in:
Jeremy Fincher 2003-11-21 13:02:26 +00:00
parent 308ae5527c
commit b3aade6984

View File

@ -120,13 +120,15 @@ class Karma(callbacks.PrivmsgCommandAndRegexp, plugins.ChannelDBHandler):
normalizedArgs.remove(n.lower()) normalizedArgs.remove(n.lower())
if normalizedArgs: if normalizedArgs:
if len(normalizedArgs) == 1: if len(normalizedArgs) == 1:
L.append('%s has no karma' % normalizedArgs.pop()) ss = '%s has no karma' % normalizedArgs.pop()
else: else:
LL = list(normalizedArgs) LL = list(normalizedArgs)
LL.sort() LL.sort()
L.append('%s have no karma' % utils.commaAndify(LL)) ss = '%s have no karma' % utils.commaAndify(LL)
s = utils.commaAndify(L) s = '%s. %s.' % (utils.commaAndify(L), ss)
irc.reply(msg, s + '.') else:
s = utils.commaAndify(L) + '.'
irc.reply(msg, s)
else: else:
irc.reply(msg, 'I didn\'t know the karma for any ' irc.reply(msg, 'I didn\'t know the karma for any '
'of those things.') 'of those things.')