[Slashdotjp-dev 1006] [533] Add to forbid Moderation for user doing bad moderation

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2008年 3月 5日 (水) 20:27:05 JST


Revision: 533
          http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=slashdotjp&view=rev&rev=533
Author:   tach
Date:     2008-03-05 20:27:04 +0900 (Wed, 05 Mar 2008)

Log Message:
-----------
Add to forbid Moderation for user doing bad moderation

Modified Paths:
--------------
    slashjp/trunk/plugins/Moderation/Moderation.pm
    slashjp/trunk/sql/mysql/defaults.sql


-------------- next part --------------
Modified: slashjp/trunk/plugins/Moderation/Moderation.pm
===================================================================
--- slashjp/trunk/plugins/Moderation/Moderation.pm	2008-03-05 11:15:48 UTC (rev 532)
+++ slashjp/trunk/plugins/Moderation/Moderation.pm	2008-03-05 11:27:04 UTC (rev 533)
@@ -1359,6 +1359,13 @@
 
 	for my $uid (@$uids) {
 		next unless $uid;
+		if ($self->checkAL2({ uid => $uid }, 'nom1')) {
+			my $rows = $self->setUser($uid, {
+				-tokens	=> 0,
+				-points => 0,
+			});
+			next;
+		}
 		my $rows = $self->setUser($uid, {
 			-lastgranted    => 'NOW()',
 			-tokens         => "GREATEST(0, tokens - $tokentrade)",

Modified: slashjp/trunk/sql/mysql/defaults.sql
===================================================================
--- slashjp/trunk/sql/mysql/defaults.sql	2008-03-05 11:15:48 UTC (rev 532)
+++ slashjp/trunk/sql/mysql/defaults.sql	2008-03-05 11:27:04 UTC (rev 533)
@@ -26,6 +26,7 @@
 INSERT INTO al2_types VALUES (9, 7, 'proxy', 'Valid Proxy');
 INSERT INTO al2_types VALUES (10, 8, 'nopostanon', 'No Comment Post Anon');
 INSERT INTO al2_types VALUES (11, 9, 'spammer', 'Spammer');
+INSERT INTO al2_types VALUES (12, 10, 'nom1', 'No Moderation');
 
 
 #


Slashdotjp-dev メーリングリストの案内
Back to archive index