mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-02-17 14:10:41 +01:00
An attempt to prevent the ugly exceptions from being raised on quit.
This commit is contained in:
parent
69f61d7b6e
commit
74961db20e
@ -325,8 +325,13 @@ class Owner(privmsgs.CapabilityCheckingPrivmsg):
|
|||||||
world.dying = True
|
world.dying = True
|
||||||
for driver in drivers._drivers.itervalues():
|
for driver in drivers._drivers.itervalues():
|
||||||
driver.die()
|
driver.die()
|
||||||
|
killed = sets.Set()
|
||||||
for irc in world.ircs[:]:
|
for irc in world.ircs[:]:
|
||||||
irc.die()
|
# The following is so callbacks don't get killed multiple times
|
||||||
|
# when the Relay plugin is loaded:
|
||||||
|
if id(irc.callbacks) not in killed:
|
||||||
|
killed.add(id(irc.callbacks))
|
||||||
|
irc.die()
|
||||||
raise SystemExit, 'Quitting because I was told by %s' % msg.prefix
|
raise SystemExit, 'Quitting because I was told by %s' % msg.prefix
|
||||||
|
|
||||||
def flush(self, irc, msg, args):
|
def flush(self, irc, msg, args):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user