]> jfr.im git - erebus.git/blobdiff - modules/control.py
control - add message when !die used
[erebus.git] / modules / control.py
index e19670280bfcd14d35caac16a402bbbbf1cf4ac2..c03b8f3445de66811eff3b9a69a9329ec05bef75 100644 (file)
@@ -23,6 +23,10 @@ import ctlmod
 
 @lib.hook(needchan=False, glevel=lib.MANAGER)
 def die(bot, user, chan, realtarget, *args):
+       for botitem in bot.parent.bots.itervalues():
+               for chan in botitem.chans:
+                       chan.fastmsg("Bot is restarting! %s" % ' '.join(args))
+               bot.conn.send("QUIT :Restarting.")
        sys.exit(0)
        os._exit(0)