예제 #1
0
    def auto_detect_spam(self, user):
        if user.url:
            m = re.search(SPAM_TLDS_PATTERN, user.url)
            if m:
                return (True, 'url contains "%s"' % m.string[m.start():m.end()])

        if user.bio:
            m = re.search(SPAM_TERMS_PATTERN, user.bio)
            if m:
                return (True, 'bio contains "%s"' % m.string[m.start():m.end()])

        if user.url:
            m = re.search(SPAM_TERMS_PATTERN, user.url)
            if m:
                return (True, 'url contains "%s"' % m.string[m.start():m.end()])

        # doing this last to avoid unnecessary wait
        if user.bio: 
            if check_post_for_spam_via_defensio(user.bio):
                return (True, '')
        return (False, '')
예제 #2
0
파일: models.py 프로젝트: hgw/rhizome.org
    def auto_detect_spam(self, user):
        if user.url:
            m = re.search(SPAM_TLDS_PATTERN, user.url)
            if m:
                return (True,
                        'url contains "%s"' % m.string[m.start():m.end()])

        if user.bio:
            m = re.search(SPAM_TERMS_PATTERN, user.bio)
            if m:
                return (True,
                        'bio contains "%s"' % m.string[m.start():m.end()])

        if user.url:
            m = re.search(SPAM_TERMS_PATTERN, user.url)
            if m:
                return (True,
                        'url contains "%s"' % m.string[m.start():m.end()])

        # doing this last to avoid unnecessary wait
        if user.bio:
            if check_post_for_spam_via_defensio(user.bio):
                return (True, '')
        return (False, '')
예제 #3
0
파일: models.py 프로젝트: hxrts/rhizome.org
 def auto_detect_spam(self, post):
     if check_post_for_spam_via_defensio(post.description):
         return (True, "")
     return (False, "")
예제 #4
0
파일: models.py 프로젝트: hgw/rhizome.org
 def auto_detect_spam(self, post):
     if check_post_for_spam_via_defensio(post.description):
         return (True, '')
     return (False, '')
예제 #5
0
 def auto_detect_spam(self, comment):
     if check_post_for_spam_via_defensio(comment.comment):
         return (True, '')
     return (False, '')
예제 #6
0
 def auto_detect_spam(self, thread):
     if check_post_for_spam_via_defensio(thread.content_object.comment):
         return (True, '')
     return (False, '')
예제 #7
0
파일: models.py 프로젝트: hgw/rhizome.org
 def auto_detect_spam(self, comment):
     if check_post_for_spam_via_defensio(comment.comment):
         return (True, '')
     return (False, '')
예제 #8
0
파일: models.py 프로젝트: hgw/rhizome.org
 def auto_detect_spam(self, thread):
     if check_post_for_spam_via_defensio(thread.content_object.comment):
         return (True, '')
     return (False, '')