Mr-Malone
You risk and you will win
- Sep 11, 2015
- 69
- 25
- 108
Hi all. I need a script that once a user has entered the server and holds a degree to make them a channel named "Customer pending" and be numbered according to the client order that is "client waiting 1" "client pending 2 ".With channel has been created to be moved by it, and hold a channelgroup. I tried something but do not understand why can not take uniqID the client.
I will let my attempt failed below )
If I can help I would be very grateful. Thankyou!
I will let my attempt failed below )
If I can help I would be very grateful. Thankyou!
Code:
<?php
require_once("libraries/TeamSpeak3/TeamSpeak3.php");
$serverquery_username = "serveradmin"; //Serverquery login username
$serverquery_pass = ""; //Serverquery login password
$serverip = ""; //Teamspeak 3 server IP, only IP not port
$serverquery_port = "10011"; //Serverquery port
$serverport = "9987"; //Teamspeak 3 server port
$serverquery_nickname = "TehnicianEvD"; //Nickname for bot serverquery
$msg = "[b]Te rugăm să aștepți pe acest canal până un reprezentant te va prelua![/color]!";
$channelgroup = '11';
$guestgroup = "10"; //ID of guest group
$msg1 = "Operatorii nostri sunt ocupati te rugam sa revii !";
// UniqID-u pulii.
$ts3_VirtualServer = TeamSpeak3::factory("serverquery://$serverquery_username:$serverquery_pass@$serverip:$serverquery_port/?server_port=$serverport&nickname=$serverquery_nickname");
$ts3_VirtualServer->execute("clientupdate", array("client_nickname" => $nickname));
$FLAG = false;
foreach ($ts3_VirtualServer->clientList(array('client_type' => '0', 'connection_client_ip' => getClientIp())) as $client) {
$clientuid = $client->client_unique_identifier;
//connect serverquery.
$ts3_VirtualServer = TeamSpeak3::factory("serverquery://$serverquery_username:$serverquery_pass@$serverip:$serverquery_port/?server_port=$serverport&nickname=$serverquery_nickname");
$clientuid = $client->client_unique_identifier;
//get guest users online. only online.
$arr_ClientList = $ts3_VirtualServer->clientList(array("client_servergroups" => "$guestgroup"));
//give member group for user(s).
foreach($arr_ClientList as $ts3_Client)
{
$sub_cid = $ts3_VirtualServer->channelCreate(array(
"channel_name" => "Client Relații ",
"channel_password" => "relatii",
"channel_description" => "[img]http://i.imgur.com/bdsh79F.gif[/img][center]\n[img]http://i.imgur.com/ArHU0UO.png[/img]\n[hr][b]Canal creat prin platforma online [color=red][url=http://board.evodark.com/channelevd]EvoDark Channels[/url][/color][hr][/center][img]http://i.imgur.com/bdsh79F.gif[/img]",
"channel_codec" => TeamSpeak3::CODEC_OPUS_VOICE,
"channel_codec_quality" => '10',
"channel_topic" => "Posibil client ",
"channel_flag_permanent" => FALSE,
"cpid" => '8',
));
$clID = $ts3_VirtualServer->clientGetByUid($clientuid);
$infoCliente = $ts3_VirtualServer->execute("clientgetnamefromuid", array(
"cluid" => $clientuid
))->toList();
$cldbid = strval($infoCliente['cldbid']);
$ts3_VirtualServer->execute("clientmove", array(
"clid" => $clID,
"cid" => $sub_cid
));
$ts3_VirtualServer->execute("setclientchannelgroup", array(
"cldbid" => $cldbid,
"cid" => $sub_cid,
"cgid" => $channelgroup
));
$ts3_VirtualServer->clientPoke($ts3_Client, $msg);
}