46 $this->nodeInfo = $info;
48 if(!array_key_exists($index, $this->nodeInfo))
53 $this->nodeId = $this->nodeInfo[$index];
62 public function modify(array $properties)
64 $properties[
"clid"] = $this->
getId();
66 $this->
execute(
"clientedit", $properties);
78 return $this->
getParent()->clientModifyDb($this[
"client_database_id"], $properties);
88 return $this->
getParent()->clientDeleteDb($this[
"client_database_id"]);
98 return $this->
getParent()->clientInfoDb($this[
"client_database_id"]);
119 public function move($cid, $cpw = null)
121 return $this->
getParent()->clientMove($this->
getId(), $cid, $cpw);
133 return $this->
getParent()->clientKick($this->
getId(), $reasonid, $reasonmsg);
155 public function ban($timeseconds = null, $reason = null)
157 return $this->
getParent()->clientBan($this->
getId(), $timeseconds, $reason);
167 return $this->
getParent()->customInfo($this[
"client_database_id"]);
178 return $this->
execute(
"permoverview", array(
"cldbid" => $this[
"client_database_id"],
"cid" => $cid,
"permid" => 0))->toArray();
189 return $this->
getParent()->clientPermList($this[
"client_database_id"], $permsid);
201 public function permAssign($permid, $permvalue, $permskip = FALSE)
203 return $this->
getParent()->clientPermAssign($this[
"client_database_id"], $permid, $permvalue, $permskip);
213 return $this->
permAssign($permname, $permvalue, $permskip);
224 return $this->
getParent()->clientPermRemove($this[
"client_database_id"], $permid);
246 return $this->
getParent()->clientSetChannelGroup($this[
"client_database_id"], $cid, $cgid);
257 return $this->
getParent()->serverGroupClientAdd($sgid, $this[
"client_database_id"]);
268 return $this->
getParent()->serverGroupClientDel($sgid, $this[
"client_database_id"]);
288 if($this[
"client_flag_avatar"] == 0)
return;
291 $transfer =
TeamSpeak3::factory(
"filetransfer://" . $download[
"host"] .
":" . $download[
"port"]);
293 return $transfer->download($download[
"ftkey"], $download[
"size"]);
303 return $this->
execute(
"clientgetids", array(
"cluid" => $this[
"client_unique_identifier"]))->toAssocArray(
"clid");
313 return $this[
"client_type"] ? null : $this[
"client_version"]->section(
"[", 1)->filterDigits();
323 $groups = array($this->
getParent()->channelGroupGetById($this[
"client_channel_group_id"]));
325 foreach(explode(
",", $this[
"client_servergroups"]) as $sgid)
327 $groups[] = $this->
getParent()->serverGroupGetById($sgid);
340 if($this->
iconIsLocal(
"client_icon_id") || $this[
"client_icon_id"] == 0)
return;
342 $download = $this->
getParent()->transferInitDownload(rand(0x0000, 0xFFFF), 0, $this->
iconGetName(
"client_icon_id"));
343 $transfer =
TeamSpeak3::factory(
"filetransfer://" . $download[
"host"] .
":" . $download[
"port"]);
345 return $transfer->download($download[
"ftkey"], $download[
"size"]);
353 if($this[
"client_type"] == 1)
return;
355 $this->nodeInfo = array_merge($this->nodeInfo, $this->
execute(
"clientinfo", array(
"clid" => $this->
getId()))->toList());
365 return $this->
getParent()->getUniqueId() .
"_cl" . $this->
getId();
375 if($this[
"client_type"])
377 return "client_query";
379 elseif($this[
"client_away"])
381 return "client_away";
383 elseif(!$this[
"client_output_hardware"])
385 return "client_snd_disabled";
387 elseif($this[
"client_output_muted"])
389 return "client_snd_muted";
391 elseif(!$this[
"client_input_hardware"])
393 return "client_mic_disabled";
395 elseif($this[
"client_input_muted"])
397 return "client_mic_muted";
399 elseif($this[
"client_is_channel_commander"])
401 return $this[
"client_flag_talking"] ?
"client_cc_talk" :
"client_cc_idle";
405 return $this[
"client_flag_talking"] ?
"client_talk" :
"client_idle";
426 return (
string) $this[
"client_nickname"];