diff --git a/GameEngine/Automation.php b/GameEngine/Automation.php
index 0b5df4cb..0dc82714 100644
--- a/GameEngine/Automation.php
+++ b/GameEngine/Automation.php
@@ -206,6 +206,7 @@ class Automation {
$this->checkInvitedPlayes();
$this->updateStore();
$this->procClimbers();
+ $this->CheckBan();
}
private function loyaltyRegeneration() {
@@ -3834,8 +3835,8 @@ $crannyimg = "
query_return($users);
$ranking->procRankArray();
@@ -3890,7 +3891,19 @@ $crannyimg = "
query_return($q);
+ foreach($array as $banlist) {
+ mysql_query("UPDATE ".TB_PREFIX."banlist SET active = 0 WHERE id = ".$banlist['id']."");
+ mysql_query("UPDATE ".TB_PREFIX."users SET access = 2 WHERE id = ".$banlist['uid']."");
+ }
+ }
+
}
$automation = new Automation;
?>
\ No newline at end of file
diff --git a/GameEngine/Building.php b/GameEngine/Building.php
index dd53dcec..faba2c6d 100644
--- a/GameEngine/Building.php
+++ b/GameEngine/Building.php
@@ -312,6 +312,7 @@ class Building {
}
}
$level = $database->getResourceLevel($village->wid);
+ if($session->access!=BANNED){
if($database->addBuilding($village->wid,$id,$village->resarray['f'.$id.'t'],$loop,$time+($loop==1?ceil(60/SPEED):0),0,$level['f'.$id] + 1 + count($database->getBuildingByField($village->wid,$id)))) {
$database->modifyResource($village->wid,$uprequire['wood'],$uprequire['clay'],$uprequire['iron'],$uprequire['crop'],0);
$logging->addBuildLog($village->wid,$this->procResType($village->resarray['f'.$id.'t']),($village->resarray['f'.$id]+($loopsame>0?2:1)),0);
@@ -322,6 +323,9 @@ class Building {
header("Location: dorf1.php");
}
}
+ }else{
+ header("Location: banned.php");
+ }
}
}
@@ -352,11 +356,15 @@ class Building {
$time = $this->buildArray[0]['timestamp'] + round($dataarray[$village->resarray['f'.$id]-1]['time'] / 4);
}
}
+ if($session->access!=BANNED){
$level = $database->getResourceLevel($village->wid);
if($database->addBuilding($village->wid,$id,$village->resarray['f'.$id.'t'],$loop,$time,0,0,$level['f'.$id] + 1 + count($database->getBuildingByField($village->wid,$id)))) {
$logging->addBuildLog($village->wid,$this->procResType($village->resarray['f'.$id.'t']),($village->resarray['f'.$id]-1),2);
header("Location: dorf2.php");
}
+ }else{
+ header("Location: banned.php");
+ }
}
}
@@ -383,12 +391,16 @@ class Building {
}
}
if($this->meetRequirement($tid)) {
+ if($session->access!=BANNED){
$level = $database->getResourceLevel($village->wid);
if($database->addBuilding($village->wid,$id,$tid,$loop,$time,0,$level['f'.$id] + 1 + count($database->getBuildingByField($village->wid,$id)))) {
$logging->addBuildLog($village->wid,$this->procResType($tid),($village->resarray['f'.$id]+1),1);
$database->modifyResource($village->wid,$uprequire['wood'],$uprequire['clay'],$uprequire['iron'],$uprequire['crop'],0);
header("Location: dorf2.php");
}
+ }else{
+ header("Location: banned.php");
+ }
}
}
}
diff --git a/GameEngine/Units.php b/GameEngine/Units.php
index 2526b1ca..d5efd632 100644
--- a/GameEngine/Units.php
+++ b/GameEngine/Units.php
@@ -250,6 +250,7 @@ class Units {
header("Location: a2b.php");
} else {
+if($session->access != BANNED){
if($session->tribe == 1){ $u = ""; } elseif($session->tribe == 2){ $u = "1"; } elseif($session->tribe == 3){ $u = "2"; }elseif($session->tribe == 4){ $u = "3"; }else {$u = "4"; }
@@ -334,11 +335,14 @@ class Units {
}
header("Location: build.php?id=39");
+}else{
+header("Location: banned.php");
+}
}}
private function sendTroopsBack($post) {
global $form, $database, $village, $generator, $session, $technology;
-
+if($session->access != BANNED){
$enforce=$database->getEnforceArray($post['ckey'],0);
if(($enforce['from']==$village->wid) || ($enforce['vref']==$village->wid)){
$to = $database->getVillage($enforce['from']);
@@ -459,6 +463,9 @@ class Units {
header("Location: a2b.php");
}
}
+}else{
+header("Location: banned.php");
+}
}
public function Settlers($post) {
diff --git a/Templates/Message/sent.tpl b/Templates/Message/sent.tpl
index 3f3a131a..e5af5732 100644
--- a/Templates/Message/sent.tpl
+++ b/Templates/Message/sent.tpl
@@ -20,7 +20,7 @@