Garry's Mod Wiki

serverlist

Menu state library to query the master server list.

Methods

This is used internally - although you're able to use it you probably shouldn't. Adds current server the player is on to their favorites.
serverlist.AddServerToFavorites( string address )
Adds the given server address to their favorites.
Returns true if the current server address is in their favorites.
boolean serverlist.IsServerFavorite( string address )
Returns true if the given server address is in their favorites.
serverlist.PingServer( string ip, function callback )
Queries a server for its information/ping.
serverlist.PlayerList( string ip, function callback )
Queries a server for its player list.
serverlist.Query( table data )
Queries the master server for server list.
serverlist.RemoveServerFromFavorites( string address )
Removes the given server address from their favorites.