Module Expr Str Import alias ImportFrom alias ImportFrom alias alias alias alias alias alias alias alias ImportFrom alias ImportFrom alias alias alias alias ImportFrom alias alias alias ImportFrom alias alias ImportFrom alias alias alias Assign NameStore Call NameLoad Num Assign NameStore Call NameLoad Num Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr ClassDef bases NameLoad NameLoad NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Expr Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr Num Expr Call AttributeLoad NameLoad attr Str NameLoad AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call NameLoad NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad ImportFrom alias Expr Call NameLoad Num keyword AttributeLoad NameLoad attr keyword NameLoad Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr BinOpAdd NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Num keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str If CompareGt AttributeLoad NameLoad attr Num body If NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Return AugAssignSub AttributeStore NameLoad attr Num If CompareLtE AttributeLoad NameLoad attr Num body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return BoolOpOr CompareEq NameLoad NameLoad CompareEq NameLoad AttributeLoad NameLoad attr CompareEq NameLoad AttributeLoad NameLoad attr CompareEq NameLoad NameLoad CompareEq NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return BoolOpOr CompareEq NameLoad NameLoad CompareEq NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareEq NameLoad NameLoad body Return NameLoad If CompareEq NameLoad NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Return NameLoad orelse Return Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If BoolOpOr BoolOpAnd NameLoad CompareEq SubscriptLoad NameLoad Index Num NameLoad AttributeLoad NameLoad attr body TryExcept body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad If CompareEq Call NameLoad NameLoad Num body Assign AttributeStore NameLoad attr NameLoad orelse Assign AttributeStore NameLoad attr NameLoad Return handlers ExceptHandler type NameLoad name NameStore body Assign NameStore Str TryExcept body For NameStore NameLoad body AugAssignAdd NameStore BinOpAdd Str Call NameLoad Call NameLoad NameLoad handlers ExceptHandler type NameLoad name NameStore body Assign NameStore TupleLoad BinOpAdd Call NameLoad NameLoad Str Call NameLoad NameLoad Assign NameStore BinOpMod Str TupleLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Return If BoolOpAnd AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad body Assign AttributeStore NameLoad attr NameLoad Return orelse If UnaryOpNot Call AttributeLoad NameLoad attr NameLoad body Assign NameStore BinOpAdd Call AttributeLoad NameLoad attr Str Str Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr Str Str attr Str Str Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Call NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str AugAssignAdd NameStore AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad BinOpAdd NameLoad NameLoad attr Str Str Return Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str If NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad kwarg body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad keyword NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad kwarg body Expr Str TryExcept body Assign NameStore Call AttributeLoad NameLoad attr IfExp NameLoad NameLoad Str keyword AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Return If BoolOpAnd CompareIn Str NameLoad CompareIn Str AttributeLoad NameLoad attr body For TupleStore NameStore NameStore NameStore SubscriptLoad NameLoad Index Str body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Dict Assign NameStore Call AttributeLoad NameLoad attr Str IfExp Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Str NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str IfExp Call AttributeLoad NameLoad attr Str BoolOpAnd NameLoad Call AttributeLoad NameLoad attr Str NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str UnaryOpNot BoolOpOr NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad orelse If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr BinOpAdd Call AttributeLoad NameLoad attr Str NameLoad Str keyword NameLoad keyword NameLoad keyword NameLoad If NameLoad body Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr BinOpAdd Call AttributeLoad NameLoad attr Str NameLoad Str keyword NameLoad keyword NameLoad If NameLoad body Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad BinOpAdd NameLoad NameLoad attr Str Str AugAssignAdd NameStore BinOpAdd NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad NameLoad NameLoad If NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad NameLoad BinOpAdd BinOpAdd NameLoad NameLoad NameLoad orelse If CompareEq NameLoad NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad NameLoad BinOpAdd BinOpAdd NameLoad NameLoad NameLoad decorator_list decorator_list
N/A N/A 
This module implements the telnet protocol.

This depends on a generic session module that implements
the actual login procedure of the game, tracks
sessions etc.

 N/A re twisted.internet.task LoopingCall twisted.conch.telnet Telnet StatefulTelnetProtocol IAC LINEMODE GA WILL WONT ECHO evennia.server.session Session evennia.server.portal ttype mssp telnet_oob naws evennia.server.portal.mccp Mccp mccp_compress MCCP evennia.server.portal.mxp Mxp mxp_parse evennia.utils utils ansi logger N/A IAC N/A chr 255 N/A NOP N/A chr 241 N/A _RE_N N/A N/A re compile \{n$ N/A _RE_LEND N/A N/A re compile \n$|\r$ N/A re MULTILINE TelnetProtocol N/A Telnet StatefulTelnetProtocol Session N/A N/A 
    Each player connecting over telnet (ie using most traditional mud
    clients) gets a telnet protocol instance assigned to them.  All
    communication between game and player goes through here.
     connectionMade N/A N/A self N/A N/A N/A 
        This is called when the connection is first established.

         N/A N/A self iaw_mode False N/A N/A self no_lb_mode False N/A client_address N/A N/A self transport client N/A N/A self handshakes 7 N/A N/A N/A self init_session telnet client_address N/A N/A self factory sessionhandler N/A N/A self naws N/A N/A naws Naws self N/A N/A self ttype N/A N/A ttype Ttype self N/A N/A self mccp N/A Mccp self N/A N/A self mssp N/A N/A mssp Mssp self N/A N/A self oob N/A N/A telnet_oob TelnetOOB self N/A N/A self mxp N/A Mxp self N/A N/A N/A N/A self transport setTcpKeepAlive 1 N/A N/A N/A N/A self sessionhandler connect self evennia.utils.utils delay N/A N/A delay 2 callback N/A self handshake_done retval True N/A N/A self keep_alive N/A LoopingCall N/A self _write N/A IAC NOP N/A N/A N/A N/A self keep_alive start 30 now False N/A handshake_done N/A N/A self force N/A False N/A N/A 
        This is called by all telnet extensions once they are finished.
        When all have reported, a sync with the server is performed.
        The system will force-call this sync after a small time to handle
        clients that don't reply to handshakes at all.
         N/A N/A N/A self handshakes 0 N/A N/A force N/A N/A N/A N/A N/A self sessionhandler sync self N/A N/A N/A self handshakes 1 N/A N/A N/A self handshakes 0 N/A N/A N/A N/A N/A self sessionhandler sync self N/A enableRemote N/A N/A self option N/A N/A N/A 
        This sets up the remote-activated options we allow for this protocol.

        Args:
            option (char): The telnet option to enable.

        Returns:
            enable (bool): If this option should be enabled.

         N/A N/A N/A option LINEMODE N/A option N/A ttype TTYPE N/A option N/A naws NAWS N/A option MCCP N/A option N/A mssp MSSP N/A enableLocal N/A N/A self option N/A N/A N/A 
        Call to allow the activation of options for this protocol

        Args:
            option (char): The telnet option to enable locally.

        Returns:
            enable (bool): If this option should be enabled.

         N/A N/A N/A option MCCP N/A option ECHO N/A disableLocal N/A N/A self option N/A N/A N/A 
        Disable a given option locally.

        Args:
            option (char): The telnet option to disable locally.

         N/A N/A option ECHO N/A N/A True N/A N/A option MCCP N/A N/A N/A N/A N/A self mccp no_mccp option N/A True N/A N/A N/A N/A N/A super TelnetProtocol self disableLocal option N/A connectionLost N/A N/A self reason N/A N/A N/A 
        this is executed when the connection is lost for whatever
        reason. it can also be called directly, from the disconnect
        method

        Args:
            reason (str): Motivation for losing connection.

         N/A N/A N/A N/A self sessionhandler disconnect self N/A N/A N/A N/A self transport loseConnection N/A dataReceived N/A N/A self data N/A N/A N/A 
        Handle incoming data over the wire.

        This method will split the incoming data depending on if it
        starts with IAC (a telnet command) or not. All other data will
        be handled in line mode. Some clients also sends an erroneous
        line break after IAC, which we must watch out for.

        Args:
            data (str): Incoming data.

        Notes:
            OOB protocols (MSDP etc) already intercept subnegotiations on
            their own, never entering this method. They will relay their
            parsed data directly to self.data_in.

         N/A N/A N/A data N/A N/A data N/A 0 IAC N/A self iaw_mode N/A N/A N/A N/A N/A N/A N/A super TelnetProtocol self dataReceived data N/A N/A N/A len data 1 N/A N/A N/A self iaw_mode True N/A N/A N/A self iaw_mode False N/A N/A N/A N/A Exception N/A err1 N/A N/A conv N/A N/A N/A b data N/A N/A conv N/A N/A repr N/A ord b N/A N/A N/A Exception N/A err2 N/A N/A conv N/A N/A N/A str err2 : N/A str data N/A out N/A Telnet Error (%s): %s (%s) N/A err1 data conv N/A N/A N/A logger log_trace out N/A N/A N/A N/A self no_lb_mode N/A N/A _RE_LEND match data N/A N/A N/A self no_lb_mode False N/A N/A N/A N/A N/A N/A _RE_LEND search data N/A N/A data N/A N/A N/A data rstrip N/A N/A self no_lb_mode True N/A N/A N/A StatefulTelnetProtocol dataReceived self data N/A _write N/A N/A self data N/A N/A N/A hook overloading the one used in plain telnet N/A data N/A N/A N/A N/A data replace replace N/A N/A N/A N/A super TelnetProtocol self _write N/A mccp_compress self data N/A sendLine N/A N/A self line N/A N/A N/A 
        Hook overloading the one used by linereceiver.

        Args:
            line (str): Line to send.

         N/A line N/A self delimiter N/A line N/A N/A N/A N/A line replace IAC N/A IAC IAC replace N/A N/A N/A N/A self transport write N/A mccp_compress self line N/A lineReceived N/A N/A self string N/A N/A N/A 
        Telnet method called when data is coming in over the telnet
        connection. We pass it on to the game engine directly.

        Args:
            string (str): Incoming data.

         N/A N/A N/A self data_in text string N/A disconnect N/A N/A self reason N/A None N/A N/A 
        generic hook for the engine to call in order to
        disconnect this protocol.

        Args:
            reason (str): Reason for disconnecting.

         N/A reason N/A N/A N/A N/A self data_out reason N/A N/A N/A self connectionLost reason N/A data_in N/A N/A self text N/A None kwargs N/A N/A 
        Data User -> Evennia

        Kwargs:
            text (str): Incoming text.
            kwargs (any): Options from the protocol.

         N/A N/A N/A N/A self sessionhandler data_in self text text kwargs N/A data_out N/A N/A self text N/A None kwargs N/A N/A 
        Data Evennia -> User. A generic hook method for engine to call
        in order to send data through the telnet connection.

        Kwargs:
            text (str): Text to send.
            oob (list): `[(cmdname,args,kwargs), ...]`, supply an
                Out-of-Band instruction.
            xterm256 (bool): Enforce xterm256 setting. If not given,
                ttype result is used. If client does not suport xterm256,
                the ansi fallback will be used
            mxp (bool): Enforce mxp setting. If not given, enables if
                we detected client support for it
            ansi (bool): Enforce ansi setting. If not given, ttype
                result is used.
            nomarkup (bool): If True, strip all ansi markup (this is
                the same as `xterm256=False, ansi=False`)
            raw (bool):Pass string through without any ansi processing
                (i.e. include Evennia ansi markers but do not convert them
                into ansi tokens)
            prompt (str): Supply a prompt text which gets sent without
                a newline added to the end.
            echo (str): Turn on/off line echo on the client, if the
                client supports it (e.g. for password input). Remember
                that you must manually activate it again later.

        Notes:
            The telnet TTYPE negotiation flags, if any, are used if no kwargs
            are given.

         N/A N/A N/A text N/A N/A utils to_str N/A text text encoding N/A self encoding N/A N/A N/A Exception N/A e N/A N/A N/A N/A self sendLine N/A str e N/A N/A N/A N/A oob kwargs N/A OOB N/A self protocol_flags N/A N/A N/A cmdname args okwargs N/A kwargs N/A oob N/A N/A N/A N/A N/A self oob data_out cmdname args okwargs N/A ttype N/A N/A N/A self protocol_flags get TTYPE N/A N/A xterm256 N/A N/A kwargs get xterm256 N/A N/A N/A ttype get init_done N/A N/A ttype get 256 COLORS False True N/A useansi N/A N/A kwargs get ansi N/A N/A N/A ttype get init_done N/A ttype N/A N/A ttype get ANSI False True N/A raw N/A N/A kwargs get raw False N/A nomarkup N/A N/A kwargs get nomarkup N/A N/A xterm256 useansi N/A prompt N/A N/A kwargs get prompt N/A echo N/A N/A kwargs get echo None N/A mxp N/A N/A kwargs get mxp N/A N/A N/A self protocol_flags get MXP False N/A raw N/A N/A N/A N/A self sendLine text N/A N/A text N/A N/A linetosend N/A N/A ansi parse_ansi N/A N/A N/A _RE_N sub text {n strip_ansi nomarkup xterm256 xterm256 mxp mxp N/A mxp N/A N/A linetosend N/A mxp_parse linetosend N/A N/A N/A self sendLine linetosend N/A prompt N/A N/A prompt N/A N/A ansi parse_ansi N/A N/A N/A _RE_N sub prompt {n strip_ansi nomarkup xterm256 xterm256 N/A mxp N/A N/A prompt N/A mxp_parse prompt N/A prompt N/A N/A N/A N/A prompt replace IAC N/A IAC IAC replace N/A prompt N/A IAC GA N/A N/A N/A N/A self transport write N/A mccp_compress self prompt N/A echo N/A N/A N/A N/A N/A self transport write N/A mccp_compress self N/A N/A IAC WONT ECHO N/A N/A N/A echo False N/A N/A N/A N/A N/A self transport write N/A mccp_compress self N/A N/A IAC WILL ECHO N/A N/A