This wiki is archived and useful information is being migrated to the main bzflag.org website

bz_HostBanUser

From BZFlagWiki
Revision as of 08:30, 19 October 2011 by Sigonasr2 (Talk | contribs) (Create API Function Page. Include Example.)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

bool bz_HostBanUser (int bannedByIndex, const char* hostmask, int duration, const char* reason)


Sets up a new Host ban Rule in the ban list.

Parameters:
bannedByIndex  -  The player ID that is banning the IP Address. NOTE: This has to be a player that is currently on the server, so at least one player must be present for a ban to be created.
hostmask  -  The Hosting address of the player to be banned. Host bans use wildcard (*) character also, such as *.myhost.biz
duration  -  The amount of time in minutes to ban the host.
reason  -  The reason that is displayed to the banned user upon failure to join.
Returns:
Whether or not the ban was executed successfully.


Example[edit]

bz_HostBanUser(0,"*.myhost.biz",3600,"This host abused the server.")