Fixed whitelist command & auto-disconnect

This commit is contained in:
Shoghi Cervantes Pueyo 2012-12-14 00:42:13 +01:00
parent e76734628a
commit a7ec472ef4
2 changed files with 2 additions and 2 deletions

View File

@ -156,7 +156,7 @@ class ConsoleAPI{
$this->server->api->setProperty("white-list", false); $this->server->api->setProperty("white-list", false);
break; break;
default: default:
console("[INFO] Usage: /whitelist <on | off | add | reload | list> [username]"); console("[INFO] Usage: /whitelist <on | off | add | remove | reload | list> [username]");
break; break;
} }
break; break;

View File

@ -85,12 +85,12 @@ class Session{
$this->server->deleteEvent($ev[0], $ev[1]); $this->server->deleteEvent($ev[0], $ev[1]);
} }
$this->eventHandler("You have been kicked. Reason: ".$reason, "onChat"); $this->eventHandler("You have been kicked. Reason: ".$reason, "onChat");
$this->dataPacket(MC_DISCONNECT);
$this->connected = false; $this->connected = false;
if($msg === true){ if($msg === true){
$this->server->trigger("onChat", $this->username." left the game"); $this->server->trigger("onChat", $this->username." left the game");
} }
console("[INFO] Session with ".$this->ip.":".$this->port." Client ID ".$this->clientID." closed due to ".$reason); console("[INFO] Session with ".$this->ip.":".$this->port." Client ID ".$this->clientID." closed due to ".$reason);
$this->dataPacket(MC_DISCONNECT);
$this->server->api->player->remove($this->CID); $this->server->api->player->remove($this->CID);
} }