From 81aa43933cebf4dfae38c325af44697205c7ae30 Mon Sep 17 00:00:00 2001 From: Griatch Date: Sat, 14 Jun 2014 20:35:00 +0200 Subject: [PATCH] Mudlet seems to fail TTYPE handshake if data compression is activated before TTYPE. Should resolve #512. --- src/server/portal/telnet.py | 5 +++-- src/server/portal/ttype.py | 3 +-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/server/portal/telnet.py b/src/server/portal/telnet.py index 3ff53b3bb1..e8c59db7cb 100644 --- a/src/server/portal/telnet.py +++ b/src/server/portal/telnet.py @@ -32,10 +32,11 @@ class TelnetProtocol(Telnet, StatefulTelnetProtocol, Session): self.iaw_mode = False client_address = self.transport.client self.init_session("telnet", client_address, self.factory.sessionhandler) - # negotiate mccp (data compression) - self.mccp = Mccp(self) # negotiate ttype (client info) + # Obs: mudlet ttype does not seem to work if we start mccp before ttype. /Griatch self.ttype = ttype.Ttype(self) + # negotiate mccp (data compression) - turn this off for wireshark analysis + self.mccp = Mccp(self) # negotiate mssp (crawler communication) self.mssp = mssp.Mssp(self) # msdp diff --git a/src/server/portal/ttype.py b/src/server/portal/ttype.py index 3fc5346c02..8ee2afc0ab 100644 --- a/src/server/portal/ttype.py +++ b/src/server/portal/ttype.py @@ -65,7 +65,6 @@ class Ttype(object): certain piece of information about the client. All data is stored on protocol.protocol_flags under the TTYPE key. """ - options = self.protocol.protocol_flags.get('TTYPE') if options and options.get('init_done') or self.ttype_step > 3: @@ -138,5 +137,5 @@ class Ttype(object): self.protocol.protocol_flags['TTYPE'][option.upper()] = True self.protocol.protocol_flags['TTYPE']['init_done'] = True - #print "TTYPE final:", self.protocol.protocol_flags['TTYPE'] + # print "TTYPE final:", self.protocol.protocol_flags['TTYPE'] self.ttype_step += 1