GetServerIpFromMasterServer: Difference between revisions
Jump to navigation
Jump to search
(Created page with "__NOTOC__ {{Server function}} {{New feature/item|3.0161|1.6.0|22890|This function returns the remote address as reported by the first master server that provides this value.}} {{Note|It might take a while until the master server responds to the query sent out by the server, which in turn means that this function will not return any IP until the information has been received.}} {{Note|On client-side there is the getServerIp function, in case you need the remote addre...") |
(No difference)
|
Revision as of 19:45, 8 January 2025
Syntax
string getServerIpFromMasterServer ( )
Returns
A string containing the remote address of the server as reported, once it's available.
Example
This example creates a console command that outputs the server's IP to the chatbox.
function outputServerIp() outputChatBox(getServerIpFromMasterServer()) end addCommandHandler("serverIp", outputServerIp)
See Also
- getMaxPlayers
- getServerConfigSetting
- getServerHttpPort
- getServerName
- getServerPassword
- getServerPort
- isGlitchEnabled
- setGlitchEnabled
- setMaxPlayers
- setServerConfigSetting
- setServerPassword
- shutdown