Author Topic: Client-Side: Getting your own IP address?  (Read 536 times)

How do you get your own IP address on your client-side? (Console command?) Not from the server.

echo($MyTCPIPAddress);

Great. I thought it was a function.

How does that even work?

How does that even work?

The auth server tells the client it's IP as a part of the initial auth.

function authTCPobj_Client::onLine(%this, %line)

When the client receives a line of data from the TCPObject that handles authentication,

if (%word $= "YOURIP")

.. if the first word of the line is YOURIP

  $MyTCPIPAddress = getWord(%line, 1);

.. set the global variable.