mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-24 11:42:52 +01:00
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:
parent
80da030351
commit
9f1af0d95c
10
src/Owner.py
10
src/Owner.py
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user