mirror of
https://github.com/evennia/evennia.git
synced 2026-03-23 16:26:30 +01:00
Add a slight delay to telnet handshake to give mudlet a chance to catch up
This commit is contained in:
parent
42f74dc553
commit
a342353fd6
2 changed files with 12 additions and 4 deletions
|
|
@ -16,7 +16,7 @@ import re
|
|||
import types
|
||||
|
||||
from django.conf import settings
|
||||
from mock import Mock
|
||||
from mock import Mock, mock
|
||||
|
||||
from evennia.commands.default.cmdset_character import CharacterCmdSet
|
||||
from evennia.utils.test_resources import EvenniaTest
|
||||
|
|
@ -37,12 +37,14 @@ _RE = re.compile(r"^\+|-+\+|\+-+|--*|\|(?:\s|$)", re.MULTILINE)
|
|||
# Command testing
|
||||
# ------------------------------------------------------------
|
||||
|
||||
|
||||
@mock.patch("evennia.utils.utils.delay")
|
||||
class CommandTest(EvenniaTest):
|
||||
"""
|
||||
Tests a command
|
||||
"""
|
||||
|
||||
def call(self, cmdobj, args, msg=None, cmdset=None, noansi=True, caller=None, receiver=None, cmdstring=None, obj=None):
|
||||
def call(self, cmdobj, args, msg=None, cmdset=None, noansi=True, caller=None,
|
||||
receiver=None, cmdstring=None, obj=None):
|
||||
"""
|
||||
Test a command by assigning all the needed
|
||||
properties to cmdobj and running
|
||||
|
|
|
|||
|
|
@ -310,7 +310,13 @@ class ServerSessionHandler(SessionHandler):
|
|||
sess.uid = None
|
||||
|
||||
# show the first login command
|
||||
self.data_in(sess, text=[[CMD_LOGINSTART], {}])
|
||||
|
||||
# this delay is necessary notably for Mudlet, which will fail on the connection screen
|
||||
# unless the MXP protocol has been negotiated. Unfortunately this may be too short for some
|
||||
# networks, the symptom is that < and > are not parsed by mudlet on first connection.
|
||||
from evennia.utils.utils import delay
|
||||
delay(0.3, self.data_in, sess, text=[[CMD_LOGINSTART], {}])
|
||||
# self.data_in(sess, text=[[CMD_LOGINSTART], {}])
|
||||
|
||||
def portal_session_sync(self, portalsessiondata):
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue