projects
/
PHP-P10.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed P10_Channel.class.php checkChannel()
[PHP-P10.git]
/
Uplink
/
P10_Server.class.php
diff --git
a/Uplink/P10_Server.class.php
b/Uplink/P10_Server.class.php
index 1b65ed95e79e2731ca448ee04dc14c289a5270ff..ba9200e24c796905eecd53aa0504f9ab35b38aae 100644
(file)
--- a/
Uplink/P10_Server.class.php
+++ b/
Uplink/P10_Server.class.php
@@
-87,6
+87,14
@@
class P10_Server {
return NULL;
}
return NULL;
}
+ public static function getServerCount() {
+ return count(self::$static_servers);
+ }
+
+ public static function getServers() {
+ return self::$static_servers;
+ }
+
private $name;
private $numeric;
private $name;
private $numeric;
@@
-108,8
+116,10
@@
class P10_Server {
self::$static_servers[$numeric] = $this;
}
self::$static_servers[$numeric] = $this;
}
- public function disconnectServer($linked_only = false) {
+ public function disconnectServer($
eventHandler, $
linked_only = false) {
if(!$linked_only) {
if(!$linked_only) {
+ if($eventHandler)
+ $eventHandler->event_squit($this);
if($this->parent_server) {
$this->parent_server->delServer($this);
}
if($this->parent_server) {
$this->parent_server->delServer($this);
}
@@
-117,7
+127,7
@@
class P10_Server {
unset(self::$static_servers[$this->numeric]);
}
foreach($this->servers as $server) {
unset(self::$static_servers[$this->numeric]);
}
foreach($this->servers as $server) {
- $server->disconnectServer();
+ $server->disconnectServer(
$eventHandler
);
}
}
}
}
@@
-175,6
+185,10
@@
class P10_Server {
public function getUsers() {
return $this->users;
}
public function getUsers() {
return $this->users;
}
+
+ public function getUserCount() {
+ return count($this->users);
+ }
}
?>
\ No newline at end of file
}
?>
\ No newline at end of file