Move GMCP/MSDP offers to initial negotiation

The old begin_advanced_negotiation relied on a telnetlib3 hook that races with the negotiation timer — by the time it fires, the timer has already declared negotiation complete. Moving to begin_negotiation sends the offers alongside standard options (TTYPE, NAWS, ECHO) so clients see them immediately.
This commit is contained in:
Jared Miller 2026-02-12 14:36:25 -05:00
parent 05b377f00a
commit aafdcdca42
Signed by: shmup
GPG key ID: 22B5C6D66A38B06C

View file

@ -229,9 +229,9 @@ async def handle_login(
class MudTelnetServer(TelnetServer):
"""Telnet server that offers GMCP and MSDP during negotiation."""
def begin_advanced_negotiation(self) -> None:
"""Offer GMCP and MSDP alongside the standard options."""
super().begin_advanced_negotiation()
def begin_negotiation(self) -> None:
"""Offer GMCP and MSDP as part of initial negotiation."""
super().begin_negotiation()
assert self.writer is not None
gmcp_ok = self.writer.iac(WILL, GMCP)
msdp_ok = self.writer.iac(WILL, MSDP)