This commit is contained in:
Catalin Novgorodschi
2026-02-12 08:58:10 +02:00
parent 260896570e
commit e4850eb188
3 changed files with 39 additions and 2 deletions
+9 -1
View File
@@ -310,7 +310,15 @@ class Units {
$rallyPointLevel = ($village->resarray)['f39'];
$invalidBuildings = [];
//Add Rate Limiting per Player - RECOMMENDED
if (!$database->checkAttackRateLimit($session->uid, 30)) {
$form->addError("error", "Too many attacks. Please wait.");
$_SESSION['errorarray'] = $form->getErrors();
header("Location: a2b.php");
exit;
//Add Rate Limiting per Player - RECOMMENDED
}
// fill the array with the invalid buildings
if($rallyPointLevel >= 3 && $rallyPointLevel < 5){
for($i = 1; $i <= 37; $i++){