diff --git a/README.md b/README.md index cb49204..46a1edc 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ All static data came from https://github.com/WFCD/warframe-worldstate-data ## Requirements Python 3.6+ -Python packages: `twisted service_identity requests` +Python packages: `twisted pyOpenSSL service_identity requests` ## Config `server` - Server address. diff --git a/warbot.py b/warbot.py index 9acdd34..177eb8e 100755 --- a/warbot.py +++ b/warbot.py @@ -11,7 +11,7 @@ import threading import configparser import requests -from twisted.internet import protocol, reactor +from twisted.internet import ssl, protocol, reactor from twisted.words.protocols import irc URI = "http://content.warframe.com/dynamic/worldState.php" @@ -288,6 +288,10 @@ if __name__ == "__main__": server = config["server"] port = config.getint("port") print("Connecting to:", server) - reactor.connectTCP(server, port, WarBotFactory(config)) + reactor.connectSSL( + server, + port, + WarBotFactory(config), + ssl.ClientContextFactory()) reactor.addSystemEventTrigger('before','shutdown', stop.set) reactor.run()