Exemple #1
0
    def data_out(self, text=None, **kwargs):
        """
        Send Evennia -> User

        Kwargs:
            text (str): A text to relay
            kwargs (any): Other parameters to the protocol.

        """
        #from evennia.server.profiling.timetrace import timetrace
        #text = timetrace(text, "ServerSession.data_out")

        text = text if text else ""
        if _INLINEFUNC_ENABLED and not "raw" in kwargs:
            text = parse_inlinefunc(text,
                                    strip="strip_inlinefunc" in kwargs,
                                    session=self)
        if self.screenreader:
            global _ANSI
            if not _ANSI:
                from evennia.utils import ansi as _ANSI
            text = _ANSI.parse_ansi(text,
                                    strip_ansi=True,
                                    xterm256=False,
                                    mxp=False)
            text = _RE_SCREENREADER_REGEX.sub("", text)
        session = kwargs.pop('session', None)
        session = session or self
        self.sessionhandler.data_out(session, text=text, **kwargs)
Exemple #2
0
 def data_out(self, text=None, **kwargs):
     """
     Send Evennia -> User
     """
     text = text if text else ""
     if _INLINEFUNC_ENABLED and not "raw" in kwargs:
         text = parse_inlinefunc(text, strip="strip_inlinefunc" in kwargs, session=self)
     if self.screenreader:
         global _ANSI
         if not _ANSI:
             from evennia.utils import ansi as _ANSI
         text = _ANSI.parse_ansi(text, strip_ansi=True, xterm256=False, mxp=False)
         text = _RE_SCREENREADER_REGEX.sub("", text)
     session = kwargs.pop('session', None)
     session = session or self
     self.sessionhandler.data_out(session, text=text, **kwargs)
    def data_out(self, text=None, **kwargs):
        """
        Send Evennia -> User
        """

        text = text if text else ""
        if _INLINEFUNC_ENABLED and not "raw" in kwargs:
            text = parse_inlinefunc(text, strip="strip_inlinefunc" in kwargs, session=self)
        if self.screenreader:
            global _ANSI
            if not _ANSI:
                from evennia.utils import ansi as _ANSI
            text = _ANSI.parse_ansi(text, strip_ansi=True, xterm256=False, mxp=False)
            text = _RE_SCREENREADER_REGEX.sub("", text)
        session = kwargs.pop('session', None)
        session = session or self
        #@karthik
        text += '\n<EOM>'
        self.sessionhandler.data_out(session, text=text, **kwargs)
Exemple #4
0
    def data_out(self, text=None, **kwargs):
        """
        Send Evennia -> User

        Kwargs:
            text (str): A text to relay
            kwargs (any): Other parameters to the protocol.

        """
        # from evennia.server.profiling.timetrace import timetrace
        # text = timetrace(text, "ServerSession.data_out")

        text = text if text else ""
        if _INLINEFUNC_ENABLED and not "raw" in kwargs:
            text = parse_inlinefunc(text, strip="strip_inlinefunc" in kwargs, session=self)
        if self.screenreader:
            global _ANSI
            if not _ANSI:
                from evennia.utils import ansi as _ANSI
            text = _ANSI.parse_ansi(text, strip_ansi=True, xterm256=False, mxp=False)
            text = _RE_SCREENREADER_REGEX.sub("", text)
        self.sessionhandler.data_out(self, text=text, **kwargs)