mirror of https://github.com/str4d/RelayBot.git
Add SSL support.
This commit is contained in:
parent
e50f53df6f
commit
de1765197f
|
@ -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]
|
||||
|
|
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue