From 75a42ce26ccf2aaf164b98debfdf06a24d95b94d Mon Sep 17 00:00:00 2001 From: Michael Yoo Date: Thu, 21 Mar 2013 22:41:25 +1030 Subject: [PATCH] Added reload feature UNTESTED --- src/API/ConsoleAPI.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/API/ConsoleAPI.php b/src/API/ConsoleAPI.php index 3cdf7712..3b6c488e 100644 --- a/src/API/ConsoleAPI.php +++ b/src/API/ConsoleAPI.php @@ -59,6 +59,12 @@ class ConsoleAPI{ public function defaultCommands($cmd, $params, $issuer, $alias){ $output = ""; switch($cmd){ + case "reload": + $output .= "Reloading..."; + $this->server->api->plugin->loadAll(); + $this->server->api->plugin->initAll(); + $output .= "done\n"; + break; case "crash": //Crashes the server to generate an report $this->callNotDefinedMethodCrash(); $this->server->api->server; //Access a private property @@ -226,4 +232,4 @@ class ConsoleLoop extends Thread{ } exit(0); } -} \ No newline at end of file +}