fix hangup and logging

This commit is contained in:
Thorsten
2015-11-20 22:44:16 +01:00
parent 5c2b91bdc2
commit af48c04764
2 changed files with 41 additions and 43 deletions

View File

@@ -99,10 +99,11 @@ def start(botclass, active=False):
bot.connect()
bot.register_plugin('xep_0045')
bot.process()
global got_hangup
while 1:
try:
if not plugins.event_trigger():
if got_hangup or not plugins.event_trigger():
bot.disconnect()
sys.exit(1)