65 $this->parent = $host;
66 $this->nodeInfo = $info;
68 if(!array_key_exists($index, $this->nodeInfo))
73 $this->nodeId = $this->nodeInfo[$index];
83 public function request($cmd, $throw = TRUE)
90 return $this->
getParent()->request($cmd, $throw);
103 $channels = $this->
request(
"channellist -topic -flags -voice -limits -icon")->toAssocArray(
"cid");
107 foreach($channels as $cid => $channel)
137 $cid = $this->
execute(
"channelcreate", $properties)->toList();
140 if(!isset($properties[
"client_flag_permanent"]) && !isset($properties[
"client_flag_semi_permanent"]))
142 $this->
getParent()->whoamiSet(
"client_channel_id", $cid[
"cid"]);
157 $this->
execute(
"channeldelete", array(
"cid" => $cid,
"force" => $force));
176 $this->
execute(
"channelmove", array(
"cid" => $cid,
"cpid" => $pid,
"order" => $order));
188 return (preg_match(
"/\[[^\]]*spacer[^\]]*\]/", $channel) && $channel[
"channel_flag_permanent"] && !$channel[
"pid"]) ? TRUE : FALSE;
206 "channel_name_phonetic" =>
"channel spacer",
208 "channel_codec_quality" => 0x00,
209 "channel_flag_permanent" => TRUE,
210 "channel_flag_maxclients_unlimited" => FALSE,
211 "channel_flag_maxfamilyclients_unlimited" => FALSE,
212 "channel_flag_maxfamilyclients_inherited" => FALSE,
213 "channel_maxclients" => $maxclients,
214 "channel_order" => $order,
220 $properties[
"channel_name"] =
"[*spacer" . strval($ident) .
"]";
224 $properties[
"channel_name"] =
"[lspacer" . strval($ident) .
"]";
228 $properties[
"channel_name"] =
"[rspacer" . strval($ident) .
"]";
232 $properties[
"channel_name"] =
"[cspacer" . strval($ident) .
"]";
243 $properties[
"channel_name"] .=
"___";
247 $properties[
"channel_name"] .=
"---";
251 $properties[
"channel_name"] .=
"...";
255 $properties[
"channel_name"] .=
"-.-";
259 $properties[
"channel_name"] .=
"-..";
263 $properties[
"channel_name"] .= strval($type);
286 switch($channel[
"channel_name"]->section(
"]", 1))
319 if(!$this->
channelIsSpacer($channel) || !preg_match(
"/\[(.*)spacer.*\]/", $channel, $matches) || !isset($matches[1]))
349 return $this->
execute(
"channelpermlist", array(
"cid" => $cid, $permsid ?
"-permsid" : null))->toAssocArray($permsid ?
"permsid" :
"permid");
363 if(!is_array($permid))
365 $permident = (is_numeric($permid)) ?
"permid" :
"permsid";
369 $permident = (is_numeric(
current($permid))) ?
"permid" :
"permsid";
372 $this->
execute(
"channeladdperm", array(
"cid" => $cid, $permident => $permid,
"permvalue" => $permvalue));
384 if(!is_array($permid))
386 $permident = (is_numeric($permid)) ?
"permid" :
"permsid";
390 $permident = (is_numeric(
current($permid))) ?
"permid" :
"permsid";
393 $this->
execute(
"channeldelperm", array(
"cid" => $cid, $permident => $permid));
406 return $this->
execute(
"channelclientpermlist", array(
"cid" => $cid,
"cldbid" => $cldbid, $permsid ?
"-permsid" : null))->toAssocArray($permsid ?
"permsid" :
"permid");
421 if(!is_array($permid))
423 $permident = (is_numeric($permid)) ?
"permid" :
"permsid";
427 $permident = (is_numeric(
current($permid))) ?
"permid" :
"permsid";
430 $this->
execute(
"channelclientaddperm", array(
"cid" => $cid,
"cldbid" => $cldbid, $permident => $permid,
"permvalue" => $permvalue));
443 if(!is_array($permid))
445 $permident = (is_numeric($permid)) ?
"permid" :
"permsid";
449 $permident = (is_numeric(
current($permid))) ?
"permid" :
"permsid";
452 $this->
execute(
"channelclientdelperm", array(
"cid" => $cid,
"cldbid" => $cldbid, $permident => $permid));
466 $files = $this->
execute(
"ftgetfilelist", array(
"cid" => $cid,
"cpw" => $cpw,
"path" => $path))->toArray();
467 $count =
count($files);
469 for($i = 0; $i < $count; $i++)
471 $files[$i][
"sid"] = $this->
getId();
472 $files[$i][
"cid"] = $files[0][
"cid"];
473 $files[$i][
"path"] = $files[0][
"path"];
476 if(!$files[$i][
"src"]->endsWith(
"/"))
478 $files[$i][
"src"]->append(
"/");
481 $files[$i][
"src"]->append($files[$i][
"name"]);
485 $files = array_merge($files, $this->
channelFileList($cid, $cpw, $path . $files[$i][
"name"], $recursive));
489 uasort($files, array(__CLASS__,
"sortFileList"));
504 return array_pop($this->
execute(
"ftgetfileinfo", array(
"cid" => $cid,
"cpw" => $cpw,
"name" => $name))->
toArray());
519 public function channelFileRename($cid, $cpw =
"", $oldname =
"/", $newname =
"/", $tcid = null, $tcpw = null)
521 $this->
execute(
"ftrenamefile", array(
"cid" => $cid,
"cpw" => $cpw,
"oldname" => $oldname,
"newname" => $newname,
"tcid" => $tcid,
"tcpw" => $tcpw));
534 $this->
execute(
"ftdeletefile", array(
"cid" => $cid,
"cpw" => $cpw,
"name" => $name));
547 $this->
execute(
"ftcreatedir", array(
"cid" => $cid,
"cpw" => $cpw,
"dirname" => $dirname));
578 $pathway = $channel[
"channel_name"];
582 $pathway = $this->
channelGetPathway($channel[
"pid"]) .
"/" . $channel[
"channel_name"];
597 if(!array_key_exists((
string) $cid, $this->
channelList()))
616 if($channel[
"channel_name"] == $name)
return $channel;
632 $clients = $this->
request(
"clientlist -uid -away -badges -voice -info -times -groups -icon -country -ip")->toAssocArray(
"clid");
636 foreach($clients as $clid => $client)
638 if($this->
getParent()->getExcludeQueryClients() && $client[
"client_type"])
continue;
643 uasort($this->
clientList, array(__CLASS__,
"sortClientList"));
670 return $this->
execute(
"clientfind", array(
"pattern" => $pattern))->toAssocArray(
"clid");
683 return $this->
execute(
"clientdblist -count", array(
"start" => $offset,
"duration" => $limit))->toAssocArray(
"cldbid");
693 return current($this->
execute(
"clientdblist -count", array(
"duration" => 1))->toList(
"count"));
704 return $this->
execute(
"clientdbinfo", array(
"cldbid" => $cldbid))->toList();
717 return array_keys($this->
execute(
"clientdbfind", array(
"pattern" => $pattern, ($uid) ?
"-uid" : null))->toAssocArray(
"cldbid"));
729 return $this[
"virtualserver_clientsonline"]-$this[
"virtualserver_queryclientsonline"];
741 if(!array_key_exists((
string) $clid, $this->
clientList()))
746 return $this->
clientList[intval((
string) $clid)];
760 if($client[
"client_nickname"] == $name)
return $client;
777 if($client[
"client_unique_identifier"] == $uid)
return $client;
794 if($client[
"client_database_id"] == $dbid)
return $client;
809 return $this->
execute(
"clientgetnamefromuid", array(
"cluid" => $cluid))->toList();
821 return $this->
execute(
"clientgetids", array(
"cluid" => $cluid))->toAssocArray(
"clid");
833 return $this->
execute(
"clientgetnamefromdbid", array(
"cldbid" => $cldbid))->toList();
845 return $this->
execute(
"servergroupsbyclientid", array(
"cldbid" => $cldbid))->toAssocArray(
"sgid");
860 $this->
execute(
"clientmove", array(
"clid" => $clid,
"cid" => $cid,
"cpw" => $cpw));
864 $clid = $clid->getId();
867 if($cid instanceof TeamSpeak3_Node_Abstract)
869 $cid = $cid->getId();
872 if(!is_array($clid) && $clid == $this->whoamiGet(
"client_id"))
874 $this->
getParent()->whoamiSet(
"client_channel_id", $cid);
890 $this->
execute(
"clientkick", array(
"clid" => $clid,
"reasonid" => $reasonid,
"reasonmsg" => $reasonmsg));
902 $this->
execute(
"clientpoke", array(
"clid" => $clid,
"msg" => $msg));
914 public function clientBan($clid, $timeseconds = null, $reason = null)
918 $bans = $this->
execute(
"banclient", array(
"clid" => $clid,
"time" => $timeseconds,
"banreason" => $reason))->toAssocArray(
"banid");
920 return array_keys($bans);
932 $properties[
"cldbid"] = $cldbid;
934 $this->
execute(
"clientdbedit", $properties);
945 $this->
execute(
"clientdbdelete", array(
"cldbid" => $cldbid));
958 $this->
execute(
"setclientchannelgroup", array(
"cldbid" => $cldbid,
"cid" => $cid,
"cgid" => $cgid));
972 return $this->
execute(
"clientpermlist", array(
"cldbid" => $cldbid, $permsid ?
"-permsid" : null))->toAssocArray($permsid ?
"permsid" :
"permid");
987 if(!is_array($permid))
989 $permident = (is_numeric($permid)) ?
"permid" :
"permsid";
993 $permident = (is_numeric(
current($permid))) ?
"permid" :
"permsid";
996 $this->
execute(
"clientaddperm", array(
"cldbid" => $cldbid, $permident => $permid,
"permvalue" => $permvalue,
"permskip" => $permskip));
1008 if(!is_array($permid))
1010 $permident = (is_numeric($permid)) ?
"permid" :
"permsid";
1014 $permident = (is_numeric(
current($permid))) ?
"permid" :
"permsid";
1017 $this->
execute(
"clientdelperm", array(
"cldbid" => $cldbid, $permident => $permid));
1028 if($this->sgroupList === null)
1030 $this->sgroupList = $this->
request(
"servergrouplist")->toAssocArray(
"sgid");
1032 foreach($this->sgroupList as $sgid => $group)
1037 uasort($this->sgroupList, array(__CLASS__,
"sortGroupList"));
1040 return $this->
filterList($this->sgroupList, $filter);
1050 $this->sgroupList = null;
1064 $sgid = $this->
execute(
"servergroupadd", array(
"name" => $name,
"type" => $type))->toList();
1066 return $sgid[
"sgid"];
1082 $sgid = $this->
execute(
"servergroupcopy", array(
"ssgid" => $ssgid,
"tsgid" => $tsgid,
"name" => $name,
"type" => $type))->toList();
1089 return count($sgid) ? $sgid[
"sgid"] : intval($tsgid);
1103 $this->
execute(
"servergrouprename", array(
"sgid" => $sgid,
"name" => $name));
1118 $this->
execute(
"servergroupdel", array(
"sgid" => $sgid,
"force" => $force));
1135 return $this->sgroupList[intval((
string) $sgid)];
1150 if($group[
"name"] == $name && $group[
"type"] == $type)
return $group;
1165 return $this->
execute(
"servergrouppermlist", array(
"sgid" => $sgid, $permsid ?
"-permsid" : null))->toAssocArray($permsid ?
"permsid" :
"permid");
1181 if(!is_array($permid))
1183 $permident = (is_numeric($permid)) ?
"permid" :
"permsid";
1187 $permident = (is_numeric(
current($permid))) ?
"permid" :
"permsid";
1190 $this->
execute(
"servergroupaddperm", array(
"sgid" => $sgid, $permident => $permid,
"permvalue" => $permvalue,
"permnegated" => $permnegated,
"permskip" => $permskip));
1203 if(!is_array($permid))
1205 $permident = (is_numeric($permid)) ?
"permid" :
"permsid";
1209 $permident = (is_numeric(
current($permid))) ?
"permid" :
"permsid";
1212 $this->
execute(
"servergroupdelperm", array(
"sgid" => $sgid, $permident => $permid));
1223 if($this[
"virtualserver_default_server_group"] == $sgid)
1228 return $this->
execute(
"servergroupclientlist", array(
"sgid" => $sgid,
"-names"))->toAssocArray(
"cldbid");
1243 $this->
execute(
"servergroupaddclient", array(
"sgid" => $sgid,
"cldbid" => $cldbid));
1255 $this->
execute(
"servergroupdelclient", array(
"sgid" => $sgid,
"cldbid" => $cldbid));
1266 $profiles = array();
1272 $profiles[$sgid] = array(
1273 "b_permission_modify_power_ignore" => 0,
1274 "i_group_needed_member_add_power" => 0,
1275 "i_group_member_add_power" => 0,
1276 "i_group_needed_member_remove_power" => 0,
1277 "i_group_member_remove_power" => 0,
1278 "i_needed_modify_power_count" => 0,
1279 "i_needed_modify_power_total" => 0,
1280 "i_permission_modify_power" => 0,
1281 "i_group_needed_modify_power" => 0,
1282 "i_group_modify_power" => 0,
1283 "i_client_needed_modify_power" => 0,
1284 "i_client_modify_power" => 0,
1285 "b_virtualserver_servergroup_create" => 0,
1286 "b_virtualserver_servergroup_delete" => 0,
1287 "b_client_ignore_bans" => 0,
1288 "b_client_ignore_antiflood" => 0,
1289 "b_group_is_permanent" => 0,
1290 "i_client_needed_ban_power" => 0,
1291 "i_client_needed_kick_power" => 0,
1292 "i_client_needed_move_power" => 0,
1293 "i_client_talk_power" => 0,
1295 "__name" => $sgroup->toString(),
1296 "__node" => $sgroup,
1302 $grant = isset($perms[
"i_permission_modify_power"]) ? $perms[
"i_permission_modify_power"][
"permvalue"] : null;
1307 if($e->getCode() != 0x501)
throw $e;
1313 foreach($perms as $permsid => $perm)
1315 if(in_array($permsid, array_keys($profiles[$sgid])))
1317 $profiles[$sgid][$permsid] = $perm[
"permvalue"];
1321 if(!$grant || $perm[
"permvalue"] > $grant)
continue;
1323 $profiles[$sgid][
"i_needed_modify_power_total"] = $profiles[$sgid][
"i_needed_modify_power_total"]+$perm[
"permvalue"];
1324 $profiles[$sgid][
"i_needed_modify_power_count"]++;
1329 array_multisort($profiles, SORT_DESC);
1358 if($this->cgroupList === null)
1360 $this->cgroupList = $this->
request(
"channelgrouplist")->toAssocArray(
"cgid");
1362 foreach($this->cgroupList as $cgid => $group)
1367 uasort($this->cgroupList, array(__CLASS__,
"sortGroupList"));
1370 return $this->
filterList($this->cgroupList, $filter);
1380 $this->cgroupList = null;
1394 $cgid = $this->
execute(
"channelgroupadd", array(
"name" => $name,
"type" => $type))->toList();
1396 return $cgid[
"cgid"];
1412 $cgid = $this->
execute(
"channelgroupcopy", array(
"scgid" => $scgid,
"tcgid" => $tcgid,
"name" => $name,
"type" => $type))->toList();
1419 return count($cgid) ? $cgid[
"cgid"] : intval($tcgid);
1433 $this->
execute(
"channelgrouprename", array(
"cgid" => $cgid,
"name" => $name));
1448 $this->
execute(
"channelgroupdel", array(
"cgid" => $cgid,
"force" => $force));
1465 return $this->cgroupList[intval((
string) $cgid)];
1480 if($group[
"name"] == $name && $group[
"type"] == $type)
return $group;
1495 return $this->
execute(
"channelgrouppermlist", array(
"cgid" => $cgid, $permsid ?
"-permsid" : null))->toAssocArray($permsid ?
"permsid" :
"permid");
1509 if(!is_array($permid))
1511 $permident = (is_numeric($permid)) ?
"permid" :
"permsid";
1515 $permident = (is_numeric(
current($permid))) ?
"permid" :
"permsid";
1518 $this->
execute(
"channelgroupaddperm", array(
"cgid" => $cgid, $permident => $permid,
"permvalue" => $permvalue));
1531 if(!is_array($permid))
1533 $permident = (is_numeric($permid)) ?
"permid" :
"permsid";
1537 $permident = (is_numeric(
current($permid))) ?
"permid" :
"permsid";
1540 $this->
execute(
"channelgroupdelperm", array(
"cgid" => $cgid, $permident => $permid));
1555 if($this[
"virtualserver_default_channel_group"] == $cgid)
1560 return $this->
execute(
"channelgroupclientlist", array(
"cgid" => $cgid,
"cid" => $cid,
"cldbid" => $cldbid))->toArray();
1571 $token = $this->
request(
"permreset")->toList();
1575 return $token[
"token"];
1587 $assignments = $this->permissionFind($permid);
1589 foreach($assignments as $assignment)
1591 switch($assignment[
"t"])
1618 return count($assignments);
1634 public function transferInitUpload($clientftfid, $cid, $name, $size, $cpw =
"", $overwrite = FALSE, $resume = FALSE)
1636 $upload = $this->
execute(
"ftinitupload", array(
"clientftfid" => $clientftfid,
"cid" => $cid,
"name" => $name,
"cpw" => $cpw,
"size" => $size,
"overwrite" => $overwrite,
"resume" => $resume))->toList();
1638 if(array_key_exists(
"status", $upload) && $upload[
"status"] != 0x00)
1643 $upload[
"cid"] = $cid;
1644 $upload[
"file"] = $name;
1646 if(!array_key_exists(
"ip", $upload) || $upload[
"ip"]->startsWith(
"0.0.0.0"))
1648 $upload[
"ip"] = $this->
getParent()->getAdapterHost();
1649 $upload[
"host"] = $upload[
"ip"];
1653 $upload[
"ip"] = $upload[
"ip"]->section(
",");
1654 $upload[
"host"] = $upload[
"ip"];
1675 $download = $this->
execute(
"ftinitdownload", array(
"clientftfid" => $clientftfid,
"cid" => $cid,
"name" => $name,
"cpw" => $cpw,
"seekpos" => $seekpos))->toList();
1677 if(array_key_exists(
"status", $download) && $download[
"status"] != 0x00)
1682 $download[
"cid"] = $cid;
1683 $download[
"file"] = $name;
1685 if(!array_key_exists(
"ip", $download) || $download[
"ip"]->startsWith(
"0.0.0.0"))
1687 $download[
"ip"] = $this->
getParent()->getAdapterHost();
1688 $download[
"host"] = $download[
"ip"];
1692 $download[
"ip"] = $download[
"ip"]->section(
",");
1693 $download[
"host"] = $download[
"ip"];
1709 return $this->
request(
"ftlist")->toAssocArray(
"serverftfid");
1721 $this->
execute(
"ftstop", array(
"serverftfid" => $serverftfid,
"delete" => $delete));
1731 if($this->
iconIsLocal(
"virtualserver_icon_id") || $this[
"virtualserver_icon_id"] == 0)
return;
1734 $transfer =
TeamSpeak3::factory(
"filetransfer://" . $download[
"host"] .
":" . $download[
"port"]);
1736 return $transfer->download($download[
"ftkey"], $download[
"size"]);
1747 $crc = crc32($data);
1748 $size = strlen($data);
1750 $upload = $this->
transferInitUpload(rand(0x0000, 0xFFFF), 0,
"/icon_" . $crc, $size);
1751 $transfer =
TeamSpeak3::factory(
"filetransfer://" . $upload[
"host"] .
":" . $upload[
"port"]);
1753 $transfer->upload($upload[
"ftkey"], $upload[
"seekpos"], $data);
1766 $this->
execute(
"serveredit", $properties);
1789 return $this->
request(
"messagelist")->toAssocArray(
"msgid");
1802 $this->
execute(
"messageadd", array(
"cluid" => $cluid,
"subject" => $subject,
"message" => $message));
1813 $this->
execute(
"messagedel", array(
"msgid" => $msgid));
1825 $msg = $this->
execute(
"messageget", array(
"msgid" => $msgid))->toList();
1829 $this->
execute(
"messageget", array(
"msgid" => $msgid,
"flag" => $flag_read));
1843 $snapshot = $this->
request(
"serversnapshotcreate")->toString(FALSE);
1848 return $snapshot->toBase64();
1852 return $snapshot->toHex();
1856 return (
string) $snapshot;
1886 $detail = $this->
request(
"serversnapshotdeploy " . $data)->toList();
1888 if(array_key_exists(
"sid", $detail))
1907 $this->
execute(
"servernotifyregister", array(
"event" => $event,
"id" => $id));
1918 $this->
request(
"servernotifyunregister");
1941 $tokens = $this->
request(
"privilegekeylist")->toAssocArray(
"token");
1945 foreach($tokens as $token => $array)
1947 $func = $array[
"token_type"] ?
"channelGroupGetById" :
"serverGroupGetById";
1951 $tokens[$token][
"token_id1"] = $this->$func($array[
"token_id1"])->name;
1956 if($e->getCode() != 0xA00)
throw $e;
1961 if($array[
"token_type"]) $tokens[$token][
"token_id2"] = $this->
channelGetById($array[
"token_id2"])->getPathway();
1966 if($e->getCode() != 0x300)
throw $e;
1996 $token = $this->
execute(
"privilegekeyadd", array(
"tokentype" => $type,
"tokenid1" => $id1,
"tokenid2" => $id2,
"tokendescription" => $description,
"tokencustomset" => $customset))->toList();
2000 return $token[
"token"];
2021 $this->
execute(
"privilegekeydelete", array(
"token" => $token));
2043 $this->
execute(
"privilegekeyuse", array(
"token" => $token));
2055 return $this->
execute(
"customsearch", array(
"ident" => $ident,
"pattern" => $pattern))->toArray();
2066 return $this->
execute(
"custominfo", array(
"cldbid" => $cldbid))->toArray();
2076 return $this->
request(
"banlist")->toAssocArray(
"banid");
2098 public function banCreate(array $rules, $timeseconds = null, $reason = null)
2100 $rules[
"time"] = $timeseconds;
2101 $rules[
"banreason"] = $reason;
2103 $banid = $this->
execute(
"banadd", $rules)->toList();
2105 return $banid[
"banid"];
2116 $this->
execute(
"bandel", array(
"banid" => $banid));
2128 return $this->
execute(
"complainlist", array(
"tcldbid" => $tcldbid))->toArray();
2139 $this->
execute(
"complaindelall", array(
"tcldbid" => $tcldbid));
2151 $this->
execute(
"complainadd", array(
"tcldbid" => $tcldbid,
"message" => $message));
2163 $this->
execute(
"complaindel", array(
"tcldbid" => $tcldbid,
"fcldbid" => $fcldbid));
2174 $passwords = $this->
request(
"servertemppasswordlist")->toAssocArray(
"pw_clear");
2178 foreach($passwords as $password => $array)
2184 $passwords[$password][
"tcname"] = $channel->toString();
2185 $passwords[$password][
"tcpath"] = $channel->getPathway();
2190 if($e->getCode() != 0xA00)
throw $e;
2213 $this->
execute(
"servertemppasswordadd", array(
"pw" => $pw,
"duration" => $duration,
"tcid" => $tcid,
"tcpw" => $tcpw,
"desc" => $desc));
2224 $this->
execute(
"servertemppassworddel", array(
"pw" => $pw));
2236 public function logView($lines = 30, $begin_pos = null, $reverse = null, $instance = null)
2238 return $this->
execute(
"logview", array(
"lines" => $lines,
"begin_pos" => $begin_pos,
"instance" => $instance,
"reverse" => $reverse))->toArray();
2250 $this->
execute(
"logadd", array(
"logmsg" => $logmsg,
"loglevel" => $loglevel));
2260 return $this->
request(
"serverrequestconnectioninfo")->toList();
2268 public function delete()
2315 $this->
execute(
"clientupdate", $properties);
2317 foreach($properties as $ident => $value)
2319 $this->whoamiSet($ident, $value);
2332 $password = $this->
execute(
"clientsetserverquerylogin", array(
"client_login_name" => $username))->toList();
2334 return $password[
"client_login_password"];
2344 return $this->
execute(
"permoverview", array(
"cldbid" => $this->whoamiGet(
"client_database_id"),
"cid" => $this->whoamiGet(
"client_channel_id"),
"permid" => 0))->toArray();
2352 $this->nodeList = array();
2356 if($channel[
"pid"] == 0)
2358 $this->nodeList[] = $channel;
2368 $this->nodeInfo = array_merge($this->nodeInfo, $this->
request(
"serverinfo")->toList());
2380 if(get_class($a) != get_class($b))
2406 return strcmp(strtolower($a[
"client_nickname"]), strtolower($b[
"client_nickname"]));
2418 if(get_class($a) != get_class($b))
2451 if(!array_key_exists(
"src", $a) || !array_key_exists(
"src", $b) || !array_key_exists(
"type", $a) || !array_key_exists(
"type", $b))
2458 if($a[
"type"] != $b[
"type"])
2460 return ($a[
"type"] < $b[
"type"]) ? -1 : 1;
2463 return strcmp(strtolower($a[
"src"]), strtolower($b[
"src"]));
2473 return ($this[
"virtualserver_status"] ==
"online") ? TRUE : FALSE;
2483 return ($this[
"virtualserver_status"] ==
"offline") ? TRUE : FALSE;
2493 return $this->
getParent()->getUniqueId() .
"_s" . $this->
getId();
2503 if($this[
"virtualserver_clientsonline"]-$this[
"virtualserver_queryclientsonline"] >= $this[
"virtualserver_maxclients"])
2505 return "server_full";
2507 elseif($this[
"virtualserver_flag_password"])
2509 return "server_pass";
2513 return "server_open";
2534 return (
string) $this[
"virtualserver_name"];