Igor Gariev (gariev) wrote in changelog,
Igor Gariev
gariev
changelog

[ljcom] r7293: LJSUP-4253: 5000 comments captcha

Committer: gariev
LJSUP-4253: 5000 comments captcha

U   trunk/cgi-bin/LJ/Hooks/Caps.pm
Modified: trunk/cgi-bin/LJ/Hooks/Caps.pm
===================================================================
--- trunk/cgi-bin/LJ/Hooks/Caps.pm	2009-05-14 03:40:59 UTC (rev 7292)
+++ trunk/cgi-bin/LJ/Hooks/Caps.pm	2009-05-14 04:28:11 UTC (rev 7293)
@@ -139,6 +139,15 @@
     return $quota;
 });
 
+LJ::register_hook("check_cap_maxcomments-before-captcha", sub {
+    my $u = shift;
+    return undef unless $u;
+    my $username = $u->user;
+    return 1e9 if $LJ::NO_CAPTCHA_AFTER_MAXCOMMNETS{$username};
+    return;
+});
+
+
 # LJ::LJcom::note_user_transition() is called directly from 
 # elsewhere in the code base so it is defined in ljcom.pl
 

Subscribe

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 2 comments