Raised This Month: $82 Target: $400
 20% 

[ANY] BETA SQLite Bans


Post New Thread Reply   
 
Thread Tools Display Modes
Author
eyal282
Veteran Member
Join Date: Aug 2011
Plugin ID:
6525
Plugin Version:
1.3
Plugin Category:
Server Management
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    A banning system that works on SQLite, designed for a single server or servers with non-related banning systems
    Old 04-15-2019 , 14:26   [ANY] BETA SQLite Bans
    Reply With Quote #1

    I didn't finish testing bugs but I doubt any will appear.

    This is similar to other ban systems except that this one is not designed for connetion between multiple servers.

    Command List:

    sm_ban <#userid|name> <minutes|0> [reason] - Works like all ban commands in all plugins.
    sm_banip <#userid|name> <minutes|0> [reason] - Works like all ban commands in all plugins.
    sm_fullban/sm_fban <#userid|name> <minutes|0> [reason] - Bans a client on both his steam ID and his IP Address.
    sm_addban <steamid|ip> <minutes|0> [reason] - Works like all ban commands in all plugins.
    sm_unban <steamid|ip> - Works like all ban commands in all plugins.
    sm_banlist - Shows you a menu with all bans that were issued in the past.
    sm_breachbans - A possibly useful debug command that allows all banned clients to join the server for the next 60 seconds.
    sm_kickbreach - Kicks all banned clients from the server ( whether it's sm_addban or sm_breachbans )

    Cvar List:

    sqlite_bans_url - Url to show to banned clients to check. If you don't have an URL I suggest setting up a discord server for your server.


    Optional Dependancies:

    You can use this plugin in order to prevent ban evasion when steam servers are down, this plugin will force all players to authenticate: https://forums.alliedmods.net/showthread.php?p=2629878

    Previous Download Count: 14

    No database is required to be set-up.
    Attached Files
    File Type: sp Get Plugin or Get Source (SQLiteBans.sp - 10 views - 20.7 KB)
    __________________
    Accepting private work. Contact me if you're interested.
    If you like my work, feel free to donate in appreciation with PayPal or CSGO Skins.

    Total Donated: 10$

    Last edited by eyal282; 04-15-2019 at 23:36.
    eyal282 is offline
    eyal282
    Veteran Member
    Join Date: Aug 2011
    Old 04-15-2019 , 22:33   Re: [ANY] BETA SQLite Bans
    Reply With Quote #2

    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);
    
    */
    __________________
    Accepting private work. Contact me if you're interested.
    If you like my work, feel free to donate in appreciation with PayPal or CSGO Skins.

    Total Donated: 10$

    Last edited by eyal282; 04-15-2019 at 23:04.
    eyal282 is offline
    FzR
    Member
    Join Date: May 2017
    Old 04-16-2019 , 13:06   Re: [ANY] BETA SQLite Bans
    Reply With Quote #3

    Quote:
    Originally Posted by eyal282 View Post
    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
    FzR is offline
    eyal282
    Veteran Member
    Join Date: Aug 2011
    Old 04-16-2019 , 13:20   Re: [ANY] BETA SQLite Bans
    Reply With Quote #4

    Quote:
    Originally Posted by FzR View Post
    This can implement in sourceban to ? because sourceban only show to client website
    Nope, this only works in SQLite Bans, unless you can convince sourcebans to make this the method to ban.

    It is quite smart to make a global banning mechanism and the default native is undoubtedly the best way to do so.
    __________________
    Accepting private work. Contact me if you're interested.
    If you like my work, feel free to donate in appreciation with PayPal or CSGO Skins.

    Total Donated: 10$

    Last edited by eyal282; 04-16-2019 at 13:21.
    eyal282 is offline
    Reply


    Thread Tools
    Display Modes

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 05:19.


    Powered by vBulletin®
    Copyright ©2000 - 2019, vBulletin Solutions, Inc.
    Theme made by Freecode