AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [ANY] SQLite Bans V4.4 [2023/01/17] (https://forums.alliedmods.net/showthread.php?t=315623)

eyal282 04-15-2019 14:26

[ANY] SQLite Bans V4.4 [2023/01/17]
 
This is similar to other ban systems except that this one is not designed for connetion between multiple servers.
If you can afford MySQL, find another system because on SQLite banning a player on one of your server will let him join in another, while in MySQL that is not possible.

Note: you must move basebans.smx and basecomm.smx to the folder "disabled" to use this plugin. If both files don't exist then ignore this.

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_commlist - Shows a list of communication punished clients.
sm_gag <#userid|name> <minutes|0> [reason] - Gags a client, preventing him from using chat. If the command is used on an already gagged client, the duration will extend.
sm_mute <#userid|name> <minutes|0> [reason] - Mutes a client, preventing him from using his microphone. If the command is used on an already muted client, the duration will extend.
sm_silence <#userid|name> <minutes|0> [reason] - Silences a client, preventing him from using chat and using his microphone. If the command is used on an already silenced client, the duration will extend.
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 is found in csgo/cfg/sourcemod/SQLiteBans.cfg

Cvar List for discord integration is found in csgo/cfg/sourcemod/SQLiteBans_Discord.cfg


Optional Dependancies:

1. Improved Ban Disconnected
2. Muted Indicator is now a mandatory optional plugin. Updater will automatically install it ( because there is no reason not to ) but you can disable it with a cvar.
3. 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

No database is required nor possible to be set-up.

adminmenu_custom.txt should be used to insert in the existing adminmenu_custom.txt within sourcemod/configs/adminmenu_custom.txt, not replace it.


If you have ideas to improve the plugin or have issues, please use the github's Issue or Pull Request system, depending on your capabilities.






Plugin + Source + Translations


Get Plugin

View Source


Discord integration plugin below ( same instructions as HERE, but of course use the plugin SQLiteBans_Discord.smx, also use the cvar list found in csgo/cfg/sourcemod/SQLiteBans_Discord.cfg )

Get Plugin

View Source



Donating:

Feel free to motivate me to do more stuff for the community by giving me dollars or shekels HERE

My SQL support

I will not add MySQL support unless you directly hire me to do so for $100.
Some devs may do the same thing for half the price, but that's my price for adding MySQL support.

eyal282 04-15-2019 22:33

Re: [ANY] BETA SQLite Bans
 
External plugins can now ban players with the normal BanClient function, however there are a few changes you must know:

https://github.com/eyal282/SQLite-Ba...sqlitebans.inc

FzR 04-16-2019 13:06

Re: [ANY] BETA SQLite Bans
 
Quote:

Originally Posted by eyal282 (Post 2647713)
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

eyal282 04-16-2019 13:20

Re: [ANY] BETA SQLite Bans
 
Quote:

Originally Posted by FzR (Post 2647783)
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.

Scp106 04-23-2019 15:32

Re: [ANY] BETA SQLite Bans
 
1 Attachment(s)
Thanks man!:bacon!:

Few questions:
1. Where i can find file(s) with bans for backup?

2. Is it compatible with Ban Disconnected Players?
The answer - NO! Working version below!!!

eyal282 04-23-2019 16:39

Re: [ANY] BETA SQLite Bans
 
Quote:

Originally Posted by Scp106 (Post 2648690)
Thanks man!:bacon!:

Few questions:
1. Where i can find file(s) with bans for backup?
2. Is it compatible with Ban Disconnected Players?

1. The file is in addons/sourcemod/data/sqlite-bans.sq3 as of version 1.4

2. Yes, as long as you deleted basebans.smx from your server ( you should've done that already )

Scp106 04-24-2019 11:30

Re: [ANY] BETA SQLite Bans
 
Quote:

Originally Posted by eyal282 (Post 2648696)
I will work on a command to save or load bans.

That'll be really useful.
Thanks again!

eyal282 04-24-2019 18:23

Re: [ANY] BETA SQLite Bans
 
Quote:

Originally Posted by Scp106 (Post 2648756)
That'll be really useful.
Thanks again!

The file will now be alone, sqlite-bans.sq3

eyal282 04-25-2019 12:17

Re: [ANY] BETA SQLite Bans
 
Do you guys think that instead of silence mechanism when you use !silence it will just give a gag and a mute? Meaning that it will properly extend existing gags rather than overlapping them.

eyal282 04-28-2019 15:28

Re: [ANY] BETA SQLite Bans
 
Version 1.5 requires you to uninstall basecomm.smx, has logs of bans and requires some extent of testing from the people.

Also version 1.5 fixes sm_addban


All times are GMT -4. The time now is 04:41.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.