# evennia.server.portal.ttype

TTYPE (MTTS) - Mud Terminal Type Standard

This module implements the TTYPE telnet protocol as per http://tintin.sourceforge.net/mtts/. It allows the server to ask the client about its capabilities. If the client also supports TTYPE, it will return with information such as its name, if it supports colour etc. If the client does not support TTYPE, this will be ignored.

All data will be stored on the protocol’s protocol_flags dictionary, under the ‘TTYPE’ key.

class `evennia.server.portal.ttype.``Ttype`(protocol)

  Bases: `object`

  Handles ttype negotiations. Called and initiated by the telnet protocol.

  `__init__`(protocol)

    Initialize ttype by storing protocol on ourselves and calling the client to see if it supporst ttype.

    Parameters

      protocol (Protocol) – The protocol instance.

    Notes

    The self.ttype_step indicates how far in the data retrieval we’ve gotten.

  `wont_ttype`(option)

    Callback if ttype is not supported by client.

    Parameters

      option (Option) – Not used.

  `will_ttype`(option)

    Handles negotiation of the ttype protocol once the client has confirmed that it will respond with the ttype protocol.

    Parameters

      option (Option) – Not used.

    Notes

    The negotiation proceeds in several steps, each returning a certain piece of information about the client. All data is stored on protocol.protocol_flags under the TTYPE key.