perceval/backends/core/supybot.py
def _parse_supybot_msg(self, line):
        """Parse message section"""

        patterns = [(self.SUPYBOT_COMMENT_REGEX, self.TCOMMENT),
                    (self.SUPYBOT_COMMENT_ACTION_REGEX, self.TCOMMENT),
                    (self.SUPYBOT_SERVER_REGEX, self.TSERVER),
                    (self.SUPYBOT_BOT_REGEX, self.TCOMMENT)]

        for p in patterns:
            m = p[0].match(line)
            if not m:
                continue
            return p[1], m.group('nick'), m.group('body').strip()

        msg = "invalid message on line %s" % (str(self.nline))
        raise ParseError(cause=msg)
def _parse_supybot_msg(self, line):
        """Parse message section"""

        patterns = [(self.SUPYBOT_COMMENT_REGEX, self.TCOMMENT),
                    (self.SUPYBOT_COMMENT_ACTION_REGEX, self.TCOMMENT),
                    (self.SUPYBOT_SERVER_REGEX, self.TSERVER),
                    (self.SUPYBOT_BOT_REGEX, self.TCOMMENT)]

        for p in patterns:
            m = p[0].match(line)
            if not m:
                continue
            return p[1], m.group('nick'), m.group('body').strip()

        msg = "invalid message on line %s" % (str(self.nline))
        raise ParseError(cause=msg)
def _parse_supybot_msg ( self , line ) : patterns = [ ( self . SUPYBOT_COMMENT_REGEX , self . TCOMMENT ) , ( self . SUPYBOT_COMMENT_ACTION_REGEX , self . TCOMMENT ) , ( self . SUPYBOT_SERVER_REGEX , self . TSERVER ) , ( self . SUPYBOT_BOT_REGEX , self . TCOMMENT ) ] for p in patterns : m = p [ 0 ] . match ( line ) if not m : continue return p [ 1 ] , m . group ( 'nick' ) , m . group ( 'body' ) . strip ( ) msg = "invalid message on line %s" % ( str ( self . nline ) ) raise ParseError ( cause = msg )
Parse message section
Parse message section