46 $this->nodeInfo = $info;
48 if(!array_key_exists($index, $this->nodeInfo))
53 $this->nodeId = $this->nodeInfo[$index];
66 foreach($this->
getParent()->channelList() as $channel)
68 if($channel[
"pid"] == $this->
getId())
70 $channels[$channel->getId()] = $channel;
91 return $this->channelList[(string) $cid];
105 if($channel[
"channel_name"] == $name)
return $channel;
123 if($client[
"cid"] == $this->
getId())
125 $clients[$client->getId()] = $client;
141 if(!array_key_exists($clid, $this->
clientList()))
160 if($client[
"client_nickname"] == $name)
return $client;
175 return $this->
getParent()->channelClientPermList($this->
getId(), $cldbid, $permsid);
189 return $this->
getParent()->channelClientPermAssign($this->
getId(), $cldbid, $permid, $permvalue);
211 return $this->
getParent()->channelClientPermRemove($this->
getId(), $cldbid, $permid);
232 return $this->
getParent()->channelPermList($this->
getId(), $permsid);
245 return $this->
getParent()->channelPermAssign($this->
getId(), $permid, $permvalue);
255 return $this->
permAssign($permname, $permvalue);
266 return $this->
getParent()->channelPermRemove($this->
getId(), $permid);
287 public function fileList($cpw =
"", $path =
"/", $recursive = FALSE)
289 return $this->
getParent()->channelFileList($this->
getId(), $cpw, $path, $recursive);
301 return $this->
getParent()->channelFileInfo($this->
getId(), $cpw, $name);
315 public function fileRename($cpw =
"", $oldname =
"/", $newname =
"/", $tcid = null, $tcpw = null)
317 return $this->
getParent()->channelFileRename($this->
getId(), $cpw, $oldname, $newname, $tcid, $tcpw);
329 return $this->
getParent()->channelFileDelete($this->
getId(), $cpw, $name);
341 return $this->
getParent()->channelDirCreate($this->
getId(), $cpw, $dirname);
391 return $this->
getParent()->channelIsSpacer($this);
401 if($this->
iconIsLocal(
"channel_icon_id") || $this[
"channel_icon_id"] == 0)
return;
403 $download = $this->
getParent()->transferInitDownload(rand(0x0000, 0xFFFF), 0, $this->
iconGetName(
"channel_icon_id"));
404 $transfer =
TeamSpeak3::factory(
"filetransfer://" . $download[
"host"] .
":" . $download[
"port"]);
406 return $transfer->download($download[
"ftkey"], $download[
"size"]);
415 public function modify(array $properties)
417 $properties[
"cid"] = $this->
getId();
419 $this->
execute(
"channeledit", $properties);
432 if($this->
getId() != $this->
getParent()->whoamiGet(
"client_channel_id"))
446 public function delete($force = FALSE)
460 public function move($pid, $order = null)
470 $this->nodeList = array();
472 if($this->
getParent()->getLoadClientlistFirst())
476 if($client[
"cid"] == $this->
getId())
478 $this->nodeList[] = $client;
484 if($channel[
"pid"] == $this->
getId())
486 $this->nodeList[] = $channel;
494 if($channel[
"pid"] == $this->
getId())
496 $this->nodeList[] = $channel;
502 if($client[
"cid"] == $this->
getId())
504 $this->nodeList[] = $client;
515 $this->nodeInfo = array_merge($this->nodeInfo, $this->
execute(
"channelinfo", array(
"cid" => $this->
getId()))->toList());
525 return $this->
getParent()->getUniqueId() .
"_ch" . $this->
getId();
535 if($this[
"channel_maxclients"] != -1 && $this[
"channel_maxclients"] <= $this[
"total_clients"])
537 return "channel_full";
539 elseif($this[
"channel_flag_password"])
541 return "channel_pass";
545 return "channel_open";
566 return (
string) $this[
"channel_name"];