Implemented xterm256 colours. If not supported by client, converts to normal ANSI, as per kaViir's snippet. Integrates into Evennia's normal ansi parser and collaborates with TTYPE protocol to determine if the client supports it.
This commit is contained in:
parent
fb78758356
commit
4cd80284c9
6 changed files with 194 additions and 146 deletions
|
|
@ -47,7 +47,7 @@ class Ttype(object):
|
|||
self.protocol.negotiationMap[TTYPE] = self.do_ttype
|
||||
# ask if client will ttype, connect callback if it does.
|
||||
self.protocol.will(TTYPE).addCallbacks(self.do_ttype, self.no_ttype)
|
||||
|
||||
|
||||
def no_ttype(self, option):
|
||||
"""
|
||||
Callback if ttype is not supported by client.
|
||||
|
|
@ -79,7 +79,7 @@ class Ttype(object):
|
|||
elif self.ttype_step == 3:
|
||||
self.protocol.protocol_flags['TTYPE']['TERM'] = option
|
||||
self.protocol.requestNegotiation(TTYPE, SEND)
|
||||
elif self.ttype_step == 4 and option.startswith('MTTS'):
|
||||
elif self.ttype_step == 4:
|
||||
option = int(option.strip('MTTS '))
|
||||
self.protocol.protocol_flags['TTYPE']['MTTS'] = option
|
||||
for codenum, standard in MTTS:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue