Socket: fix previous commit

This commit is contained in:
James Lu 2018-06-19 12:13:45 -07:00
parent 91a38887a2
commit 72c4801bb9

View File

@ -284,8 +284,8 @@ class SocketDriver(drivers.IrcDriver, drivers.ServersMixin):
self.conn.connect((address, port)) self.conn.connect((address, port))
if network_config.ssl(): if network_config.ssl():
self.starttls() self.starttls()
elif (not network_config.requireStarttls()) and \
# Suppress this warning for loopback IPs. # Suppress this warning for loopback IPs.
elif (not network_config.requireStarttls()) and \
(ipaddress is None or not ipaddress.ip_address(address).is_loopback): (ipaddress is None or not ipaddress.ip_address(address).is_loopback):
drivers.log.warning(('Connection to network %s ' drivers.log.warning(('Connection to network %s '
'does not use SSL/TLS, which makes it vulnerable to ' 'does not use SSL/TLS, which makes it vulnerable to '