Made the response of the upkeep command more useful.

This commit is contained in:
Jeremy Fincher 2003-08-23 11:41:25 +00:00
parent 8b05ce6e1a
commit 6c26e4e28f

View File

@ -224,6 +224,12 @@ class OwnerCommands(CapabilityCheckingPrivmsg):
Runs the standard upkeep stuff (flushes and gc.collects()).
"""
world.upkeep()
if gc.garbage:
if len(gc.garbage) < 10:
irc.reply(msg, 'Garbage! %r' % gc.garbage)
else:
irc.reply(msg, 'Garbage! %s items.' % len(gc.garbage))
else:
irc.reply(msg, conf.replySuccess)
def set(self, irc, msg, args):