Results 436 to 450 of 627
Thread: [API] TS3 PHP Framework
-
30-04-2012, 20:37 #436
-= TeamSpeak Addict =-
- Join Date
- Jul 2010
- Location
- Madrid
- Posts
- 110
Hello!
Does anyone have a script in PHP to do "Poke" to users with an outdated version of Teamspeak 3?
It would be helpful.
Thanks in advance.
-
31-05-2012, 18:55 #437
-= TeamSpeak Addict =-
- Join Date
- Aug 2007
- Location
- SWEDEN
- Posts
- 120
I experienced issue that in all channels, number of clients is -1
I updated framework to latest version but problem remains. Any thoughts?
-
01-06-2012, 17:46 #438
-= TeamSpeak User =-
- Join Date
- Dec 2008
- Location
- Germany
- Posts
- 9
Hey ScP
For my clan I plan to code a bridge from the global chat and maybe some subchannels to specific chatrooms on our XMPP server.
So I need to read chat messages from a specific chat and also write messages to this chat.
I can't find any informations in the documentation of your framework how this could be done.
Is there a way to implement sending and recieving of chat messages?
Regards, theWeird
-
01-06-2012, 17:56 #439
-= TeamSpeak Fanatic =-
- Join Date
- Jan 2010
- Location
- Germany
- Posts
- 2,038
PHP Code:$srv = TeamSpeak3::factory("serverquery://" . $cfg["user"] . ":" . $cfg["pass"] . "@" . $cfg["host"] . ":" . $cfg["query"] . "/?server_port=" . $cfg['voice'] . "&blocking=0");
$srv->notifyRegister("textserver"); // Register to receive ServerChat Messages
$srv->notifyRegister("textchannel"); // Receive Channelchat Messages of CURRENT CHANNEL
TeamSpeak3_Helper_Signal::getInstance()->subscribe("notifyTextmessage", "onTextMessage"); // Specify Callback Function to be called for each TextMessage in Server or current Channel.
-
01-06-2012, 21:02 #440
-= TeamSpeak Servant =-
- Join Date
- Oct 2003
- Location
- Germany
- Posts
- 2,296
-
12-06-2012, 19:12 #441
-= TeamSpeak Lover =-
- Join Date
- Sep 2008
- Location
- England...
- Posts
- 35
Edit: ==== Probably fixed ====
A user just contacted me with this error ScP, I was hoping you could shed some light?
1. User was online, registered with the name "FI.RE Ordonnanz 1" 1 minute before attempting to register through my system with "-MLH- Ordonnanz 1". (His permissions need changing so my system kicked him, deleted him and asked him to re-register automatically)
2. Error received :
The error that the client is online leads me to believe that the error is with the part of code that should see that he is online and kick him.Attempting to grant access to: -MLH- Ordonnanz 1...
Removing your old registrations...
Warning: preg_match() [function.preg-match]: Unknown modifier 'b' in /home/sever/public_html/ts3api/TeamSpeak3/Helper/String.php on line 192 (repeated another 20 times)
Warning: Failed to delete user: FI.RE Ordonnanz 1 TSDID: 2990. Please Mail this message to MJ Maverick immediately. (Error: client is online) [F127]
0 old registration removed.
Code :
PHP Code:try {
// connect to the server
$ts3_VirtualServer = TeamSpeak3::factory("serverquery://".$c->tsname.":".$c->tspass."@".$c->tshost.":".$c->tsport."/?server_port=".$c->tscport);
} catch (TeamSpeak3_Exception $e) {
die("Error: ".$e->getMessage()." [F".__LINE__."]");
}
try {
$online = $ts3_VirtualServer->clientList(array("client_unique_identifier" => $tsUniqueID));
if(count($online)) {
// they are online with an already registered account
die("Attention: You are online with an already registered account! I can't delete your old registration while you are connected with it, disconnect and refresh this page. [F".__LINE__."]<br />");
} else {
$ts3_VirtualServer->clientdeleteDb($tsDatabaseID);
// they are gone, remove them from the database
try {
$queryDelete = "DELETE FROM users WHERE characterID = $characterID;";
mysql_query($queryDelete, $conRemoveOld );
$removed = $removed + 1;
} catch (TeamSpeak3_Exception $e) {
echo "Warning: Failed to remove old registrations of: ".$tsName." from the database, entry ".$entryID.". Please EVEMail this message to ".$c->admin." immediately. (Error: ".$e->getMessage().") (SQL: ". mysql_error() .") [F".__LINE__."]<br />";
}
}
} catch (TeamSpeak3_Exception $e) {
echo "Warning: Failed to delete user: ".$tsName." TSDID: ".$tsDatabaseID.". Please EVEMail this message to ".$c->admin." immediately. (Error: ".$e->getMessage().") [F".__LINE__."]<br />"; // !! LINE 127 !!
}
}
echo $removed." old registration removed.<br /><br />";
That's the relevant section of code. Any ideas?Last edited by Mavrik347; 13-06-2012 at 17:40.
-
13-06-2012, 09:05 #442
-= TeamSpeak Addict =-
- Join Date
- Jun 2003
- Posts
- 246
For the first part of this...
This is line 192 of Helper/String:Warning: preg_match() [function.preg-match]: Unknown modifier 'b' in /home/sever/public_html/ts3api/TeamSpeak3/Helper/String.php on line 192 (repeated another 20 times)
So this means the $pattern var has an unescaped forward slash (/) and in this case is followed by a "b" character which triggers this error. What causes this I couldn't tell you but that would be your starting point for debugging this issue.PHP Code:return (preg_match("/" . $pattern . "/i", $this->string)) ? TRUE : FALSE;
-
13-06-2012, 17:11 #443
-= TeamSpeak Lover =-
- Join Date
- Sep 2008
- Location
- England...
- Posts
- 35
Think I may be on to something here. The guys UID was K/bGYFe9aknUoOqN8DTue3UJTKE=
I have just had another guy report this but with an unknown modifier "v", his UID is /vRL7f5p922G6DXdDR8Ml/f/JFE=
Is this a bug with UIDs containing a /?
Edit: Scratch, I updated from 1.1.10 to 1.1.12 and the bug appears to have gone. :PLast edited by Mavrik347; 13-06-2012 at 17:40.
-
16-06-2012, 21:34 #444
-= TeamSpeak Lover =-
- Join Date
- Sep 2008
- Location
- England...
- Posts
- 35
Could I suggest making a way to get a client ID via their database ID?
-
17-06-2012, 20:43 #445
-= TeamSpeak Servant =-
- Join Date
- Oct 2003
- Location
- Germany
- Posts
- 2,296
Try using these two methods:
http://docs.planetteamspeak.com/ts3/...1666756cd4b744
http://docs.planetteamspeak.com/ts3/...bfb0818b5bc2f7
Quick question... Should I release this legacy update?
Code:=== Release 1.1.13 - 18 Jun 2011 === ! upgrading your servers to 3.0.6 (build >= 1339404919) is mandatory + TeamSpeak3_Node_Server::transferInitUpload() now respects server-side IP bindings for file transfer interface + TeamSpeak3_Node_Server::transferInitDownload() now respects server-side IP bindings for file transfer interface - fixed missing return value for TeamSpeak3_Node_Server::messageList() * TeamSpeak3_Node_Server::clientList() now returns client IP addresses + added TeamSpeak3_Node_Server::tempPasswordList() + added TeamSpeak3_Node_Server::tempPasswordCreate() + added TeamSpeak3_Node_Server::tempPasswordDelete() * legacy release
Last edited by ScP; 18-06-2012 at 21:11.
-
22-06-2012, 02:12 #446
-= TeamSpeak Addict =-
- Join Date
- Jun 2012
- Location
- Portugal
- Posts
- 145
Hi! Im making my site which interacts with ts3 server. Pretty good documentation for a php newbie like me. Everything almost finished I'm just having this error:
Part of code:
It's as is in documentation, except I changed target to 4 since I want to test. (4 is client_database_id and is online).PHP Code:$ts3_VirtualServer->execute("sendtextmessage", array("msg" => $pvt, "target" => 4, "targetmode" => TeamSpeak3::TEXTMSG_CLIENT));
But I get this error:
What am I doing wrong??Fatal error: Uncaught exception 'TeamSpeak3_Adapter_ServerQuery_Exception' with message 'invalid client type' in D:\Files\WEB & TS3\xampp\htdocs\TS3\lib\TeamSpeak3\Adapter\Server Query\Reply.php:305 Stack trace: #0 D:\Files\WEB & TS3\xampp\htdocs\TS3\lib\TeamSpeak3\Adapter\Server Query\Reply.php(82): TeamSpeak3_Adapter_ServerQuery_Reply->fetchError(Object(TeamSpeak3_Helper_String)) #1 D:\Files\WEB & TS3\xampp\htdocs\TS3\lib\TeamSpeak3\Adapter\Server Query.php(140): TeamSpeak3_Adapter_ServerQuery_Reply->__construct(Array, 'sendtextmessage...', Object(TeamSpeak3_Node_Host)) #2 D:\Files\WEB & TS3\xampp\htdocs\TS3\lib\TeamSpeak3\Node\Abstract. php(72): TeamSpeak3_Adapter_ServerQuery->request('sendtextmessage...') #3 D:\Files\WEB & TS3\xampp\htdocs\TS3\lib\TeamSpeak3\Node\Server.ph p(89): TeamSpeak3_Node_Abstract->request('sendtextmessage...') #4 D:\Files\WEB & TS3\xampp\htdocs\TS3\lib\TeamSpeak3\Node\Abstract. php(96): TeamSpeak3_Node_Server->request('sendtextmessage...') #5 D:\Files\WEB & TS3\xampp\htdocs\TS3\test.php(34): TeamSpe in D:\Files\WEB & TS3\xampp\htdocs\TS3\lib\TeamSpeak3\Adapter\Server Query\Reply.php on line 305
-
22-06-2012, 10:07 #447
-= TeamSpeak Fanatic =-
- Join Date
- Jan 2010
- Location
- Germany
- Posts
- 2,038
Target takes the current Client Id NOT the Database ID.
-
22-06-2012, 15:45 #448
-= TeamSpeak Addict =-
- Join Date
- Jun 2012
- Location
- Portugal
- Posts
- 145
Hmm OK. How can I get the current client id based on unique identifier? ( or dbid)
Nvm I fixed it. Went to TS3 query manual and I looked into client info, its clid:
(from here I select who is in group 8 and proceed with the rest of my code where I will need the rest I request from clientlist)PHP Code:$ts3_VirtualServer->request("clientlist -uid -groups -client_nickname -clid")->toList();
Thanks for the help anyway!Last edited by barricas; 22-06-2012 at 15:56.
-
22-06-2012, 19:42 #449
-= TeamSpeak Servant =-
- Join Date
- Oct 2003
- Location
- Germany
- Posts
- 2,296
-
06-07-2012, 04:09 #450
Hello ScP,
In "TeamSpeak3_Node_Abstract::getInfo => virtualserver_min_client_version" return Unix time, "TeamSpeak3_Helper_Convert\version()" not work in this.
And I think the correct format for DATE in this case: "TeamSpeak3_Helper_Convert\version()" would be:
...date would be expressed in the same format as the TeamSpeak client.Code:293: public static function version($version, $format = "d/m/Y G:i:s")
Thanks for your great work.
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


