mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-06 11:57:10 +00:00
Fixed #156
This commit is contained in:
parent
2a8c72dfc2
commit
8bbd899689
@ -62,6 +62,7 @@ class BanAPI{
|
||||
}
|
||||
|
||||
public function isOp($username){
|
||||
$username = strtolower($username);
|
||||
if($this->server->api->dhandle("op.check", $username) === true){
|
||||
return true;
|
||||
}elseif($this->ops->exists($username)){
|
||||
@ -77,7 +78,7 @@ class BanAPI{
|
||||
}
|
||||
|
||||
if($data["issuer"] instanceof Player){
|
||||
if($this->server->api->handle("console.check", $data) === true or $this->isOp($data["issuer"]->username)){
|
||||
if($this->server->api->handle("console.check", $data) === true or $this->isOp($data["issuer"]->iusername)){
|
||||
return true;
|
||||
}
|
||||
}elseif($data["issuer"] === "console"){
|
||||
|
@ -646,9 +646,10 @@ class Player{
|
||||
|
||||
if($this->server->whitelist === true and !$this->server->api->ban->inWhitelist($this->iusername)){
|
||||
$this->close("\"\x1b[33m".$this->username."\x1b[0m\" not being on white-list", false);
|
||||
break;
|
||||
return;
|
||||
}elseif($this->server->api->ban->isBanned($this->iusername) or $this->server->api->ban->isIPBanned($this->ip)){
|
||||
$this->close("\"\x1b[33m".$this->username."\x1b[0m\" is banned!", false);
|
||||
return;
|
||||
}
|
||||
$u = $this->server->api->player->get($this->iusername);
|
||||
if($u !== false){
|
||||
@ -657,7 +658,12 @@ class Player{
|
||||
|
||||
$this->server->api->player->add($this->CID);
|
||||
if($this->server->api->handle("player.join", $this) === false){
|
||||
$this->close();
|
||||
$this->close("join cancelled", false);
|
||||
return;
|
||||
}
|
||||
|
||||
if(!($this->data instanceof Config)){
|
||||
$u->close("no config created", false);
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user