'Send text data. This is an in-band telnet operation.
Args:
text (str): The first argument is always the text string to send. No other arguments
are considered.
Kwargs:
options (dict): Send-option flags
- mxp: Enforce MXP link support.
- ansi: Enforce no ANSI colors.
- xterm256: Enforce xterm256 colors, regardless of TTYPE setting.
- nocolor: Strip all colors.
- raw: Pass string through without any ansi processing
(i.e. include Evennia ansi markers but do not
convert them into ansi tokens)
- echo: Turn on/off line echo on the client. Turn
off line echo for client, for example for password.
Note that it must be actively turned back on again!'

def send_text(self, *args, **kwargs):

    text = (args[0] if args else '')
    if (text is None):
        return
    text = to_str(text, force_string=True)
    options = kwargs.get('options', {})
    flags = self.protocol_flags
    xterm256 = options.get('xterm256', flags.get('XTERM256', True))
    useansi = options.get('ansi', flags.get('ANSI', True))
    raw = options.get('raw', flags.get('RAW', False))
    nocolor = options.get('nocolor', (flags.get('NOCOLOR') or (not (xterm256 or useansi))))
    screenreader = options.get('screenreader', flags.get('SCREENREADER', False))
    if screenreader:
        text = ansi.parse_ansi(text, strip_ansi=True, xterm256=False, mxp=False)
        text = _RE_SCREENREADER_REGEX.sub('', text)
    if raw:
        self.sendLine(text)
        return
    else:
        linetosend = ansi.parse_ansi((_RE_N.sub('', text) + ('||n' if text.endswith('|') else '|n')), strip_ansi=nocolor, xterm256=xterm256, mxp=False)
        self.sendLine(linetosend)
