AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   Advanced Bans (Real Time) by Exolent (https://forums.alliedmods.net/showthread.php?t=80858)

Exolent[jNr] 11-22-2008 16:15

Advanced Bans (Real Time) by Exolent
 
7 Attachment(s)
Advanced Bans (Real Time)
by Exolent

Description:
  • This plugin revamps the current amx_ban, amx_banip, amx_banid, amx_unban admin commands.
  • It uses Real Time on the server (Eg. Banned for 10 minutes, you will be unbanned 10 minutes later, regardless of map changing).
  • It includes a list of who is banned.
  • It does not use the banned.cfg or listip.cfg. It uses its own file where bans are stored.
  • It saves what admin banned the player (name), the admin's steamid, the reason, the ban time, the banned player's name, the banned player's steamid (or IP), and the estimated time of unban.
  • It will load your currently banned players from the banned.cfg and listip.cfg files. (Only if the #define at the top of the plugin is uncommented)
  • If you use the menu to ban players, you will have to type a reason after you choose a player.
  • If you use the vote system to ban players, you will have to type a reason after you execute the amx_voteban command.
  • You can limit the ban time for admins based on their admin flags.
  • You can monitor all ban history (admins banning, unbanning, and when ban times are up) in the addons/amxmodx/logs/BAN_HISTORY_MMDDYYYY.log (MM = month, DD = day, YYYY = year)
  • If you wish to have only 1 file for ban history, uncomment the line at the top of the .sma file and recompile.
  • SQL is also supported and works for multiple servers. If you use the same SQL database for more than 1 server, then those servers will share the ban list.
  • For SQL, the default cvars for the SQL database will be used (amx_sql_host, amx_sql_user, amx_sql_pass, amx_sql_db).

Commands:
  • amx_ban <nick, #userid, authid> <time in minutes> <reason>
  • amx_banip <nick, #userid, authid> <time in minutes> <reason>
  • amx_addban <name> <authid or ip> <time in minutes> <reason>
  • amx_unban <authid or ip>
  • amx_banlist
    - Shows a list of who is banned
  • amx_addbanlimit <flags> <time in minutes>
    - Adds a max ban time to the list
    - Note: Use this command in the amxx.cfg

Cvars:
  • ab_website <website>
    • This is the website displayed to the banned player if you have an unban request section on your website.
    • Leave blank to not show a website.
    • Default: blank
  • ab_immunity <0|1|2>
    • 0 - Any admin can ban an immunity admin (flag 'a').
    • 1 - Immunity admins (flag 'a') cannot be banned.
    • 2 - Immunity admins (flag 'a') can only be banned by other immunity admins (flag 'a').
    • Default: 1
  • ab_bandelay <seconds>
    • Delay of banned players being disconnected.
    • Default: 1
  • ab_unbancheck <seconds>
    • Interval of checking if a player is unbanned.
    • Default: 5

Requirements:
  • AMX Mod X version 1.8.1 or higher
    - If you must use an earlier version, look at the top of the plugin:
    Code:
    // if you must have a maximum amount of bans to be compatible with AMXX versions before 1.8.0 // change this number to your maximum amount // if you would rather have unlimited (requires AMXX 1.8.0 or higher) then set it to 0 #define MAX_BANS 0
    Then recompile the plugin.

How To Use:
  1. Get Plugin for all 3 plugins at the bottom of this post. (If you want SQL, get advanced_bans_sql. Otherwise, use advanced_bans.
  2. Place the advanced_bans.amxx, plmenu.amxx, and adminvote.amxx files in your server's addons/amxmodx/plugins folder.
    - Note: You must overwrite your old plmenu.amxx and adminvote.amxx files.
  3. Open the plugins.ini from your server's addons/amxmodx/configs folder.
  4. Add advanced_bans.amxx at the top of the file!!!
  5. Make sure that plmenu.amxx and adminvote.amxx are enabled.
  6. Save and close the file.
  7. Place advanced_bans.txt from the bottom of this post in your server's addons/amxmodx/data/lang folder.
  8. Change the map or restart your server.

Ban Menu Plugin
  • The plmenu.sma has been edited to work with Advanced Bans.
  • Download the one that corresponds to the one you use:
    • plmenu_ab_base.sma - Edited version from the base plmenu.sma
    • plmenu_ab_dod.sma - Edited version from the DOD plmenu.sma
    • plmenu_ab_tfc.sma - Edited version from the TFC plmenu.sma
  • For those using the DOD or TFC versions, I have added the dynamic bantimes and slap amounts that existed in the base version but not in your mod-specific versions.

Adding Max Ban Times:
  • The order in which you add ban limits is the order in which they are checked.
    - Example: If you do:
    Code:

    amx_addbanlimit "b" "9000"
    amx_addbanlimit "c" "4000"

    - Then if a player has flags "b" and "c", then only "b" will be used.
  • If you want immunity to have no limit, but other admins to have it, then add this FIRST! to the amxx.cfg
    Code:

    amx_addbanlimit "a" "0"

Translations:
  • Swedish by LaineN
  • German by ExKiLL
  • Spanish by unknow
  • French by koyumu
  • Romanian by rekull
  • Finnish by SnoW
  • Dutch by lucius
  • Brazilian Portuguese by commonbullet
  • Russian by xPaw
  • Norwegian by Thrill
  • Polish by FakeNick

To Do:
  • Add a cvar to ban by IP or SteamID
  • Change to dynamic arrays instead of large, hard-coded arrays
  • Modify the ban menu to use amx_ban commands
  • Add Multilingual
  • Add ban limits per admin flags
  • Add ban history log
  • Add SQL support
    (Sorry, but this might never happen. I do not know SQL scripting, so I would need someone to add it for me.)
  • Add menu for ban management

Changelog:
  • Version 0.1 (with updates included)
    - Initial Release
    - Changed to dynamic arrays to hold ban information
    - Added option #2 for ab_immunity
    - Added support for banning by IP
    - Added compatability for banned.cfg and listip.cfg
    - Added menu support (plmenu.amxx)
    - Added ML support
  • Version 0.2
    - Added simple max ban time feature
  • Version 0.3
    - Added more cvars for max ban times
    - Added cvar for delay of player to disconenct after being banned
    - Added cvar for interval of checking for unban time of banned players
    - Added more translations
  • Version 0.4
    - Fixed the possible infinite loop, causing servers to crash
    - Added ban history
    - Removed max ban time cvars
    - Added max ban times per admin flags
    - Added more translations
  • Version 0.5
    - Fixed information not being printed into console
    - Fixed "amx_addban" using the admin's name as the SteamID when saving the ban
    - Added option for ban history to be one file
    - Added translations
  • Version 0.5b
    - Fixed players not being unbanned
    - Added translations
  • Version 0.6
    - Added small optimization for unban checking
    - Changed "UnBan Time" in the logs and chat messages to "Ban Length"
    - Fixed small code error where unban time was generated was used when length was 0
    - Changed IsValidIP() method to use regex (Thanks to arkshine)
    - Added plugin information inside the .sma file
    - Added a #define option to use maximum bans for compatability for AMXX < 1.8.0
    - Changed admin messages in chat to work with amx_show_activity cvar
    - Added ban reason to amx_voteban
    - Added translations
  • Version 0.6b
    - Fixed a small bug
  • Version 0.6c
    - Fixed amx_banlist for server consoles
    - Changed IsValidAuthid() method to use regex
  • Version 0.6d
    - Fixed ban limit for permanent bans
  • Version 0.7
    - Changed the "unlimited bans" version to be faster (Thanks to joaquimandrade)
    - Added check when adding bans if the player is already banned.
  • Version 0.8
    - Added SQL support.
  • Version 0.8.1
    - Added unban logging for non-SQL version.

Current Version: 0.8.1

READ THIS FULL POST BEFORE ASKING FOR HELP! :rtfm:
IF THE ANSWER TO YOUR QUESTION IS ON HERE, IT WILL BE IGNORED!

Huckleberry 11-22-2008 16:24

Re: Advanced Bans (Real Time)
 
First post...

NICE JOB! +karma :)

dorin2oo7 11-22-2008 16:26

Re: Advanced Bans (Real Time)
 
Well Done and Good Job ! +karma

Only one question... is there a chance to work WITH amxbans ?

crazyeffect 11-22-2008 16:35

Re: Advanced Bans (Real Time)
 
You need to place advances_bans.amxx in your users file?

Exolent[jNr] 11-22-2008 16:39

Re: Advanced Bans (Real Time)
 
Thanks for catching that! It should be plugins.ini.

crazyeffect 11-22-2008 16:39

Re: Advanced Bans (Real Time)
 
Ok :P

Nothanks :D

crazyeffect 11-22-2008 16:43

Re: Advanced Bans (Real Time)
 
Just an idea...

But maybe can you make it so an admin types "/ban" he can see al the peoples who are banned and unban them if he wants :D

AntiBots 11-22-2008 16:43

Re: Advanced Bans (Real Time)
 
Gj :D Now I test

bmann_420 11-22-2008 17:28

Re: Advanced Bans (Real Time)
 
Support for AMX Bans?

Exolent[jNr] 11-22-2008 17:52

Re: Advanced Bans (Real Time)
 
I've never used AMXBans, nor have I looked at it.
What is the purpose of AMXBans?

danielkza 11-22-2008 18:00

Re: Advanced Bans (Real Time)
 
Quote:

Originally Posted by Exolent[jNr] (Post 717103)
I've never used AMXBans, nor have I looked at it.
What is the purpose of AMXBans?

Share bans through multiple servers using an SQL database.

Arkshine 11-22-2008 18:12

Re: Advanced Bans (Real Time)
 
Official site, if interested to get more informations.

Bojangles 11-22-2008 18:24

Re: Advanced Bans (Real Time)
 
I have a suggestion for a cvar.

It goes along the lines of immunity. You should be able to set it so an admin without "a" can't ban someone with "a". However, an admin with "a" could ban someone with "a".

Our server will be using this very soon. We will let you know how we like it.

Exolent[jNr] 11-22-2008 19:20

Re: Advanced Bans (Real Time)
 
Quote:

Originally Posted by danielkza (Post 717109)
Share bans through multiple servers using an SQL database.

If I were to change it to an SQL database, it wouldn't work with AMXBans.
It would use it's own SQL database instead.
However, I don't know ANYTHING about any SQL scripting, but I have wanted to.

Quote:

Originally Posted by Bojangles (Post 717121)
I have a suggestion for a cvar.

It goes along the lines of immunity. You should be able to set it so an admin without "a" can't ban someone with "a". However, an admin with "a" could ban someone with "a".

Our server will be using this very soon. We will let you know how we like it.

Sounds ok. Will add.

bmann_420 11-22-2008 19:58

Re: Advanced Bans (Real Time)
 
Whats nice about amxbans its controlled by a web interface, and admins per servers, so its much easier and manageable :D I would assume in your creation of sql, it wouldnt be quite like it, I would hope it would be possible though to make it adaptable, as many people do use it now. :D

danielkza 11-22-2008 20:21

Re: Advanced Bans (Real Time)
 
I can try to adapt it you AMXBans if you guys want, since I have a basic SQL knowledge.

Brad 11-22-2008 21:52

Re: Advanced Bans (Real Time)
 
To make it compatible with AMXBans all you have to do is call a server command in the format of, "amx_ban 30240 #1234 hax". "30240" is the number of minutes. "#1234" is the player's userid. "hax" is the reason.

danielkza 11-22-2008 22:11

Re: Advanced Bans (Real Time)
 
Quote:

Originally Posted by Brad (Post 717187)
To make it compatible with AMXBans all you have to do is call a server command in the format of, "amx_ban 30240 #1234 hax". "30240" is the number of minutes. "#1234" is the player's userid. "hax" is the reason.

The problem is this plugins provides this command. You would have to integrate the support into the plugin itself for it to work.

Exolent[jNr] 11-22-2008 22:40

Re: Advanced Bans (Real Time)
 
Shouldn't AMXBans already have perfect ban time like this plugin since it uses an SQL database instead of the banned.cfg and listip.cfg?

Reaper2331 11-23-2008 00:21

Re: Advanced Bans (Real Time)
 
you are talking about using this and AMXBans together, but IMHO i think you shouldn't. some people have problems with AMXBans like installing and things like that, so having this plugin how it is, will just help the people who dont know how to use AMXBans, but altogether nice plugin.

Spunky 11-23-2008 03:55

Re: Advanced Bans (Real Time)
 
I think people with immunity shouldn't be able to be banned period. That's what immunity is there for. You could make a CVAR for people who like it the other way though.

ConnorMcLeod 11-23-2008 04:29

Re: Advanced Bans (Real Time)
 
Good job, my only suggestion would be to use other commands than amxx one, for example amx_rban ;)

Exolent[jNr] 11-23-2008 11:25

Re: Advanced Bans (Real Time)
 
@connorr
Then, the old commands wouldn't be replaced and some admins won't know/remember to use the new commands.

FakeNick 11-23-2008 11:34

Re: Advanced Bans (Real Time)
 
Good work, + karma.

Exolent[jNr] 11-23-2008 12:11

Re: Advanced Bans (Real Time)
 
Updated plugin.

What's new?
  • Changed the ban information arrays to be dynamic.
    - This makes the plugin require AMX Mod X version 1.8.0 or higher!
  • Added ab_immunity 2
    - Immunity admins (flag 'a') can only be banned by other immunity admins (flag 'a').

Bojangles 11-23-2008 15:29

Re: Advanced Bans (Real Time)
 
Quote:

Originally Posted by Spunky (Post 717258)
I think people with immunity shouldn't be able to be banned period. That's what immunity is there for. You could make a CVAR for people who like it the other way though.


Re-read it.

koleos 11-24-2008 02:44

Re: Advanced Bans (Real Time)
 
OMG! im gonna shoot this awesome plugin on my server now :P

koss_4life 11-24-2008 03:17

Re: Advanced Bans (Real Time)
 
First question:

Can you please make a ban-menu for this like amxbans?

You type: amxmodx-menu ->> you get options ->> choose ban-menu ->> you get a list of players on the server atm ->> Choose who you want to ban ->> Choose reasons (list up 7 reasons, and the last reason, you can add your own text) ->> Choose for how long time this person will be banned!


Second question:

I dont understand which way you can make it like amxbans when it comes to the website! How do you gonna make the website display the ban-list when you dont need the SQL? Maybe Im a noob at this but how can we do that?

I think this plugin is very useful if you dont need SQL-settings or something but still cover all the functions like AMXBANS !

Reaper2331 11-24-2008 07:19

Re: Advanced Bans (Real Time)
 
actually the menu sounds good. then you can add it to the Custom menu cfg. so that its in the amxmodmenu

Exolent[jNr] 11-24-2008 07:26

Re: Advanced Bans (Real Time)
 
I'll be adding a menu in the next version.

F4RR3LL 11-27-2008 14:46

Re: Advanced Bans (Real Time)
 
Cool ! +karma!

Exolent[jNr] 11-27-2008 15:43

Re: Advanced Bans (Real Time)
 
Added support for banning by IP:

Commands:
  • amx_banip <nick, #userid, authid> <time in minutes> <reason>
  • amx_addban <name> <authid or ip> <time in minutes> <reason>
  • amx_unban <authid or ip>

DruGzOG 11-27-2008 16:58

Re: Advanced Bans (Real Time)
 
Good Job, +karma, just suggesting a menu so Ill wait for the next release :)

Exolent[jNr] 11-27-2008 23:52

Re: Advanced Bans (Real Time)
 
Added menu support.

The menu isn't within advanced_bans.amxx.
I just modified the plmenu.sma so that it uses amx_ban and amx_banip commands.

DruGzOG 11-28-2008 08:57

Re: Advanced Bans (Real Time)
 
Sweet

Lo6idZe 11-28-2008 13:55

Re: Advanced Bans (Real Time)
 
Cool! But why don't you add bantime and adminname that banned player , to show to players when the message prints in there console. I can give you sound "You have been banned from this server" . Mmm... You can add HUD message and colored message to show to all players. If you don't want to do it by yourself , I can help.

Exolent[jNr] 11-28-2008 15:29

Re: Advanced Bans (Real Time)
 
It already shows the full ban information (unban time, admin name&steamid, client name&steamid/ip, reason, website for reporting ban abuse, etc.) to the banned player and the admin.
It also shows the ban reason, admin name, client name, and unban time to all players in chat.

The plugin works perfectly. The only 2 things I can think of that it needs is AMXBans support and multilingual messages.

Lo6idZe 11-28-2008 15:43

Re: Advanced Bans (Real Time)
 
But what about HUD? And sound "You have been banned from this server" ? . You can play it when banned player disconnects.

Exolent[jNr] 11-28-2008 15:48

Re: Advanced Bans (Real Time)
 
Why should those be added? That would just clutter up the plugin.

Lo6idZe 11-28-2008 15:50

Re: Advanced Bans (Real Time)
 
OK , your plugin , your opinion...


All times are GMT -4. The time now is 14:16.

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