Garry's Mod Wiki

IsServerBlacklisted

  string IsServerBlacklisted( string address, string hostname, string description, string gm, string map )

Description

Checks if the given server data is blacklisted or not.

Arguments

1 string address
Server ip. can end with *
2 string hostname
Server name
3 string description
description to check
4 string gm
Gamemode name
5 string map
Map name

Returns

1 string result
Returns the reason why the server is blacklisted or nil if the server is not blacklisted.

Example

Example of a blacklisted hostname.

print(IsServerBlacklisted("127.0.0.1", "reconnect", "", "", ""))
Output:
host: reconnect