|
Senior Member
|
04-16-2019
, 13:06
Re: [ANY] BETA SQLite Bans
|
#3
|
Quote:
Originally Posted by eyal282
External plugins can now ban players with the normal BanClient function, however there are a few changes you must know:
Code:
/**
* Bans a client.
*
* @param client Client being banned.
* @param time Time (in minutes) to ban (0 = permanent).
* @param flags BANFLAG_AUTHID for an authid ban, BANFLAG_IP for an IP ban, BANFLAG_AUTO for a full ban. ( both IP and AuthId )
* If you added "|BANFLAG_NOKICK" on top of the first flag and kick_message is not null, SQLiteBans will handle the kick message
* and will kick the client.
* @param reason Reason to ban the client for.
* @param kick_message Message to display to the user when kicking. If you added "|BANFLAG_NOKICK" to the flags, change this to anything you want
* and SQLiteBans will kick the client by itself ( must not be null, the actual value of kick_message doesn't matter at all )
* @param command Command string to identify the source. If this is left empty the ban will fail and
* the regular banning mechanism of the game will be used.
* @param source The admin ( doesn't have to be an admin ) that is doing the banning
* or 0 for console.
* @return True on success, false on failure.
* @error Invalid client index or client not in game.
* @note In order to let SQLiteBans kick the client by itself, set kick_message to anything you want and add "|BANFLAG_NOKICK" to the flags you've set.
* @note At the current version of 1.2, the param command has no meaning and it only mustn't be null.
*/
/*
native bool BanClient(int client,
int time,
int flags,
const char[] reason,
const char[] kick_message="",
const char[] command="",
any source=0);
*/
/**
* Bans an identity (either an IP address or auth string).
*
* @param identity String to ban (ip or authstring).
* @param time Time to ban for (0 = permanent).
* @param flags BANFLAG_AUTHID if the identity is an AuthId, BANFLAG_IP if the identity is an IP Address
* @param reason Ban reason string.
* @param command Command string to identify the source. If this is left empty the ban will fail and
* the regular banning mechanism of the game will be used.
* @param source The admin ( doesn't have to be an admin ) that is doing the banning
* or 0 for console.
* @return True on success, false on failure.
* @note At the current version of 1.2, the param command has no meaning and it only mustn't be null.
*/
/*
native bool BanIdentity(const char[] identity,
int time,
int flags,
const char[] reason,
const char[] command="",
any source=0);
*/
|
This can implement in sourceban to ? because sourceban only show to client website
|
|
|
|