Raised This Month: $51 Target: $400
 12% 

Amxbans 4.2 (YoMama) [Updated 051013]


Post New Thread Closed Thread   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Server Management       
lantz69
AMX Mod X Beta Tester
Join Date: Mar 2004
Location: Sweden, Skåne
Old 10-13-2005 , 08:13   Amxbans 4.2 (YoMama) [Updated 051013]
#1

Amxbans 4.2

I will continue YoMama's work with amxbans from now on. (got an OK! from BAILOPAN last night as I haven't been able to get in touch with YoMama)
Amxbans is updated for use with amxmodx 1.60, but should also work with 1.0, 1.01, 1.50 and 1.55 (not tested)
Linuxusers should upgrade to amxmodx 1.60 as the mysql module works best in that version.


Installing Amxbans 4.2
Download the package (amxbans_4.2.rar) below.
IMPORTANT!!
Backup previous installations before you continue

############################################# ##

Amxbans Web Interface 4.2 (read the changelog in the next post)

To be able to get the web interface to work you need to check this:
1. Access to a MySQL Database.
2. website/space with PHP (magic_quotes_gpc must be ON)

Installing the web interface

For users who upgrade the webfiles.
Rename the old web folder with the webfiles to amxbans_OLD
Then create a new folder I.e amxbans and upload the new webfiles there.
Then if something goes wrong you can always go back to your old files.
Don't forget to give write access to the include folder and the smarty/templates_c folder.
Never use your old config_inc.php file or setup.php file
Now go to step 2 or 6 below

------
Users installing for the first time
1. Copy the contents of the 'web'-folder to a location accessible to your webserver (e.g. /usr/local/www/www.yoursite.com/amxbans).
2. Download the latest stable release of Smarty: http://smarty.php.net/download.php
3. Copy the contents (including subdirs!) of the 'libs'-dir to the 'smarty'-directory.
4. Make sure that the user running your webserver has write-access to the smarty/templates_c directory and to include directory !
5. Make sure you have a database available that will be holding the AMXBans tables.
6. Open setup.php in your favorite browser (e.g. http://www.yoursite.com/amxbans/admin/setup.php) and follow the directions.
Note that existing tables will *NOT* get overwritten. If your upgrading from a previous version.
Make sure you enter the same login details as your current one when asked.
Delete the file setup.php from the 'admin'-dir. The web interface will not work if you do not remove this file.

If this works go to the next step and install the plugin
If it doesn't work, read the instructions again or read FAQ(next post) or post in this thread for help.
You will need to at least have the tables created or the plugin will not work

############################################# #

Amxbans plugin 4.2 (read the changelog in the next post)

Installing the plugin
Copy the files amxbans_4.2.sma and admin_sql_4.2.sma to your amxmodx/scripting folder

Compile the plugins amxbans_4.2.sma and admin_sql_4.2.sma in the scripting folder.
Read below for special compiling options if you want to change some things like bantimes and such.
The compiled .amxx file(s) must then be copied to you plugins folder.

In plugins.ini
insert admin_sql_4.2.amxx Note. Only if you want to use amxbans to manage admins..// So this plugin is not necesary
place amxbans_4.2.amxx just after admin_sql.amxx AND before admincmd.amxx
Dont forget to comment or delete amxbans_menu_new.amxx in plugins.ini as it is now merged into the amxbans_4.2 plugin

Code:
Example.
; AMX Mod X plugins
; Admin Base - Always one has to be activated
;admin.amxx		; admin base (required for any admin-related)
;admin_sql.amxx		; SQL version (comment admin.amxx)
admin_sql_4.2.amxx	; AmxBans SQL version of admin_sql if you are using amxbans web interface to manage admins
;amxbans_new.amxx
amxbans_4.2.amxx
admincmd.amxx
..
..
;amxbans_menu_new.amxx ; This must be commented/removed when using amxbans 4.2
plmenu.amxx
Language file.
This file must be updated to work with amxbans 4.2
Place the amxbans.txt in amxmodx/data/lang folder


Compiling options at the top of amxbans_4.2.sma source
Code:
// This admin will get the higher bantimes and also able to ban freely in console
// If you set this to ADMIN_BAN (d-flag) they will get the HighBanMenuValues and also ban freely in console 
#define HIGHER_BAN_TIME_ADMIN	ADMIN_LEVEL_B	// DEFAULT ADMIN_LEVEL_B  n-FLAG IN YOUR ACCESS. This admin also needs the d-flag

// ban minutes for admin with d-flag and can only ban max 600 min in console
// IMPORTANT put the lowest value first and the highest value last
new g_LowBanMenuValues[4] = {5, 60, 240, 600} // The numbers are in minutes

// ban minutes for admin with n-flag and d-flag
// IMPORTANT!! put the lowest value first and the highest value last... 0 = PERMANENT BAN
new g_HighBanMenuValues[4] = {5, 60, 6000, 0} // The numbers are in minutes.. 0 = PERMANENT BAN


// If you want bans broadcasted to all players in the server, uncomment this
#define BCAST_BANS

// If you want to add the mapname in the servername uncomment this. Ie banned on Server: Servername (de_mapname)
//#define ADD_MAPNAME_IN_SERVERNAME

// If you want static reasons instead of reasons fetched from the database, uncomment this
//#define STATIC_REASONS

Good luck and hope it works ok now.
/lantz69
Attached Files
File Type: rar amxbans_v4.2.rar (656.6 KB, 761 views)
File Type: txt amxbans.txt (15.8 KB, 587 views)
File Type: sma Get Plugin or Get Source (amxbans_4.2.sma - 1657 views - 49.8 KB)
__________________
Using: Amxmodx 1.8.1.xxxx, cstrike
http://www.vanilla.se/
lantz69 is offline
lantz69
AMX Mod X Beta Tester
Join Date: Mar 2004
Location: Sweden, Skåne
Old 10-13-2005 , 08:13  
#2

Changelog

Current version: v4.2

--------------------------------------------------------------
Changelog for Plugin Amxbans changes/fixes by lantz69 after version 4.0 by YoMama
--------------------------------------------------------------

4.2 Thursday October 13, 2005
- Changed: Merged amxbans and amxbans_menu into one plugin (amxbans_4.2.sma).
- Added: Made defines at the top of source to make it easy to change bantimes etc.
- Changed: Rearranged the functions and changed the coding style.
- Fixed: The get port bug is solved. Before the port always was 27015 even if the server was 27017 or another port.
- Fixed: Some data was not written to the data base correctly when player pruned the data base himself
- Changed: Now you get the bantime in weeks, days, hours, minutes and seconds instead of only minutes (thx Brad Jones)
- Recomendation: Dont use the MOTDURL from the web. You should use the one in the plugin as it is more reliable and faster.
- Fixed: amx_find now works and searches the active amx_ban table. Syntax: amx_find <steamID>.
- Added: amx_findex searches in the expired ban_history table. Syntax: amx_findex <steamID>.
- Fixed: Banmenu reasons could max be 6 now it can be 7 like it should (thx DerProfi)
- Added: The map name can be added to the servername in the ban. This is by Default disabled.
- Added: New cvar amxbans_debug <1|0>. Use this if you want to debug false kicked players.
- Changed: Implemented Brad Jones function to get hours,days week in HLSW chat and amxx logs (thx Brad Jones)
- Updated: Language file amxmodx\data\lang\amxbans.txt is updated. Dont forget to update or amxbans 4.2 won't work properly

--------------------------------------------------------------
4.1 Friday Sep 23, 2005
- Added so admins with the d-flag can ban max 600 minutes in console.
- Added so admins with the d-flag AND n-flag can ban whatever time they like in console and will also get higher bantimes in the menu.
- Fixed an issue when a string was formatted incorrectly when banning.
- Changed the way results from the data base are handled to ged rid of memory leaks.
- Fixed so you can compile when you want STATIC REASONS and not reasons from the DB.

--------------------------------------------------------------
4.01 Sunday Sep 04, 2005
- Fixed some result variables that where wrong and crashed the server when using amxmodx 1.50 and later versions.
- Fixed when a recently banned player comes back after ban is expired. Now the data base gets pruned correctly.
- Fixed so Bots don't triggers errors in the logs when connecting.
- Changed so players recieve better info when they get kicked when they are banned.


TODO (Plugin)
* Make the rest of the strings to use the Multilanguage system


##########

------------------------------------------------------------
Changelog for Amxbans Web Interface 4.2 changes/fixes by lantz69 after version 4.0 by YoMama/Lux
------------------------------------------------------------
4.2 Thursday October 13, 2005
- New options in setup.php and in cfg.php
1. Display admin nick for public users on front-page?
2. Should public users be able to use search?
3. Hours between webserver and game server. This is useful if your webserver and gameserver is located in diffrent timezones.(Suggested by QuakerOates)

- Reason for ban is shown on all pages if that is enabled in the settings.
- Changed the dropdown menu to have an extra option "Home"
- Now you can leave password blank in the setup if you like/must.
- Fixed an issue on win32 servers when getting the auto setting of path in setup.php
This should not be an issue on linux/apache servers
- The folder "tmp" is in the package by default now. Some users got confused when that folder didn't exist
- Live ban now works after the steamUpdate in august
- Updated the geoip.dat
- You are now able to edit expired bans.


TODO (Web Interface)
* Add the possibility to add links to demo files recorded on the player that is banned.
* Add fancy layers for search results


##########

FAQ for the Amxbans plugin

Q: Some of my admins can't ban permanent and don't get the same bantimes in the menu as other admins. Why is it like that?
A: There are two ways of solving this.(Only use one of them!)
First solution. Give all you admins the d-flag and the extra n-flag. Then they will be able to ban all they want and they will also get the higher ban values.
OR
Second solution. Change the define at line 75 in the file amxbans_4.2.sma
Code:
#define HIGHER_BAN_TIME_ADMIN   ADMIN_LEVEL_B
To
Code:
#define HIGHER_BAN_TIME_ADMIN   ADMIN_BAN
Compile the .sma and copy the .amxx file to the plugins folder.
Now all your admins with the d-flag can ban all they want and they will also get the higher ban values.

Q: How can I change the bantimes in the menu?
A: Change the define at line 79 and/or 83 in the file amxbans_4.2.sma
Code:
new g_LowBanMenuValues[4] = {5, 60, 240, 600} // The numbers are in minutes new g_HighBanMenuValues[4] = {5, 60, 6000, 0} // The numbers are in minutes.. 0 = PERMANENT BAN
Note. You can only have four ban time values. If you want more values you need to edit the plugin in many places.
Only use more than four if you know what you are doing.

Compile the .sma and copy the .amxx file to the plugins folder.

-------------------------------------------------

FAQ for the Amxbans web Interface

Q: Why don't add live ban work??
A: It works but you have not set it up right
It can be that you have your game server and webserver on diffrent ip
You must add in server.cfg
ip xxx.xxx.xxx.xxx // Use Internet ip and not local ip
exec your server.cfg in server console or restart server or just do a mapchange

You must also add rcon_password in the amxbans web interface.
Choose servers in the drop down menu.
Click on the edit button
Now you can add you rcon_password.
Now your live ban should work.

Q: How do I add resons to the data base which will show in the menu?
A: You need to log into Amxbans web Interface and the choose Servers in the dropdown menu.
In the new page you see a button "Reasons" click on it
Now you can add reasons for that server.
You have to add reasons for each server.

Q: I get a lot of warnings in the webpages. How can I get rid of them. I cant edit php.ini b/c i rent my webserver.
A: Create a .htaccess file in your webroot (http://yourdomain.com/HERE) with this content
Code:
php_flag register_globals on 
php_flag display_errors  off
If you are able to edit your php.ini look for this:
Code:
error_reporting  = E_ALL
change to
Code:
error_reporting  = E_WARNING ;E_ALL
###############
Credits
YoMama of cource for creating this plugin in the first place.
Brad Jones for making the bantime to show weeks, days, hours, minutes and seconds in the ban
Pendragon for helping out and betatesting
__________________
Using: Amxmodx 1.8.1.xxxx, cstrike
http://www.vanilla.se/
lantz69 is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 10-13-2005 , 08:17  
#3

Nice, hopefully I can get SQL working on my gameserver soon o_o
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
Brad
AMX Mod X Team Member
Join Date: Jun 2004
Old 10-13-2005 , 08:47  
#4

You're doing a great job Lantz! I'm glad you are taking over this plugin.
Brad is offline
Curryking
Veteran Member
Join Date: Jun 2004
Location: 51.22°N / 6.77°E
Old 10-13-2005 , 10:12  
#5

Quote:
Originally Posted by Brad
You're doing a great job Lantz! I'm glad you are taking over this plugin.
Nothing to add! Will update to 4.2 this afternoon. Thanks lantz69!

Cheers, Curry
__________________
Full speed - no brakes!
Curryking is offline
Oum
Junior Member
Join Date: Sep 2005
Old 10-13-2005 , 10:28  
#6

mmm... ok... mysql module is installed, both amxx plugins are installed correctly I guess
Code:
          [ 6] MySQL            RUN   -    mysql_amxx_i386.  v1.60     pl1   ANY   ANY
Code:
          [  1] Admin Base (AmxBa  1.60     AMXX Dev Team     admin_sql_4.2.a  running  
          [  2] AMXBans            4.2      YoMama            amxbans_4.2.amx  running  
          [  3] Admin Commands     1.55     AMXX Dev Team     admincmd.amxx    running
sql.cfg is correctly filled, web interface is installed and working.

but there is still something I don't understand.... How do I add the server(s) ??
Oum is offline
lantz69
AMX Mod X Beta Tester
Join Date: Mar 2004
Location: Sweden, Skåne
Old 10-13-2005 , 10:35  
#7

Quote:
Originally Posted by Oum
sql.cfg is correctly filled, web interface is installed and working.

but there is still something I don't understand.... How do I add the server(s) ??
The amxbans plugin add the servers automatically to the data base.
Do a mapchange and look in amxx logs and you will see if they go online or if you find some errors.
__________________
Using: Amxmodx 1.8.1.xxxx, cstrike
http://www.vanilla.se/
lantz69 is offline
Oum
Junior Member
Join Date: Sep 2005
Old 10-13-2005 , 10:58  
#8

in amxx logs I only have this :
Quote:
Originally Posted by amxmodx/logs/L1013.log
L 10/13/2005 - 15:54:58: -------- Mapchange to de_dust2 --------
L 10/13/2005 - 15:54:59: [amxbans_4.2.amxx] AMXBans Menu 4.2 is online (0 reasons loaded)
but in server console logs I have this :
Quote:
[AMXX] Aucun admin trouve. (= no admin were found)
[AMXBANS] SQL error: 'You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use'
[AMXBANS] No reasons found.
L 10/13/2005 - 15:54:59: [amxbans_4.2.amxx] AMXBans Menu 4.2 is online (0 reasons loaded)
I've checked sql.cfg again and it is totally correct
magic_quotes_gpc is on
Oum is offline
lantz69
AMX Mod X Beta Tester
Join Date: Mar 2004
Location: Sweden, Skåne
Old 10-13-2005 , 11:15  
#9

Please doublecheck your settings again so that it is the same in amxbans web Interface and sql.cfg

Also what version is the mysql server?
If you have 4.1 or newer you must use the special sql modules from here.
http://prdownloads.sourceforge.net/a...x-1.60-SQL.zip

I just did a complete install of the web files and with a new DB and I had no problem registering my server to the DB.


[EDIT 01]
Also try to change map a couple of times and see if that helps
__________________
Using: Amxmodx 1.8.1.xxxx, cstrike
http://www.vanilla.se/
lantz69 is offline
DruM
New Member
Join Date: Sep 2005
Location: Rotterdam, Holland
Old 10-13-2005 , 11:39  
#10

http://forums.alliedmods.net/showthread.php?t=382
This version of ATAC is out of date
Can somebody fix it for
http://forums.alliedmods.net/showthread.php?t=11284 working with amxbans?
i have the last version of ATAC and the source is not the same for banning
__________________
Sorry for my bad english
DruM is offline
Closed Thread



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 08:58.


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