X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=Uplink%2FP10_Server.class.php;h=465fa3c00d97a830779a26981724ee3dda3f7b2d;hb=cacbfd68b7a6d983e55742ea16cd7be101ab05f0;hp=207b66379147dc2ace2fcd211470657b99163b52;hpb=c9b41fc461c3177ba610b9d2fab8f18b6530367b;p=PHP-P10.git diff --git a/Uplink/P10_Server.class.php b/Uplink/P10_Server.class.php index 207b663..465fa3c 100644 --- a/Uplink/P10_Server.class.php +++ b/Uplink/P10_Server.class.php @@ -70,14 +70,14 @@ class P10_Server { private static $static_servers = array(); - public static getServerByNum($numeric) { + public static function getServerByNum($numeric) { if(array_key_exists($numeric, self::$static_servers)) { return self::$static_servers[$numeric]; } return NULL; } - public static getServerByName($name) { + public static function getServerByName($name) { $name = strtolower($name); foreach(self::$static_servers as $server) { if(strtolower($server->getName()) == $name) { @@ -108,8 +108,10 @@ class P10_Server { self::$static_servers[$numeric] = $this; } - public function disconnectServer($linked_only = false) { + public function disconnectServer($eventHandler, $linked_only = false) { if(!$linked_only) { + if($eventHandler) + $eventHandler->event_squit($this); if($this->parent_server) { $this->parent_server->delServer($this); } @@ -117,7 +119,7 @@ class P10_Server { unset(self::$static_servers[$this->numeric]); } foreach($this->servers as $server) { - $server->disconnectServer(); + $server->disconnectServer($eventHandler); } }