The docs are currently outdated. I'll update them as soon as possible... Anyway, thanks for your good feedback.
![]()
We are migrating towards a new forum system located at community.teamspeak.com, as such this forum will become read-only on January 29, 2020
The docs are currently outdated. I'll update them as soon as possible... Anyway, thanks for your good feedback.
![]()
Hi ScP,
I've got the following error when i try to put the TeamSpeak3_Node_Host object into a session:
errorCode: 0
errorMessage: timer '00000000655dd3af00000000381a09f7' does not exist
how its possible to put your factory into a session variable?
or is it possible to make the TeamSpeak3 class singleton?
b.t.w
your modifed autoload function works great for me.
keep up the good work.
Last edited by faralsimbor; July 10th, 2010 at 03:49 PM.
Hey.
I worked with my servers with the SID but now, i want to with the port but..
That doesnt work.. What's wrong ?
( Im disconnected from the TS server.. so he's stopped )Code:Error 1035: server got an invalid status for this operation
(No problem with the factory, i worked with that before...)
Edit: Start, Stop work. But cant use delete.Code:$ServerInstance = TeamSpeak3::factory('serverquery://' . self::$ts_config[$instanceID]['user'] . ':' . self::$ts_config[$instanceID]['pass'] . '@' . self::$ts_config[$instanceID]['host'] . ':' . self::$ts_config[$instanceID]['port'] . '/'); $ServerInstance->serverGetByPort($port)->stop(); usleep(1000000); $ServerInstance->serverGetByPort($port)->delete();
Edit: strange... Tried with stop(); then request("serverdelete sid=67") same error message
BUT in telnet
serverstop sid=66
error id=0 msg=ok
serverdelete sid=66
error id=0 msg=ok
Edit: btw, the ID $ServerInstance->serverGetByPort($port)->getId(); is correct. . .
Edit : I finally get the ID .. then used ServerInstance->serverDelete...
Last edited by kedal; July 10th, 2010 at 05:27 PM.
hey scp..
I finally got around to re-testing blacklisting on the one server. It appears to take a *really* long time to execute the test script. Is there perhaps some kind of time out that causes it to return true?
What is the exact return value?
it always hangs for a bit, then returns false on the debian server (older version of php and its being ran as CGI)..
but on my other linux (ubuntu) server it returns true very quickly.
Did you replace the method with the code I sent you via PM? I need the debug output...
Oh.. yes.. that sorry.
Did that tonight check your PM for the output.
Thx. The issue will be fixed with the next release.
Hi!
I love this framework. Everything works fine. Good job ScP!
But...... is it possible to get the type of the group? I wanted to create new tokens and when i list all the groups to get the right id there are also the standard groups. You cant create a token with one of these. I think the type of the group must be 1.
Is there a opportunity to get the type?
I did not found anything
Mhhh, my english is very bad. Sorry!
Thank you for your good feedback. I've defined three class constants for the different group types:
Here's a code snippet to show you how to filter all but regular groups from the servergrouplist output:PHP Code:
/**
* TeamSpeak 3 permission group database types.
*/
const GROUP_DBTYPE_TEMPLATE = 0x00; // 0: template group (used for new virtual servers)
const GROUP_DBTYPE_REGULAR = 0x01; // 1: regular group (used for regular clients)
const GROUP_DBTYPE_SERVERQUERY = 0x02; // 2: global query group (used for ServerQuery clients)
For the next release I'll add optional filter parameters to all listing functions to remove unwanted elements.PHP Code:
// load list of server groups
$servergroups = $server->serverGroupList();
// remove non-regular groups from array
foreach($servergroups as $sgid => $servergroup)
{
if($servergroup["type"] != TeamSpeak3::GROUP_DBTYPE_REGULAR) unset($servergroups [$sgid]);
}
Thanks for your quick reply.
It works fine!
Thank you!
Once again, here's the latest changelog:
The new regexp filters are available for serverList(), clientList(), channelList(), subChannelList(), serverGroupList() and channelGroupList() and will work like this:Code:=== Release 1.0.31-dev - ?? Jul 2010 === + added some new demo scripts to the example pages * fixed TeamSpeak3_Adapter_Blacklist::isBlacklisted() invalid return values when master server is not responding * several node list methods now support additional regexp filter parameters - fixed a stristr() warning in TeamSpeak3_Helper_String::contains() when providing an empty search pattern
If you have any more ideas or feature requests for the upcoming release, please let me know.PHP Code:
$filters = array(
"virtualserver_name" => "^TeamSpeak", // find virtual servers starting with "TeamSpeak"
"virtualserver_status" => "online", // find active virtual servers
);
$serverlist = $ts3->serverList($filters);
![]()
Hey.
I've again a problem.
MyPHPFile.php
System
|- TeamSpeak2Manager.php
|- TeamSpeak3Manager.php
|- ts2_framework
|- |- The TS2 Framework
|- ts3_framework
|- |- librairies
|- |- |- TeamSpeak3
|- |- |- |- Your Framework
TeamSpeak2Manager.php and TeamSpeak3Manager.php have a static method named createServer which use the frameworks to create servers.
Separated, and called by two differents file ( placed in the same folder as MyPHPFile.php ), the two functions work great ! ( And others too, like removeServer(..) ) I call them by
require('System/TeamSpeak2Manager.php');
TeamSpeak2Manager::createServer($name, $slots);
require('System/TeamSpeak3Manager.php');
TeamSpeak3Manager::createServer($name, $slots);
BUT when I call the both like :
require('System/TeamSpeak2Manager.php');
require('System/TeamSpeak3Manager.php');
TeamSpeak2Manager::createServer($name, $slots);
TeamSpeak3Manager::createServer($name, $slots);
I've this error :
Error 2: Class file /var/www/panel/teamspeak/system/ts2_framework/TeamSpeak3/Helper/Profiler.php was not found.
What's wrong ? I tried to rename one method to another name, same thing. But when I do the inverse :
require('System/TeamSpeak2Manager.php');
require('System/TeamSpeak3Manager.php');
TeamSpeak3Manager::createServer($name, $slots);
TeamSpeak2Manager::createServer($name, $slots);
That works !
But in my soft.. I cant inverse... Do u know what's wrong ? Issue with the class loader ? =S
The class is found when I put a require in TeamSpeak3.php ( framework ) but i'll not write all the requires..
It's Strange
Thanks !
EDIT::TS2 Framework is Absurd and it also use spl autoload ! The methods of autoload of TS2 Framework is in the next page..
Last edited by kedal; July 27th, 2010 at 08:27 PM.
There are currently 1 users browsing this thread. (0 members and 1 guests)