From f7de979de1602ceaa06b9f0fefd20941c374c040 Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Pueyo Date: Fri, 5 Apr 2013 15:14:32 +0200 Subject: [PATCH] Added commands to whitelist --- src/API/ChatAPI.php | 2 ++ src/API/PlayerAPI.php | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/API/ChatAPI.php b/src/API/ChatAPI.php index 1e53971a..83582e3a 100644 --- a/src/API/ChatAPI.php +++ b/src/API/ChatAPI.php @@ -34,6 +34,8 @@ class ChatAPI{ public function init(){ $this->server->api->console->register("tell", "Sends a private message to a player", array($this, "commandHandler")); $this->server->api->console->register("me", "Broadcast an action", array($this, "commandHandler")); + $this->server->api->ban->cmdWhitelist("tell"); + $this->server->api->ban->cmdWhitelist("me"); } public function commandHandler($cmd, $params, $issuer, $alias){ diff --git a/src/API/PlayerAPI.php b/src/API/PlayerAPI.php index 31618e08..a3ba4c9e 100644 --- a/src/API/PlayerAPI.php +++ b/src/API/PlayerAPI.php @@ -41,6 +41,8 @@ class PlayerAPI{ $this->server->api->console->register("tp", "Teleports a player to another player", array($this, "commandHandler")); $this->server->api->console->register("lag", "Measure your connection lag", array($this, "commandHandler")); $this->server->api->console->alias("suicide", "kill"); + $this->server->api->ban->cmdWhitelist("list"); + $this->server->api->ban->cmdWhitelist("lag"); } public function handle($data, $event){