Resolve merge conflicts

This commit is contained in:
Griatch 2020-10-08 23:35:31 +02:00
commit 90a1a0cba8
35 changed files with 2766 additions and 973 deletions

View file

@ -29,7 +29,7 @@ LIMBO_DESC = _(
"""
Welcome to your new |wEvennia|n-based game! Visit http://www.evennia.com if you need
help, want to contribute, report issues or just join the community.
As Account #1 you can create a demo/tutorial area with |w@batchcommand tutorial_world.build|n.
As Account #1 you can create a demo/tutorial area with '|wbatchcommand tutorial_world.build|n'.
"""
)

View file

@ -397,7 +397,7 @@ if WEBSERVER_ENABLED:
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
w_ifacestr = "-%s" % w_interface
port = WEBSOCKET_CLIENT_PORT
class Websocket(WebSocketServerFactory):

View file

@ -239,16 +239,16 @@ class PortalSessionHandler(SessionHandler):
def server_connect(self, protocol_path="", config=dict()):
"""
Called by server to force the initialization of a new protocol
instance. Server wants this instance to get a unique sessid
and to be connected back as normal. This is used to initiate
irc/rss etc connections.
instance. Server wants this instance to get a unique sessid and to be
connected back as normal. This is used to initiate irc/rss etc
connections.
Args:
protocol_path (st): Full python path to the class factory
protocol_path (str): Full python path to the class factory
for the protocol used, eg
'evennia.server.portal.irc.IRCClientFactory'
config (dict): Dictionary of configuration options, fed as
`**kwargs` to protocol class' __init__ method.
`**kwarg` to protocol class `__init__` method.
Raises:
RuntimeError: If The correct factory class is not found.

View file

@ -20,9 +20,7 @@ This implements the following telnet OOB communication protocols:
- GMCP (Generic Mud Communication Protocol) as per
http://www.ironrealms.com/rapture/manual/files/FeatGMCP-txt.html#Generic_MUD_Communication_Protocol%28GMCP%29
Following the lead of KaVir's protocol snippet, we first check if
client supports MSDP and if not, we fallback to GMCP with a MSDP
header where applicable.
----
"""
import re

View file

@ -182,6 +182,16 @@ class AjaxWebClient(resource.Resource):
csessid = self.get_client_sessid(request)
remote_addr = request.getClientIP()
if remote_addr in settings.UPSTREAM_IPS and request.getHeader("x-forwarded-for"):
addresses = [x.strip() for x in request.getHeader("x-forwarded-for").split(",")]
addresses.reverse()
for addr in addresses:
if addr not in settings.UPSTREAM_IPS:
remote_addr = addr
break
host_string = "%s (%s:%s)" % (
_SERVERNAME,
request.getRequestHostname(),

View file

@ -52,6 +52,8 @@ TIMESTEP with a chance given by CHANCE_OF_ACTION by in the order given
(no randomness) and allows for setting up a more complex chain of
commands (such as creating an account and logging in).
----
"""
# Dummy runner settings