svnno****@sourc*****
svnno****@sourc*****
2008年 3月 5日 (水) 20:15:49 JST
Revision: 532 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=slashdotjp&view=rev&rev=532 Author: tach Date: 2008-03-05 20:15:48 +0900 (Wed, 05 Mar 2008) Log Message: ----------- Add to forbid Moderation for user doing bad moderation Modified Paths: -------------- slashjp/branches/2.5.0.192/debian/changelog slashjp/branches/2.5.0.192/plugins/Moderation/Moderation.pm slashjp/branches/2.5.0.192/sql/mysql/defaults.sql -------------- next part -------------- Modified: slashjp/branches/2.5.0.192/debian/changelog =================================================================== --- slashjp/branches/2.5.0.192/debian/changelog 2008-03-04 10:52:57 UTC (rev 531) +++ slashjp/branches/2.5.0.192/debian/changelog 2008-03-05 11:15:48 UTC (rev 532) @@ -1,3 +1,9 @@ +slash (2.5.0.192-7) unstable; urgency=low + + * Add to forbid Moderation for user doing bad moderation + + -- Taku YASUI <tach****@osdn*****> Wed, 5 Mar 2008 11:13:24 +0000 + slash (2.5.0.192-6) unstable; urgency=low * Fix email message for new user creation Modified: slashjp/branches/2.5.0.192/plugins/Moderation/Moderation.pm =================================================================== --- slashjp/branches/2.5.0.192/plugins/Moderation/Moderation.pm 2008-03-04 10:52:57 UTC (rev 531) +++ slashjp/branches/2.5.0.192/plugins/Moderation/Moderation.pm 2008-03-05 11:15:48 UTC (rev 532) @@ -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/branches/2.5.0.192/sql/mysql/defaults.sql =================================================================== --- slashjp/branches/2.5.0.192/sql/mysql/defaults.sql 2008-03-04 10:52:57 UTC (rev 531) +++ slashjp/branches/2.5.0.192/sql/mysql/defaults.sql 2008-03-05 11:15:48 UTC (rev 532) @@ -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'); #