Results 1 to 2 of 2
Thread: PluginSDK requestClientIDFromUID
27-01-2012, 16:56 #1-= TeamSpeak Fanatic =-
- Join Date
- Jan 2010
Currently there is no way to get a ClientID other than your own.
(Well not entirely true, but you'd need to get a List of all Clients on the Server and then get the UID for each of them to see if it's the Client you were looking for - This is slow, network intense and only works for Clients you can actually see.)
Anyway It would be nice if there was a Function that would allow you to get the ClientID of a specific Client (specified by UID or DBID) on a specific Server. The Server would then check if that Client is currently on the Server and return its ClientID through some new Function (onClientIDFromUIDEvent? onClientIDRequestedEvent?). This would work regardless of whether the Invoker is subscribed to the Channel of the target or not.
30-01-2012, 07:36 #2-= TeamSpeak Team =-
- Join Date
- Jun 2008
- Krün, Germany
Such a function exists in the clientlib and is also used by the TS3 client. However, looking at the code, this is not exported to the plugin SDK. Appears I forgot to export it after adding this function...
Usage is requestClientIDs with a client unique identifier as parameter and the server will return a list of clients via onClientIDsEvent with the current client ID (all clients, including invisible clients in unsubscribed channels). Yes, it is slow and should be avoided. We use it for chat to see if the chat partner is still available (called not very often) and for whisper. I suppose some plugins could have some use for this, but it really should be avoided to call this too often for obvious reasons.
Otherwise, getClientList() lists all visible clients without querying the server.
Not sure if this should be added for 3.0.4 (available soon) because of plugin API increase, rather 3.0.5.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
[Resolved] [PLUGINSDK] public_errors_rare.hBy kubax in forum PluginsReplies: 4Last Post: 16-09-2011, 14:52
By SilentStorm in forum Suggestions and FeedbackReplies: 1Last Post: 04-05-2011, 11:29
By SilentStorm in forum Suggestions and FeedbackReplies: 0Last Post: 19-11-2010, 17:06
By Master_D in forum Suggestions and FeedbackReplies: 0Last Post: 11-11-2010, 12:46
By Sanji008 in forum PluginsReplies: 0Last Post: 30-12-2009, 18:25