mirror of
https://github.com/evennia/evennia.git
synced 2026-03-28 18:47:16 +01:00
Add IAC+GA for telnet messaging, as per #1330.
This commit is contained in:
parent
cbf2e44dc8
commit
b269ef265e
2 changed files with 6 additions and 2 deletions
|
|
@ -221,7 +221,7 @@ class TelnetProtocol(Telnet, StatefulTelnetProtocol, Session):
|
|||
# escape IAC in line mode, and correctly add \r\n
|
||||
line += self.delimiter
|
||||
line = line.replace(IAC, IAC + IAC).replace('\n', '\r\n')
|
||||
return self.transport.write(mccp_compress(self, line))
|
||||
return self.transport.write(mccp_compress(self, line + IAC + GA))
|
||||
|
||||
# Session hooks
|
||||
|
||||
|
|
|
|||
|
|
@ -47,7 +47,11 @@ IAC = chr(255)
|
|||
SB = chr(250)
|
||||
SE = chr(240)
|
||||
|
||||
force_str = lambda inp: to_str(inp, force_string=True)
|
||||
|
||||
def force_str(inp):
|
||||
"""Helper to shorten code"""
|
||||
return to_str(inp, force_string=True)
|
||||
|
||||
|
||||
# pre-compiled regexes
|
||||
# returns 2-tuple
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue