Fixed quit to note that it doesn't *really* take an argument, and to say who the bot was quit by.

This commit is contained in:
Jeremy Fincher 2004-01-14 23:51:58 +00:00
parent 80da030351
commit 9f1af0d95c

View File

@ -318,20 +318,16 @@ class Owner(privmsgs.CapabilityCheckingPrivmsg):
irc.queueMsg(m) irc.queueMsg(m)
def quit(self, irc, msg, args): def quit(self, irc, msg, args):
"""[<int return value>] """takes no arguments
Exits the program with the given return value (the default is 0) Exits the bot.
""" """
try:
i = int(args[0])
except (ValueError, IndexError):
i = 0
world.dying = True world.dying = True
for driver in drivers._drivers.itervalues(): for driver in drivers._drivers.itervalues():
driver.die() driver.die()
for irc in world.ircs[:]: for irc in world.ircs[:]:
irc.die() irc.die()
raise SystemExit raise SystemExit, 'Quitting because I was told by %s' % msg.prefix
def flush(self, irc, msg, args): def flush(self, irc, msg, args):
"""takes no arguments """takes no arguments