mirror of
https://github.com/evennia/evennia.git
synced 2026-04-02 14:07:16 +02:00
Fixed IRC SSL implementation to handle a non-installed openssl library.
This commit is contained in:
parent
8f1378c47e
commit
bdd229afb4
1 changed files with 2 additions and 2 deletions
|
|
@ -9,7 +9,7 @@ from future.utils import viewkeys
|
|||
import re
|
||||
from twisted.application import internet
|
||||
from twisted.words.protocols import irc
|
||||
from twisted.internet import protocol, reactor, ssl
|
||||
from twisted.internet import protocol, reactor
|
||||
from evennia.server.session import Session
|
||||
from evennia.utils import logger, utils
|
||||
|
||||
|
|
@ -313,7 +313,7 @@ class IRCBotFactory(protocol.ReconnectingClientFactory):
|
|||
if self.port:
|
||||
if ssl:
|
||||
try:
|
||||
import OpenSSL
|
||||
from twisted.internet import ssl
|
||||
service = reactor.connectSSL(self.network, int(self.port), self, ssl.ClientContextFactory())
|
||||
except ImportError:
|
||||
self.caller.msg("To use SSL, the PyOpenSSL module must be installed.")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue