packages/ircbot: mod justirc
This commit is contained in:
parent
9c0917027b
commit
a1d2ed677c
1 changed files with 6 additions and 2 deletions
|
@ -212,8 +212,12 @@ class IRCConnection(EventEmitter):
|
||||||
if tls:
|
if tls:
|
||||||
import ssl
|
import ssl
|
||||||
|
|
||||||
context = ssl.SSLContext()
|
context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
|
||||||
self.socket = context.wrap_socket(self.socket, server)
|
context.check_hostname = False
|
||||||
|
context.verify_mode = ssl.CERT_NONE
|
||||||
|
context.minimum_version = ssl.TLSVersion.TLSv1_3
|
||||||
|
context.maximum_version = ssl.TLSVersion.TLSv1_3
|
||||||
|
self.socket = context.wrap_socket(self.socket)
|
||||||
|
|
||||||
self.lines = self._read_lines()
|
self.lines = self._read_lines()
|
||||||
self.emit("connect", _IRCEvent(self))
|
self.emit("connect", _IRCEvent(self))
|
||||||
|
|
Loading…
Reference in a new issue