add ssl support
This commit is contained in:
parent
7dc97123be
commit
86933f1954
|
@ -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.
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue
Block a user