Journal Slash Privacy Watch's Journal: comments.pl:1082: isTroll()
################################################## ################
# Troll Detection: checks to see if this IP or UID has been
# abusing the system in the last 24 hours.
# 1=Troll 0=Good Little Goober
sub isTroll {
my $slashdb = getCurrentDB();
my $user = getCurrentUser();
my $form = getCurrentForm();
return 0 if $user->{seclev} > 99;
my $good_behavior = 0;
if (!$user->{is_anon} and $user->{karma} >= 1) {
if ($form->{postanon}) {
# If the user is signed in but posting anonymously,
# their karma helps a little bit to offset their
# trollishness. But not much.
$good_behavior = int(log($user->{karma}));
} else {
# If the user is signed in and posting under their
# own name, their karma can help to offset quite a
# bit of their trollishness.
$good_behavior = getCurrentStatic('goodkarma');
$good_behavior = $user->{karma}
if $user->{karma} < $good_behavior;
}
}
# Troll Detection: checks to see if this IP or UID has been
# abusing the system in the last 24 hours.
# 1=Troll 0=Good Little Goober
sub isTroll {
my $slashdb = getCurrentDB();
my $user = getCurrentUser();
my $form = getCurrentForm();
return 0 if $user->{seclev} > 99;
my $good_behavior = 0;
if (!$user->{is_anon} and $user->{karma} >= 1) {
if ($form->{postanon}) {
# If the user is signed in but posting anonymously,
# their karma helps a little bit to offset their
# trollishness. But not much.
$good_behavior = int(log($user->{karma}));
} else {
# If the user is signed in and posting under their
# own name, their karma can help to offset quite a
# bit of their trollishness.
$good_behavior = getCurrentStatic('goodkarma');
$good_behavior = $user->{karma}
if $user->{karma} < $good_behavior;
}
}