Notice to all users

We are migrating towards a new forum system located at, as such this forum will become read-only on January 29, 2020

Results 1 to 3 of 3
  1. #1
    Join Date
    August 2019

    Problems getting the current Server IP

    I am trying to get the current server IP with the following code from the SDK but it only works on some servers.

    ts3Functions.requestServerVariables(serverConnecti onHandlerID);
    ts3Functions.getServerVariableAsString(serverConne ctionHandlerID, VIRTUALSERVER_IP, &ip);

    Getting the current Serverport works on all servers but not the IP :/ am I using the wrong functions? Would be nice if someone could tell me how to retrieve the server IP.


  2. #2
    Join Date
    October 2015
    Germany, Bavaria
    What exactly are you getting when it doesn't work on a server?
    Are you getting just straight up an error code, or does it return something you don't expect, like a domain or a nickname?

    If you get a domain, maybe try doing some nslookup (or something like that) in your code.

    I haven't checked this, but I think I recall some keys like VIRTUALSERVER_CONNECTION_IP parameter or something. Maybe try those.

  3. #3
    Join Date
    January 2017
    IP+Port of the currently selected server
    ts3Functions.getConnectionVariableAsString(serverC onnectionHandlerID, myid, CONNECTION_SERVER_IP, &ip);
    ts3Functions.getServerVariableAsInt(serverConnecti onHandlerID, VIRTUALSERVER_PORT, &port);
    Last edited by Dr_Pepps; September 17th, 2019 at 05:51 PM. Reason: don't forget the semicolons kids :3

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Problems getting the current Server IP
    By sKeLeTr0n in forum Client Plugins / Lua Scripts
    Replies: 8
    Last Post: March 5th, 2017, 07:32 PM
  2. Replies: 1
    Last Post: July 24th, 2014, 06:31 AM
  3. Replies: 2
    Last Post: October 6th, 2012, 02:49 AM
  4. Problems getting the current Server IP
    By sKeLeTr0n in forum Bug Reports [EN/DE]
    Replies: 3
    Last Post: December 2nd, 2010, 10:03 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