diff --git a/mud.tin b/mud.tin index 2bf5fa6..b0fa21d 100644 --- a/mud.tin +++ b/mud.tin @@ -10,9 +10,9 @@ #NOP protocol negotiation: tintin++ does NOT auto-negotiate MSDP or #NOP GMCP. CATCH intercepts before the default DONT response, and -#NOP #line raw bypasses IAC escaping so the DO bytes arrive intact. -#EVENT {CATCH IAC WILL GMCP} {#line raw #send {\xFF\xFD\xC9}} -#EVENT {CATCH IAC WILL MSDP} {#line raw #send {\xFF\xFD\x45}} +#NOP #send handles hex escapes natively (no raw option needed). +#EVENT {CATCH IAC WILL GMCP} {#send {\xFF\xFD\xC9\}} +#EVENT {CATCH IAC WILL MSDP} {#send {\xFF\xFD\x45\}} #NOP store incoming MSDP variables and refresh status bar #EVENT {IAC SB MSDP} { diff --git a/src/mudlib/server.py b/src/mudlib/server.py index 16ed9d9..a4bad4e 100644 --- a/src/mudlib/server.py +++ b/src/mudlib/server.py @@ -256,10 +256,14 @@ async def shell( _writer.write("What is your name? ") await _writer.drain() - name_input = await readline2(_reader, _writer) - if name_input is None or not name_input.strip(): - _writer.close() - return + # Skip empty lines from client negotiation bytes, only close on actual disconnect + while True: + name_input = await readline2(_reader, _writer) + if name_input is None: + _writer.close() + return + if name_input.strip(): + break player_name = name_input.strip()