Results 316 to 330 of 627
Thread: [API] TS3 PHP Framework
-
01-08-2011, 23:39 #316
-= TeamSpeak User =-
- Join Date
- Feb 2009
- Location
- Slovenia
- Posts
- 27
-
02-08-2011, 00:50 #317
-= TeamSpeak User =-
- Join Date
- Feb 2010
- Location
- Portugal
- Posts
- 18
-
04-08-2011, 18:35 #318
-= TeamSpeak User =-
- Join Date
- Aug 2011
- Location
- Nantes, France
- Posts
- 1
Collect client list every second in a PHP CLI Script
Hi there !
I'd like to grant/revoke talk power to some users but I didn't found the way to do it..
I know who can talk or not with this:
I tried using channelClientPermAssign() and channelClientPermRemove() but I don't know if there is a permId for this...PHP Code:$ClientList = self::$ts3Server->clientList();
foreach ($ClientList as $clientObject) {
$clientInfo = $clientObject->getInfo();
if($clientInfo['clid']==6) { //
echo $clientInfo['client_nickname'] . ' -> client_is_talker = ' . $clientInfo['client_is_talker'] . "\n";
}
}
edit
I've found the solution after writing hundreds of useless attempts...
Here is the solution I've found to grant the talk power to all clients:
PHP Code:$ClientList = self::$ts3Server->clientList();
foreach ($ClientList as $clientObject) {
$clientObject->modify(array('client_is_talker'=>'1'));
}
Last edited by refreshfr; 09-08-2011 at 14:58. Reason: Found the answer to my question
-
15-08-2011, 03:09 #319
-= TeamSpeak User =-
- Join Date
- Feb 2010
- Location
- Portugal
- Posts
- 18
Hello again.
I'm tryin to remove some permission after server creation, but i'm having problem with this, here the code:
The server is created with sucess.PHP Code:$server = $ts3_VirtualServer->serverCreate($dados);
$ts3_VirtualServer->serverSelect($server['sid']);
$ts3_VirtualServer->permRemove('b_virtualserver_modify_maxclients');
It selects the server with no problem.
But it doesnt remove that permission, i'm doing it wrong?
Thank you!
I found a ugly solution, but it was the only i could find at the moment:
PHP Code:$sel_server = $ts3_VirtualServer->serverGetById($server['sid']);
foreach($sel_server->serverGroupList() as $sgid => $sgroup):
if($sgroup['type'] != TeamSpeak3::GROUP_DBTYPE_REGULAR) continue;
if(htmlspecialchars($sgroup) == 'Server Admin'):
$sel_server->serverGroupPermRemove($sgid, 'b_virtualserver_modify_maxclients');
endif;
endforeach;
Last edited by ScP; 15-08-2011 at 13:31.
-
15-08-2011, 13:39 #320
-= TeamSpeak Servant =-
- Join Date
- Oct 2003
- Location
- Germany
- Posts
- 2,297
This should do the trick:
Also, there's a working example on the index page of the documentation:PHP Code:$server = $ts3_VirtualServer->serverCreate($dados);
$ts3_VirtualServer->serverGetById($server["sid"])
->serverGroupGetByName("Server Admin")
->permRemove("b_virtualserver_modify_maxclients");
http://docs.planetteamspeak.com/ts3/php/framework/
-
16-08-2011, 11:32 #321
-= TeamSpeak User =-
- Join Date
- May 2010
- Location
- Netherlands
- Posts
- 15
Is it possible to get the clients ping?
-
16-08-2011, 20:42 #322
-= TeamSpeak User =-
- Join Date
- Oct 2010
- Location
- Germany
- Posts
- 4
Hey i just got a little question.
If i create an server with this framework and i need to remove a permission. I do that
like this:
------------------------------------------------------------------------------
$ts3_ServerGroup = $ts3_VirtualServer->serverGroupIdentify();
$ts3_ServerGroup->permRemoveByName("b_virtualserver_modify_maxclien ts");
Or
$ts3_ServerGroup = $ts3_VirtualServer->serverGroupIdentify();
$ts3_ServerGroup->permRemove(9010);
-------------------------------------------------------------------------------
Now the Permission is removed, but the Grant Value is at 75.
How do i set it to 0 =?
Because if it is 75 you just need 2 mouse clicks to add the permission again :/
Wie kann ich das Vergabe Recht ( Grant Value ) auf NULL ( 0 ) setzen.
I would really like some help.
Thanks
- bka2142
-
16-08-2011, 21:34 #323
-= TeamSpeak User =-
- Join Date
- Feb 2010
- Location
- Portugal
- Posts
- 18
-
16-08-2011, 21:51 #324
-= TeamSpeak User =-
- Join Date
- Oct 2010
- Location
- Germany
- Posts
- 4
My problem, after removing the Permission is the GRANT value. How do i change that. This is my only question

It would not be nice if people which are paying for 50 slots just can change the server to 100 slots ...
I hope you can help me.
Btw. here is the way how i get the permission again ^^
Step 1:
http://www7.pic-upload.de/16.08.11/ezr31tgdx3.png
Step 2:
http://www7.pic-upload.de/16.08.11/hwyh7x1rtac9.png
Step 3:
http://www7.pic-upload.de/16.08.11/229t69i97k26.png
-
16-08-2011, 22:40 #325
-= TeamSpeak User =-
- Join Date
- Feb 2010
- Location
- Portugal
- Posts
- 18
hmm i see, but my permissions page doesnt show up like yours lol
-
16-08-2011, 22:53 #326
-= TeamSpeak Servant =-
- Join Date
- Oct 2003
- Location
- Germany
- Posts
- 2,297
All permissions have an associated i_needed_modify_power_* permission. For example, b_virtualserver_modify_maxclients has an associated permission called i_needed_modify_power_virtualserver_modify_maxclie nts. In the TeamSpeak 3 Client interface, these associated permissions are usually displayed as additional Grant value of the original permission.
So what you need to do is this:
PHP Code:$ts3_ServerGroup->permRemove("i_needed_modify_power_virtualserver_modify_maxclients");
-
17-08-2011, 12:53 #327
-= TeamSpeak User =-
- Join Date
- Oct 2010
- Location
- Germany
- Posts
- 4
Thanks, i just forgot that

Now its working
- bka2142
-
19-08-2011, 01:24 #328
-= TeamSpeak User =-
- Join Date
- May 2011
- Posts
- 2
I cannot seem to get it to connect to my teamspeak server. The firewall ports are all open. I have the correct connection info but i keep getting timeout errors on the example pages. I cannot connect at all to the server via the framework. Is there something I am missing?
-
21-08-2011, 18:19 #329
-= TeamSpeak User =-
- Join Date
- Feb 2010
- Location
- Portugal
- Posts
- 18
Post the code you are using.
-
24-08-2011, 00:37 #330
-= TeamSpeak Lover =-
- Join Date
- Sep 2008
- Location
- England...
- Posts
- 35
Hi ScP.
Could you clear up something for me? What exactly is a URI and what could cause this error? I have my suspicions but I guess you're the best person to ask.
"An error occurred: invalid URI supplied"
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
TS3 PHP Framework Connection problems
By stheam in forum General QuestionsReplies: 1Last Post: 01-01-2013, 21:03 -
Extraction using the Framework
By HarryMW in forum ToolsReplies: 1Last Post: 03-08-2012, 19:04 -
TeamSpeak 3 PHP Framework
By danger89 in forum General QuestionsReplies: 3Last Post: 11-06-2012, 16:40 -
Teamspeak, PHP Framework?
By mario2027 in forum General QuestionsReplies: 1Last Post: 21-12-2010, 09:30 -
[solved] Problem with Ts3 und Ts3 Php Framework
By m3ntry in forum Bug ReportsReplies: 1Last Post: 14-10-2010, 05:55



Reply With Quote
