Validating GMCP/MSDP protocol commands, first debugging run and fixes to make a few of the default inputfuncs work. Added INPUTDEBUG to the options dict, to echo input function errors directly.

This commit is contained in:
Griatch 2016-04-06 16:42:11 +02:00
parent 76dc51f885
commit 043be6dba4
6 changed files with 43 additions and 40 deletions

View file

@ -206,6 +206,7 @@ class TelnetProtocol(Telnet, StatefulTelnetProtocol, Session):
def _write(self, data):
"hook overloading the one used in plain telnet"
print "Activated GMCP"
data = data.replace('\n', '\r\n').replace('\r\r\n', '\r\n')
#data = data.replace('\n', '\r\n')
super(TelnetProtocol, self)._write(mccp_compress(self, data))
@ -312,7 +313,6 @@ class TelnetProtocol(Telnet, StatefulTelnetProtocol, Session):
mxp = options.get("mxp", flags.get("MXP", False))
screenreader = options.get("screenreader", flags.get("SCREENREADER", False))
print "screenreader:", screenreader, options, flags
if screenreader:
# screenreader mode cleans up output
text = ansi.parse_ansi(text, strip_ansi=True, xterm256=False, mxp=False)