View Full Version : Banned IP Addresses
fmgrowit
02-05-2012, 06:10 PM
Is there some way to stop "Contact us" messages from banned IP's?
In includes/functions.php in function verify_ip_ban() (around line 1000 in vb 4.1.10) there's this code:
// make sure we can contact the admin
if (THIS_SCRIPT == 'sendmessage' AND (empty($_REQUEST['do']) OR $_REQUEST['do'] == 'contactus' OR $_REQUEST['do'] == 'docontactus'))
{
return;
}
that specifically allows access to "Contact us" from banned ips. So you could comment out or remove that code.
Or if you want to do it via a plugin, I think you could use hook location sendmessage_start and code like:
$savedo = $_REQUEST['do'];
unset($_REQUEST['do']);
verify_ip_ban();
$_REQUEST['do'] = $savedo;
(but I haven't actually tried it).
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.