Schedule player kick so it can read the reason

This commit is contained in:
Shoghi Cervantes 2013-12-02 01:00:11 +01:00
parent 230a3c00fc
commit 8532f53f8e

View File

@ -175,7 +175,9 @@ class BanAPI{
}else{
$reason = implode(" ", $params);
$reason = $reason == "" ? "No reason":$reason;
$player->close("You have been kicked: ".$reason);
$this->server->schedule(60, array($player, "close"), "You have been kicked: ".$reason); //Forces a kick
$player->blocked = true;
if($issuer instanceof Player){
$this->server->api->chat->broadcast($player->username." has been kicked by ".$issuer->username.": $reason\n");
}else{