Resolve merge conflicts

This commit is contained in:
Griatch 2018-01-01 21:05:35 +01:00
commit 76555e6ca5
34 changed files with 4332 additions and 412 deletions

View file

@ -192,7 +192,7 @@ if AMP_ENABLED:
from evennia.server import amp
print(' amp (to Server): %s' % AMP_PORT)
print(' amp (to Server): %s (internal)' % AMP_PORT)
factory = amp.AmpClientFactory(PORTAL)
amp_client = internet.TCPClient(AMP_HOST, AMP_PORT, factory)
@ -223,7 +223,7 @@ if TELNET_ENABLED:
telnet_service.setName('EvenniaTelnet%s' % pstring)
PORTAL.services.addService(telnet_service)
print(' telnet%s: %s' % (ifacestr, port))
print(' telnet%s: %s (external)' % (ifacestr, port))
if SSL_ENABLED:
@ -249,7 +249,7 @@ if SSL_ENABLED:
ssl_service.setName('EvenniaSSL%s' % pstring)
PORTAL.services.addService(ssl_service)
print(" ssl%s: %s" % (ifacestr, port))
print(" ssl%s: %s (external)" % (ifacestr, port))
if SSH_ENABLED:
@ -273,7 +273,7 @@ if SSH_ENABLED:
ssh_service.setName('EvenniaSSH%s' % pstring)
PORTAL.services.addService(ssh_service)
print(" ssh%s: %s" % (ifacestr, port))
print(" ssh%s: %s (external)" % (ifacestr, port))
if WEBSERVER_ENABLED:
@ -287,7 +287,6 @@ if WEBSERVER_ENABLED:
if interface not in ('0.0.0.0', '::') or len(WEBSERVER_INTERFACES) > 1:
ifacestr = "-%s" % interface
for proxyport, serverport in WEBSERVER_PORTS:
pstring = "%s:%s<->%s" % (ifacestr, proxyport, serverport)
web_root = EvenniaReverseProxyResource('127.0.0.1', serverport, '')
webclientstr = ""
if WEBCLIENT_ENABLED:
@ -305,21 +304,20 @@ if WEBSERVER_ENABLED:
from evennia.server.portal import webclient
from evennia.utils.txws import WebSocketFactory
interface = WEBSOCKET_CLIENT_INTERFACE
w_interface = WEBSOCKET_CLIENT_INTERFACE
w_ifacestr = ''
if w_interface not in ('0.0.0.0', '::') or len(WEBSERVER_INTERFACES) > 1:
w_ifacestr = "-%s" % interface
port = WEBSOCKET_CLIENT_PORT
ifacestr = ""
if interface not in ('0.0.0.0', '::'):
ifacestr = "-%s" % interface
pstring = "%s:%s" % (ifacestr, port)
factory = protocol.ServerFactory()
factory.noisy = False
factory.protocol = webclient.WebSocketClient
factory.sessionhandler = PORTAL_SESSIONS
websocket_service = internet.TCPServer(port, WebSocketFactory(factory), interface=interface)
websocket_service.setName('EvenniaWebSocket%s' % pstring)
websocket_service = internet.TCPServer(port, WebSocketFactory(factory), interface=w_interface)
websocket_service.setName('EvenniaWebSocket%s:%s' % (w_ifacestr, proxyport))
PORTAL.services.addService(websocket_service)
websocket_started = True
webclientstr = "\n + webclient%s" % pstring
webclientstr = "\n + webclient-websocket%s: %s (external)" % (w_ifacestr, proxyport)
web_root = Website(web_root, logPath=settings.HTTP_LOG_FILE)
proxy_service = internet.TCPServer(proxyport,
@ -327,7 +325,7 @@ if WEBSERVER_ENABLED:
interface=interface)
proxy_service.setName('EvenniaWebProxy%s' % pstring)
PORTAL.services.addService(proxy_service)
print(" webproxy%s:%s (<-> %s)%s" % (ifacestr, proxyport, serverport, webclientstr))
print(" website-proxy%s: %s (external) %s" % (ifacestr, proxyport, webclientstr))
for plugin_module in PORTAL_SERVICES_PLUGIN_MODULES:

View file

@ -20,9 +20,9 @@ from twisted.conch.interfaces import IConchUser
_SSH_IMPORT_ERROR = """
ERROR: Missing crypto library for SSH. Install it with
pip install cryptography
pip install cryptography pyasn1
(On older Twisted versions you may have to do 'pip install pycrypto pyasn1 instead).
(On older Twisted versions you may have to do 'pip install pycrypto pyasn1' instead).
If you get a compilation error you must install a C compiler and the
SSL dev headers (On Debian-derived systems this is the gcc and libssl-dev

View file

@ -50,9 +50,12 @@ class TelnetProtocol(Telnet, StatefulTelnetProtocol, Session):
# when it reaches 0 the portal/server syncs their data
self.handshakes = 8 # suppress-go-ahead, naws, ttype, mccp, mssp, msdp, gmcp, mxp
self.init_session(self.protocol_name, client_address, self.factory.sessionhandler)
self.protocol_flags["ENCODING"] = settings.ENCODINGS[0] if settings.ENCODINGS else 'utf-8'
# add this new connection to sessionhandler so
# the Server becomes aware of it.
self.sessionhandler.connect(self)
# change encoding to ENCODINGS[0] which reflects Telnet default encoding
# suppress go-ahead
self.sga = suppress_ga.SuppressGA(self)

View file

@ -546,7 +546,7 @@ if AMP_ENABLED:
ifacestr = ""
if AMP_INTERFACE != '127.0.0.1':
ifacestr = "-%s" % AMP_INTERFACE
print(' amp (to Portal)%s: %s' % (ifacestr, AMP_PORT))
print(' amp (to Portal)%s: %s (internal)' % (ifacestr, AMP_PORT))
from evennia.server import amp
@ -586,7 +586,7 @@ if WEBSERVER_ENABLED:
webserver.setName('EvenniaWebServer%s' % serverport)
EVENNIA.services.addService(webserver)
print(" webserver: %s" % serverport)
print(" webserver: %s (internal)" % serverport)
ENABLED = []
if IRC_ENABLED:

View file

@ -7,7 +7,6 @@ from builtins import object
import time
#------------------------------------------------------------
# Server Session
#------------------------------------------------------------