introduce direct message support, add back fixed event loop

This commit is contained in:
Thorsten
2015-12-26 23:06:46 +01:00
parent 92b2bf6447
commit d4741a55ea
3 changed files with 36 additions and 12 deletions

View File

@@ -110,6 +110,19 @@ def start(botclass, active=False):
config.runtimeconf_set('start_time', -time.time())
while 1:
try:
# print("hangup: %s" % got_hangup)
if not plugins.event_trigger():
bot.hangup()
if bot.state.current_state() == 'disconnected':
exit(0)
time.sleep(EVENTLOOP_DELAY)
except KeyboardInterrupt:
print('')
exit(130)
if '__main__' == __name__:
start(IdleBot)