Skip to content

Commit

Permalink
Disconnect bot when network status set to '2'.
Browse files Browse the repository at this point in the history
  • Loading branch information
rtnpro committed Mar 23, 2016
1 parent 6eb6c9e commit 0269e77
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ircb/bouncer.py
Expand Up @@ -156,6 +156,11 @@ def _on_network_create_update(self, network):
bot = IrcbBot(**config)
bot.run_in_loop()
self.register_bot(network.id, bot)
elif network.status == '2':
bot = self.bots.get(network.id)
if bot:
bot.quit()
bot.protocol.close()

def on_network_delete(self, network):
pass
Expand Down

0 comments on commit 0269e77

Please sign in to comment.