From 4e9df899c215516ab1531c7ef91c916febb35ba5 Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Pueyo Date: Wed, 26 Dec 2012 14:02:50 +0100 Subject: [PATCH] Fixed plugins not getting loaded --- classes/API/ServerAPI.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/classes/API/ServerAPI.php b/classes/API/ServerAPI.php index 6e884b47e..91942f7e8 100644 --- a/classes/API/ServerAPI.php +++ b/classes/API/ServerAPI.php @@ -154,8 +154,9 @@ class ServerAPI extends stdClass{ //Yay! I can add anything to this class in run } } foreach($this->apiList as $a){ - if(method_exists($this->$a, "init")){ - $this->$a->init(); + if(method_exists($a[1], "init")){ + $a[1]->init(); + usleep(1); } } @@ -354,7 +355,7 @@ class ServerAPI extends stdClass{ //Yay! I can add anything to this class in run } require_once($file); $this->$name = new $class($this->server); - $this->apiList[] = $name; + $this->apiList[] = array($name, $this->$name); console("[INFO] API ".$name." [".$class."] loaded"); }