Add SSL support.

This commit is contained in:
Steve Dougherty 2013-08-27 22:58:54 -04:00
parent e50f53df6f
commit de1765197f
2 changed files with 4 additions and 1 deletions

View File

@ -12,6 +12,8 @@ realname=Relay P. Botterson
heartbeat=90
recognizedNicks=me,myself,I
program=bowling_jokes.sh
# Change to True use use SSL.
useSSL=False
# Each section outside of DEFAULT starts a bot.
[Freenode]

View File

@ -36,7 +36,7 @@ def main():
options = {}
for option in ["timeout", "host", "port", "nick", "channel",
"heartbeat", "password", "username", "realname",
"recognizedNicks", "program"]:
"recognizedNicks", "program", "useSSL"]:
options[option] = get(option)
mode = get("mode")
@ -137,6 +137,7 @@ class RelayFactory(ReconnectingClientFactory):
def __init__(self, config):
config["identifier"] = "{0}{1}{2}".format(config["host"], config["port"], config["channel"])
config['useSSL'] = config['useSSL'] == 'True'
self.config = config
def buildProtocol(self, addr):