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:
parent
05b377f00a
commit
aafdcdca42
1 changed files with 3 additions and 3 deletions
|
|
@ -229,9 +229,9 @@ async def handle_login(
|
||||||
class MudTelnetServer(TelnetServer):
|
class MudTelnetServer(TelnetServer):
|
||||||
"""Telnet server that offers GMCP and MSDP during negotiation."""
|
"""Telnet server that offers GMCP and MSDP during negotiation."""
|
||||||
|
|
||||||
def begin_advanced_negotiation(self) -> None:
|
def begin_negotiation(self) -> None:
|
||||||
"""Offer GMCP and MSDP alongside the standard options."""
|
"""Offer GMCP and MSDP as part of initial negotiation."""
|
||||||
super().begin_advanced_negotiation()
|
super().begin_negotiation()
|
||||||
assert self.writer is not None
|
assert self.writer is not None
|
||||||
gmcp_ok = self.writer.iac(WILL, GMCP)
|
gmcp_ok = self.writer.iac(WILL, GMCP)
|
||||||
msdp_ok = self.writer.iac(WILL, MSDP)
|
msdp_ok = self.writer.iac(WILL, MSDP)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue