add search, fix TLS, do not import plugins in idlebot

This commit is contained in:
Thorsten
2017-09-06 21:37:49 +02:00
parent 328e821f6d
commit 28ef6bd23d
3 changed files with 127 additions and 6 deletions

View File

@@ -1,19 +1,23 @@
#!/usr/bin/python3
# -*- coding: utf-8 -*-
import logging
import time
import sys
import time
import _ssl
from sleekxmpp import ClientXMPP
import config
import events
from common import VERSION
from sleekxmpp import ClientXMPP
class IdleBot(ClientXMPP):
def __init__(self, jid, password, rooms, nick):
ClientXMPP.__init__(self, jid, password)
self.ssl_version = _ssl.PROTOCOL_TLSv1_2
self.rooms = rooms
self.nick = nick
@@ -114,7 +118,7 @@ def start(botclass, active=False):
config.runtimeconf_set('start_time', -time.time())
if active:
import plugins
pass
events.event_loop.start()