diff --git a/bot.py b/bot.py index 1374fc7..711ca6b 100644 --- a/bot.py +++ b/bot.py @@ -4,7 +4,6 @@ import irc.client import irc.connection -import ssl import pymongo import datetime @@ -14,7 +13,11 @@ class SBot(irc.bot.SingleServerIRCBot): def __init__(self): - factory = irc.connection.Factory(wrapper=ssl.wrap_socket) + if config.USE_SSL: + import ssl + factory = irc.connection.Factory(wrapper=ssl.wrap_socket) + else: + factory = irc.connection.Factory() irc.bot.SingleServerIRCBot.__init__(self, [(config.SERVER, config.PORT), ], config.BOT_NAME, diff --git a/config.py.example b/config.py.example index dbd56b8..37f991e 100644 --- a/config.py.example +++ b/config.py.example @@ -13,6 +13,7 @@ NOTIFY_NAME = '!' # IRC SERVER = 'irc.uriirc.org' +USE_SSL = True PORT = 16662 BOT_NAME = 's' OPERATOR_NAME = 'sgm'