Forum

Results 1 to 2 of 2
  1. #1
    Join Date
    February 2015
    Posts
    1

    Getting client list right after a new server connection

    Hi !

    When connecting to a teamspeak server with the client, I receive in my plugin the event ts3plugin_onConnectStatusChangeEvent().
    According to the doc, when the status received is STATUS_CONNECTION_ESTABLISHED, channels and clients are available. However, when I call getClientList() in that callback when this status is set, I only get clients in my current channel, not those visible on the entire server, which is what the function is meant to do. The other clients i am expecting to see are in another channel and visible in the teamspeak client.
    But when i call this function afterwards (let's say after a client was moved for example), I get all the visible clients returned.

    Thank you for your help!

    i'm running the latest version, x64 build.

    Example: With this server structure:
    Main Channel
    John
    Channel 1
    David

    and with this code:

    Code:
    void ts3plugin_onConnectStatusChangeEvent(uint64 serverConnectionHandlerID, int newStatus, unsigned int errorNumber) 
    {    
    	if (newStatus == STATUS_CONNECTION_ESTABLISHED) 
    	{		
    		anyID* ids;
    		int n = ts3Functions.getClientList(serverConnectionHandlerID, &ids);
    		if (n == ERROR_ok)
    		{
    			char name[TS3_MAX_SIZE_CLIENT_NICKNAME_NONSDK];
    			for (int i = 0; ids[i]; i++) 
    			{
    				if (ts3Functions.getClientDisplayName(serverConnectionHandlerID, ids[i], name, TS3_MAX_SIZE_CLIENT_NICKNAME_NONSDK) != ERROR_ok) 
    				{
    					strcpy(name, "unknown");
    				}
    				printf("%s",name);
    			}
    		}
    	}
    }
    If I connect to this server under the name Alan, I will see in the console:
    Alan
    John

    But if I run the code elsewhere (let's say when a client is moved for example) I get all three names on the console.
    Last edited by albanderuaz; February 21st, 2015 at 11:59 PM.

  2. #2
    Join Date
    June 2008
    Posts
    18,020
    I don't know anything about the SDK, but from my testings and from the SDK Manual (client.pdf)
    To get a list of all clients in the specified channel if the channel is currently subscribed
    Please subscribe the target channel(s) fist. The current channel is always subscribed, this is why you see the current channel only.

    Page 88 explains how to susbcribe a channel or channels at once.
    When sending me private messages: Please make sure to include reference link to your forum thread or post.

    TeamSpeak FAQ || What should i report, when i open a client thread?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. server list in the client
    By GlassDeviant in forum General Questions
    Replies: 3
    Last Post: February 1st, 2014, 12:27 PM
  2. TeamSpeak 3 Server List and Connection Issues
    By Ralistor in forum Windows
    Replies: 2
    Last Post: January 17th, 2013, 05:10 PM
  3. Improved Server Log / Client Log / List All Clients
    By TCG-Smith in forum Suggestions and Feedback
    Replies: 0
    Last Post: January 25th, 2011, 12:18 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •