PDA

View Full Version : Flood Control - Different times for Different Usergroups?


Chris M
07-07-2002, 12:42 PM
Hi...

Id like the ability to give different Flood Control times to different Usergroups...

I still want Mods to be controlled by Flood Control, but I dont want them to have to wait 60 seconds...

Is there a way that I could assign different Flood Control times to different groups, like 60 seconds for Registered, 30 seconds for Contributors and 15 for Mods?

Satan

Xenon
07-07-2002, 12:53 PM
mods aren't controlled by the floodcontrol as i know:
if ($bbuserinfo[userid]!=0 and time()-$bbuserinfo[lastpost]<=$floodchecktime and !ismoderator($foruminfo[forumid])) {
as you can see floodcheck is just enabled if the user isn't a mod

Chris M
07-07-2002, 02:18 PM
Hmmm...

Is there a way round that?

Satan

Xenon
07-07-2002, 02:29 PM
yes you can add another field in the usergrouptable called floodchecktime, then you have to add the editfields for that in usergroup.php (not so hard isn't it)

and then in newreply.php:

find:if ($enablefloodcheck) {
if ($bbuserinfo[userid]!=0 and time()-$bbuserinfo[lastpost]<=$floodchecktime and !ismoderator($foruminfo[forumid])) {
eval("standarderror(\"".gettemplate("error_floodcheck")."\");");
exit;
}
}

and replace it with:if ($enablefloodcheck) {
$floodtime=$DB_site->query_first("SELECT floodchecktime FROM usergroup WHERE usergroupid=".$bbuserinfo[usergroupid]);
if ($bbuserinfo[userid]!=0 and time()-$bbuserinfo[lastpost]<=$floodtime[floodchecktime]) {
eval("standarderror(\"".gettemplate("error_floodcheck")."\");");
exit;
}
}


so also your admins/mods are floodchecked :)

Chris M
07-07-2002, 02:36 PM
Cool:)

I'll try that when our board gets back to full health:)

Satan