depot/packages/servers/ircbot/hooks/quit.py

8 lines
196 B
Python
Raw Permalink Normal View History

import main
class EventHandler(main.EventHandler):
def on_message(bot, e):
if e.message == '.quit':
bot.send_message(e.channel, 'exiting...')
bot.emit('quit')