mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-06-29 00:54:31 +00:00
more fixes
This commit is contained in:
@@ -161,20 +161,13 @@ class Units {
|
||||
$form->addError("error","Player is under beginners protection. You can't attack him");
|
||||
}
|
||||
|
||||
//check if banned:
|
||||
//check if banned/admin:
|
||||
$villageOwner = $database->getVillageField($id,'owner');
|
||||
$userAccess = $database->getUserField($villageOwner,'access',0);
|
||||
if($userAccess == '0'){
|
||||
if($userAccess == '0' or $userAccess == '8' or $userAccess == '9'){
|
||||
$form->addError("error","Player is Banned. You can't attack him");
|
||||
//break;
|
||||
}
|
||||
//check if admin:
|
||||
$villageOwner = $database->getVillageField($id,'owner');
|
||||
$userAccess = $database->getUserField($villageOwner,'access',0);
|
||||
if($userAccess == '9'){
|
||||
$form->addError("error","Player is Admin. You can't attack him");
|
||||
//break;
|
||||
}
|
||||
|
||||
//check if attacking same village that units are in
|
||||
if($id == $village->wid){
|
||||
|
||||
Reference in New Issue
Block a user