View Single Post
xOR
Veteran Member
Join Date: Jun 2006
Location: x-base.info
Old 01-27-2011 , 23:53   xREDIRECT - v2.0 RC1 released
#1269

i have just released the first release candidate of v2.0. after v1.0 this is one of the biggest releases, introducing 983 new lines of code increasing the source file from 112,673 bytes to 156,780 bytes.
the main changes being
  • Category feature (server menu can be grouped by categories you define)
  • SQL support (for server list and statistics)
  • Statistics about redirections can now be written to a file and vault or to an SQL table
  • Advertisement of the /server command (so players know that it's there)
  • Many other fixes and additions
or check the complete changelog.

Release Candidate means that this is in beta state, so don't use it if you need a perfectly stable environment.

currently documentation on the new features is a bit sparse, i will try to change that within the next days and weeks. but i am always here to answer your questions



Activating SQL and/or statistics:

by default these new features are disabled. to enable SQL, statistics or both you have to find these lines in the source code:
Code:
//#define SQL //#define STATISTICS
if you want to activate a feature remove the // from the beginning of the line and recompile. xREDIRECT will have the following behavior depending on the combination of these options:

SQL ON and STATISTICS OFF:
the server list will be loaded from the database. no statistics are being written anywhere.

SQL ON and STATISTICS ON:
the server list will be loaded from the database. statistics are written to an SQL table.

SQL OFF and STATISTICS ON:
the server list will be loaded from the serverlist.ini file. statistics are written to both a vault and the file xredirect-actions.csv in AMXX logs folder. the vault will hold summary data (like the number of manual redirects, automatic redirects etc.). the data in the vault can be queried by using the new redirect_stats command. the CSV file will hold all actions done by xREDIRECT with detailed data (timestamp, name of player redirected, user ID, IP address...).

SQL OFF and STATISTICS OFF:
the server list will be loaded from the serverlist.ini file. no statistics are being written anywhere.



SQL prerequisites

You need to configure AMXX (in /config/sql.cfg) with your SQL credentials and run the script in xredirect.sql.txt on the DB you want to use with AMXX. it will create the tables that will be used by xREDIRECT. currently there is no template or web script to help you managing these tables, so it is recommended to use a generic tool like PHPMyAdmin to fill the tables.
i would be very glad if you want to write a frontend to manage these tables (and also show statistics from the statistics table) for the community. please post it here so we can offer it along with xREDIRECT!



SQL: the "attributes" concept

when it was a file each server could have its own serverlist.ini configuration. maybe server 1 had the option nomanual=1 set for server 3, while server 2 has the option nomanual=0 set for server 3.
when the server list is in an SQL table this basically isn't possible there, because all servers access the same table.

to still make such specific configurations possible the xredirect_attributes table was introduced. there you can specify any option along with the server it is valid for and the server it is directed at. for the above example you would insert these two entries:
Code:
INSERT INTO xredirect_attributes VALUES (1, 3, 'nomanual', '1');
INSERT INTO xredirect_attributes VALUES (2, 3, 'nomanual', '0');
__________________
Got more than one HL1 (CS, DoD, NS, TS, TFC, HLDM...) server? Check:

Last edited by xOR; 01-28-2011 at 00:06.
xOR is offline