Raised This Month: $106 Target: $400
 26% 

Advanced Bans (Real Time) by Exolent


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Server Management        Approver:   Hawk552 (427)
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 11-22-2008 , 17:15   Advanced Bans (Real Time) by Exolent
Reply With Quote #1

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!
IF THE ANSWER TO YOUR QUESTION IS ON HERE, IT WILL BE IGNORED!
Attached Files
File Type: txt advanced_bans.txt (11.9 KB, 43994 views)
File Type: sma Get Plugin or Get Source (adminvote.sma - 51743 views - 17.1 KB)
File Type: sma Get Plugin or Get Source (advanced_bans.sma - 52048 views - 50.2 KB)
File Type: sma Get Plugin or Get Source (advanced_bans_sql.sma - 24137 views - 50.2 KB)
File Type: sma Get Plugin or Get Source (plmenu_ab_base.sma - 34497 views - 25.7 KB)
File Type: sma Get Plugin or Get Source (plmenu_ab_dod.sma - 18325 views - 24.4 KB)
File Type: sma Get Plugin or Get Source (plmenu_ab_tfc.sma - 18369 views - 24.7 KB)
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!

Last edited by Exolent[jNr]; 02-18-2011 at 18:25. Reason: Updated to v0.8.1
Exolent[jNr] is offline
Huckleberry
Member
Join Date: Nov 2008
Old 11-22-2008 , 17:24   Re: Advanced Bans (Real Time)
Reply With Quote #2

First post...

NICE JOB! +karma
__________________

Blazenblood.com
Huckleberry is offline
dorin2oo7
Senior Member
Join Date: Jun 2008
Location: Sibiu, Romania
Old 11-22-2008 , 17:26   Re: Advanced Bans (Real Time)
Reply With Quote #3

Well Done and Good Job ! +karma

Only one question... is there a chance to work WITH amxbans ?
__________________
dorin2oo7 is offline
crazyeffect
Veteran Member
Join Date: Jul 2008
Location: Belgium
Old 11-22-2008 , 17:35   Re: Advanced Bans (Real Time)
Reply With Quote #4

You need to place advances_bans.amxx in your users file?
__________________
crazyeffect is offline
Send a message via MSN to crazyeffect
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 11-22-2008 , 17:39   Re: Advanced Bans (Real Time)
Reply With Quote #5

Thanks for catching that! It should be plugins.ini.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
crazyeffect
Veteran Member
Join Date: Jul 2008
Location: Belgium
Old 11-22-2008 , 17:39   Re: Advanced Bans (Real Time)
Reply With Quote #6

Ok

Nothanks
__________________
crazyeffect is offline
Send a message via MSN to crazyeffect
crazyeffect
Veteran Member
Join Date: Jul 2008
Location: Belgium
Old 11-22-2008 , 17:43   Re: Advanced Bans (Real Time)
Reply With Quote #7

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
__________________
crazyeffect is offline
Send a message via MSN to crazyeffect
AntiBots
Veteran Member
Join Date: May 2008
Location: La Plata, Bs As, Argenti
Old 11-22-2008 , 17:43   Re: Advanced Bans (Real Time)
Reply With Quote #8

Gj Now I test
__________________
AntiBots is offline
Send a message via ICQ to AntiBots Send a message via MSN to AntiBots Send a message via Skype™ to AntiBots
bmann_420
AMX_Super Pooper
Join Date: Jan 2005
Location: [SuperCentral.co]
Old 11-22-2008 , 18:28   Re: Advanced Bans (Real Time)
Reply With Quote #9

Support for AMX Bans?
__________________

Last edited by bmann_420; 11-22-2008 at 18:35.
bmann_420 is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 11-22-2008 , 18:52   Re: Advanced Bans (Real Time)
Reply With Quote #10

I've never used AMXBans, nor have I looked at it.
What is the purpose of AMXBans?
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] 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 22:40.


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