Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function activitycheck($userid, $threadid, $threadtitle){
- global $L, $sql, $threshold, $thresholdmain, $thresholdacs;
- $activity=$sql->resultq("SELECT COUNT(*) FROM posts WHERE user=$userid AND thread=$threadid AND date>".(ctime()-86400));
- if($activity>=(stristr($threadtitle,'KCS ')?$thresholdacs:$thresholdmain+1) && (!has_perm('bypass-acs-limit') || !has_perm('no-restrictions')) && $threshold ){ // deary me
- print "$L[TBL1]>$L[TR1]>$L[TD1] style='text-align:center'>You have posted enough in the KCS thread today. Come back later!</td></tr>$L[TBLend]";
- die(pagefooter());
- }
- if(($activity>=$thresholdmain) && (!has_perm('bypass-main-limit') || !has_perm('no-restrictions')) && $threshold ){
- print "$L[TBL1]>$L[TR1]>$L[TD1] style='text-align:center'>You have posted enough in this thread today. Come back later!</td></tr>$L[TBLend]";
- die(pagefooter());
- }
- $activity=$sql->resultq("SELECT COUNT(*) FROM posts WHERE user=$userid AND date>".(ctime()-300));
- if($activity && !has_perm('bypass-five-minutes')){
- print "$L[TBL1]>$L[TR1]>$L[TD1]>You can only post once every five minutes! Make it count!</td></tr>$L[TBLend]";
- die(pagefooter());
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement