Forum


Notice to all users

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

Results 1 to 2 of 2
  1. #1
    Join Date
    December 2016
    Posts
    10

    guiConnect always uses default identity

    Using this code
    Code:
    void test(uint64 scH, uint64 oldid) {
    	char pw[INFODATA_BUFSIZE] = { '\0' };
    	char cHost[INFODATA_BUFSIZE] = { '\0' };
    	unsigned short port = 0;
    	char *uID = NULL;
    	char *ownName = NULL;
    	anyID ownID;
    
    	if ((error = ts3Functions.getServerConnectInfo(scH, cHost, &port, pw, INFODATA_BUFSIZE)) == ERROR_ok) {
    	}
    	std::stringstream wholeIp;
    	wholeIp << cHost << ":" << std::to_string(port);
    	if (error = ts3Functions.getClientSelfVariableAsString(scH, CLIENT_UNIQUE_IDENTIFIER, &uID) == ERROR_ok) {
    		if (error = ts3Functions.getClientSelfVariableAsString(scH, CLIENT_NICKNAME, &ownName) == ERROR_ok) {
    			if (error = ts3Functions.guiConnect(PLUGIN_CONNECT_TAB_CURRENT, wholeIp.str().c_str(), wholeIp.str().c_str(), password, uID, NULL, NULL, "default", "default", "default", "default", uID, "", "", &scH) == ERROR_ok) {
    				reconnecting = true;
    				lastChannelID = oldid;
    			}
    		}
    	}
    }
    void ts3plugin_onClientMoveMovedEvent(uint64 serverConnectionHandlerID, anyID clientID, uint64 oldChannelID, uint64 newChannelID, int visibility, anyID moverID, const char* moverName, const char* moverUniqueIdentifier, const char* moveMessage) {
    	char *UID;
    	ts3Functions.getClientSelfVariableAsString(serverConnectionHandlerID, CLIENT_UNIQUE_IDENTIFIER, &UID);
    	printf("UID in client move %s\n", UID);
    	test(serverConnectionHandlerID, oldChannelID);
    }
    everytime I get moved I reconnect with my client's default UID instead of the UID I'm getting with
    Code:
    ts3Functions.getClientSelfVariableAsString(serverConnectionHandlerID, CLIENT_UNIQUE_IDENTIFIER, &UID);
    is that a bug or am I doing something wrong?

  2. #2
    Join Date
    September 2012
    Posts
    6,079
    You're using it wrong.

    It wants the Identity Name as displayed in the Tools -> Identities list.
    When sending PMs please make sure to include a reference link to the thread in question in the body of your message.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 1
    Last Post: March 14th, 2017, 10:28 AM
  2. [Resolved] TeamSpeak freezes after trying to edit nickname in default identity
    By meisjustme in forum Bug Reports [EN/DE]
    Replies: 8
    Last Post: November 3rd, 2016, 09:38 AM
  3. [No Bug] Bug: Able to delete default identity when should be impossible.
    By Morthawt in forum Bug Reports [EN/DE]
    Replies: 1
    Last Post: July 8th, 2014, 08:09 AM
  4. Replies: 6
    Last Post: July 8th, 2014, 04:09 AM

Posting Permissions

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