'Determine whether the vote should affect the author\'s karma.'

def determine_affects_karma(self, vote):

    from r2.models import Comment
    if (not self.affects_score):
        return False
    if vote.previous_vote:
        if (not vote.previous_vote.effects.affects_karma):
            self.add_note('PREVIOUS_VOTE_NO_KARMA')
            return False
    if (not bool(vote.thing.affects_karma_type)):
        self.add_note('KARMALESS_THING')
        return False
    if (isinstance(vote.thing, Comment) and vote.thing.is_distinguished):
        link = vote.thing.link_slow
        if (vote.thing._id == link.sticky_comment_id):
            self.add_note('COMMENT_STICKIED')
            return False
    if self.validator:
        affects_karma = self.validator.determine_affects_karma()
        if (affects_karma is not None):
            return affects_karma
    return True
