Garry's Mod Wiki

serverlist.IsServerFavorite

  boolean serverlist.IsServerFavorite( string address )

Description

Returns true if the given server address is in their favorites.

Arguments

1 string address
Server Address. IP:Port like "127.0.0.1:27015"

Returns

1 boolean favorite
true if the server address is in their favorites

Example

Adds an Address to the Favorites and checks if it has been added.

serverlist.AddServerToFavorites( "127.0.0.1:27015" ) print( serverlist.IsServerFavorite( "127.0.0.1:27015" ) )
Output: true