AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   xREDIRECT (https://forums.alliedmods.net/forumdisplay.php?f=128)
-   -   xREDIRECT v2.0 RC2 (https://forums.alliedmods.net/showthread.php?t=148710)

xOR 01-27-2011 23:54

xREDIRECT v2.0 RC2
 
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 size from 112,673 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 :wink:



Activating SQL and/or statistics:

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. 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!

nikhilgupta345 01-28-2011 19:19

Re: xREDIRECT v2.0 RC1
 
<3....

upssito 02-05-2011 02:16

Re: xREDIRECT v2.0 RC1
 
Nice one james.

per_b 02-06-2011 18:53

Re: xREDIRECT v2.0 RC1
 
If I have SQL not defined, how can I make categories? In serverlist.ini?
You haven't mention about it.

eg. ..?
Code:

[my example server]
address=example.n-ice.org
port=27015
category="First Category"

[my 2nd example server]
address=example2.n-ice.org
port=27015
category="Second Category"

[my 3rd example server]
address=example3.n-ice.org
port=27015
category="First Category"

Second thing.
I guess it will be better if the plugin will have some other SQL cvar's, rather than standard in sql.cfg, because many plugins use these cvars (sometimes not everything can be in one database).

xOR 02-08-2011 01:49

Re: xREDIRECT v2.0 RC1
 
Quote:

Originally Posted by per_b (Post 1408874)
If I have SQL not defined, how can I make categories? In serverlist.ini?
You haven't mention about it.

categories are set like you have written, except that you don't need the quotation marks. so it's simply:
Code:

[my example server]
address=example.n-ice.org
port=27015
category=First Category

[my 2nd example server]
address=example2.n-ice.org
port=27015
category=Second Category

[my 3rd example server]
address=example3.n-ice.org
port=27015
category=First Category

Quote:

Originally Posted by per_b (Post 1408874)
Second thing.
I guess it will be better if the plugin will have some other SQL cvar's, rather than standard in sql.cfg, because many plugins use these cvars (sometimes not everything can be in one database).

as 2.0 is already in feature freeze, because it's an RC, i have scheduled it for the next version. it will come shortly after 2.0 release.

9evill 02-08-2011 10:26

Re: xREDIRECT v2.0 RC1
 
Hi, i have some problems testing beta version.

PHP Code:

L 02/08/2011 17:17:39: [AMXXDisplaying debug trace (plugin "xredirect-beta.amxx")
L 02/08/2011 17:17:39: [AMXXRun time error 4index out of bounds
L 02
/08/2011 17:17:39: [AMXX]    [0xredirect-beta.sma::stats_redirect (line 1657)
L 02/08/2011 17:17:39: [AMXX]    [1xredirect-beta.sma::client_authorized (line 3271)
L 02/08/2011 17:17:51: [AMXXDisplaying debug trace (plugin "xredirect-beta.amxx")
L 02/08/2011 17:17:51: [AMXXRun time error 4index out of bounds
L 02
/08/2011 17:17:51: [AMXX]    [0xredirect-beta.sma::stats_redirect (line 1657)
L 02/08/2011 17:17:51: [AMXX]    [1xredirect-beta.sma::client_authorized (line 3271

I enabled SQL and statistics.
To sql added 3 servers.

xOR 02-08-2011 15:25

Re: xREDIRECT v2.0 RC1
 
i see, that's actually a design problem by me. i will try to come up with a fix very soon (working on it right now). it will probably involve updating the xredirect_statistics table by adding a new column to it.

thanks for your report.

xOR 02-08-2011 17:35

Re: xREDIRECT v2.0 RC1
 
here's my first attempt to fix that problem. as i said you need to add a column to your xredirect_statistics table, you can do that by executing the following line on your database:
Code:

ALTER TABLE `xredirect_statistics` ADD `target_server_id` INT( 11 ) NULL ;
please try it and tell me whether it fixes your problem. i haven't tested it myself yet but will do that now. if it seems fine to me i will release it as RC2, unless you answer and still report problems.

9evill 02-09-2011 03:00

Re: xREDIRECT v2.0 RC1
 
This version writes statistics to database, but only few playeras are redirected and i have only few records in DB.
I set redirect_auto to 6, but still have only few redirects, i tried to connect to server myself with and without admin privileges, first time after map change it redirects, when i chage nick and try again, and it doesnt redirect.

When compiling plugin i also get folowing warning:
PHP Code:

xredirect-beta.sma(1756) : warning 204symbol is assigned a value that is never used"sQuery" 

Here is debug from console, when im not get redirected:

PHP Code:

L 02/09/2011 09:54:40"9evill<9021><STEAM_ID_x><>" connectedaddress "xxx:27005"
L 02/09/2011 09:54:41: [xredirect-beta.amxxAuto-redirect check for <9evill> (30), auto-redirectyesautomode6local prioritynoadminnoadmin slotsyesadmins/max0/32current players/bots/max29/28/32
L 02
/09/2011 09:54:41: [xredirect-beta.amxxMod comparisonlocal protocol/mod48/"cstrike"remote protocol/mod: (server 0): 47/"cstrike"
L 02/09/2011 09:54:41: [xredirect-beta.amxxMod comparisonlocal protocol/mod48/"cstrike"remote protocol/mod: (server 1): 47/"cstrike"
L 02/09/2011 09:54:41: [xredirect-beta.amxxMod comparisonlocal protocol/mod48/"cstrike"remote protocol/mod: (server 2): 48/"cstrike"
L 02/09/2011 09:54:45"9evill<9021><STEAM_ID_x><>" entered the game
L 02
/09/2011 09:54:48World triggered "Round_Start"
L 02/09/2011 09:54:48"9evill<9021><STEAM_ID_x><>" disconnected 


xOR 02-09-2011 04:48

Re: xREDIRECT v2.0 RC1
 
Quote:

Originally Posted by 9evill (Post 1410678)
This version writes statistics to database, but only few playeras are redirected and i have only few records in DB.
I set redirect_auto to 6, but still have only few redirects, i tried to connect to server myself with and without admin privileges, first time after map change it redirects, when i chage nick and try again, and it doesnt redirect.

so for the database statistics part i take this as "it is fixed now". i'll still do some tests myself but then i will release it as RC2.

Quote:

Originally Posted by 9evill (Post 1410678)
When compiling plugin i also get folowing warning:
PHP Code:

xredirect-beta.sma(1756) : warning 204symbol is assigned a value that is never used"sQuery" 


ok, this warning is removed now and won't be in RC2. but it doesn't hurt in any way, so it's not important.

Quote:

Originally Posted by 9evill (Post 1410678)
Here is debug from console, when im not get redirected:

PHP Code:

L 02/09/2011 09:54:40"9evill<9021><STEAM_ID_x><>" connectedaddress "xxx:27005"
L 02/09/2011 09:54:41: [xredirect-beta.amxxAuto-redirect check for <9evill> (30), auto-redirectyesautomode6local prioritynoadminnoadmin slotsyesadmins/max0/32current players/bots/max29/28/32
L 02
/09/2011 09:54:41: [xredirect-beta.amxxMod comparisonlocal protocol/mod48/"cstrike"remote protocol/mod: (server 0): 47/"cstrike"
L 02/09/2011 09:54:41: [xredirect-beta.amxxMod comparisonlocal protocol/mod48/"cstrike"remote protocol/mod: (server 1): 47/"cstrike"
L 02/09/2011 09:54:41: [xredirect-beta.amxxMod comparisonlocal protocol/mod48/"cstrike"remote protocol/mod: (server 2): 48/"cstrike"
L 02/09/2011 09:54:45"9evill<9021><STEAM_ID_x><>" entered the game
L 02
/09/2011 09:54:48World triggered "Round_Start"
L 02/09/2011 09:54:48"9evill<9021><STEAM_ID_x><>" disconnected 


the first two servers in the list are running on protocol 47. afaik the protocol has already been updated to 48 somewhere in 2008. xREDIRECT detects that the protocols are differing and won't redirect there. this makes sense, because you cannot connect to a protocol 48 server with a protocol 47 client and vice versa.
it doesn't matter that, as an exception, it does work with no-steam stuff (dproto), because we don't support no-steam, and given what i see here tells me your servers are no-steam. that you don't want to reveal your IP addresses supports this suspicion.

run them all with the latest official updates without illegal mods and everything will be fine...

xOR 02-09-2011 06:14

xREDIRECT v2.0 RC2
 
i just released xREDIRECT v2.0 RC2.

the changes are as follows:
- fixed a bug where statistics for auto-redirects were not written to the SQL database
- changed statistics to write target AND source server (before: only target server) to SQL database or statistics file
- increased error tolerance when mod or protocol for any server weren't detected correctly
- fixed error message that occured when using SQL with more servers in the database table than MAX_SERVERFORWARDS indicated

warning: if you have used v2.0 RC1 with SQL before, you have to run this SQL command on your database, before using any newer versions:
Code:

ALTER TABLE `xredirect_statistics` ADD `target_server_id` INT( 11 ) NULL ;

9evill 02-09-2011 06:45

Re: xREDIRECT v2.0 RC2
 
Maybe its because im using cs beta release? And yes i use dproto, but it doesnt mean my servers are illegal. Purpose of using dproto is to defend from cs exploits.

xOR 02-09-2011 07:02

Re: xREDIRECT v2.0 RC2
 
this doesn't have to do anything with beta, if beta would change the protocol, which it doesn't (afaik), we would see protocol 49 or something higher here.

also i didn't say that no-steam is illegal, did i? whether no-steam is legal or not depends on the country you live in and/or run your servers in, in some countries even steam is illegal, here is a good explanation.

the reason for me not to support it, however, doesn't have anything to do with whether it's legal or not. it is rather along the lines of what bail said here, mostly:
a)"No-Steam" uses outdated engine binaries. If Valve doesn't support them, how can I support them?
b)"No-Steam" uses outdated CS binaries. This means that internal data can be different, and that means I'd have to support every iteration of CS into the past. The amount of CS internals CSDM relies on is heavy, and this would be a huge amount of work

and your case is a good example. i have programmed a check so that xREDIRECT detects differences in protocol or mod. so it is "smarter", because it can detect by itself when redirecting to a server wouldn't work, as the target server is running an incompatible version. now your non-steam stuff breaks this feature, because apparently it randomly reports to be protocol 47 or 48. to change that i would now have to include extra code only for this specific 47/48 check and allow redirection between 47 and 48.

i am not as aggressive about this topic as many others here, it's just that i won't ever do extra work only to support that stuff.
that said, you are a nice guy with quite some technical knowledge, helping me to find errors that also steam users can benefit from. so i will be as kind as telling you something that no-steam users would find out at some point anyway. it can still help you with your problem and doesn't cost me extra effort, because it is already in the code for other reasons: during 1.1 RC i noticed that the mod detection sometimes didn't work correctly, even with steam servers. to make sure even those people with this problem can run xREDIRECT, i now implemented the possibility to disable mod detection. find the line "#define MOD_DETECTION true" and change it to "#define MOD_DETECTION false" and recompile the plug-in.

9evill 02-09-2011 07:34

Re: xREDIRECT v2.0 RC2
 
Now it works perfectly :)

Thanks.

DeLiriuM 03-12-2011 08:05

Re: xREDIRECT v2.0 RC2
 
Adding a back button on Page #2,#3... etc, and cancel button only on page #1 would be great!

xOR 03-12-2011 08:29

Re: xREDIRECT v2.0 RC2
 
Quote:

Originally Posted by DeLiriuM (Post 1431950)
Adding a back button on Page #2,#3... etc, and cancel button only on page #1 would be great!

the idea behind the category feature was that people with a lot of servers can organize them in the menu so that it is exactly NOT necessary to jump through pages so much. this is why only the category feature has the option to use a back key there. it's just not that obvious because it isn't documented and not a CVAR. to get that, check the following line in the source code:
Code:
#define CANCEL_IS_BACK_KEY false        // only when categories are enabled: true = "Cancel" key in server menu turns into a "Back" key and goes back to category menu

the comment says it all :wink:

DeLiriuM 03-12-2011 08:32

Re: xREDIRECT v2.0 RC2
 
Well it does, but there's no one to read it :D Thanks.

DeLiriuM 07-28-2011 02:04

Re: xREDIRECT v2.0 RC2
 
Code:

  • 0 Disable automatic redirecting when server is full

  • 1 If server is full redirect to random server from list

  • 2 If server is full redirect to the next server in list

  • 3 Always redirect (even if server is empty), except admins, redirect to random server

  • 4 Always redirect (even if server is empty), except admins, redirect to next server in list

  • 5 Always redirect (even if server is empty), including admins, redirect to random server *

  • 6 Always redirect (even if server is empty), including admins, redirect to next server in list *


Any chance of adding an option, to redirect only to servers (random) from the same category?

xOR 08-01-2011 18:33

Re: xREDIRECT v2.0 RC2
 
it's a good idea but i can't make any promises, real life is keeping me too busy for any bigger plans right now :|

addons 08-05-2011 18:21

Re: xREDIRECT v2.0 RC2
 
Thx :D

Nemrak 08-16-2011 15:12

Re: xREDIRECT v2.0 RC2
 
1 Attachment(s)
Hello,
is there any chance that someone could modify the plugin so that the users that have immunity won't see the advertising messages about the servers available for redirect (messages that appear when the user is dead).
I think that the admins/moderators already know all about the servers from their community and the messages are a bit annoying especially when an admin is trying to track a possible cheater.

nikhilgupta345 08-23-2011 11:28

Re: xREDIRECT v2.0 RC2
 
1 Attachment(s)
Quote:

Originally Posted by Nemrak (Post 1534025)
Hello,
is there any chance that someone could modify the plugin so that the users that have immunity won't see the advertising messages about the servers available for redirect (messages that appear when the user is dead).
I think that the admins/moderators already know all about the servers from their community and the messages are a bit annoying especially when an admin is trying to track a possible cheater.


THE TAPPER 08-25-2011 17:18

Re: xREDIRECT v2.0 RC2
 
hey nice plugin :D

but i do have a question :O, can i set this up so i can have a cs1.6 and cscz servers in the /server list

so it would look like this

i type /server
1. cscz dust2 server
2. cscz public server
3. cs1.6 public server

thanks

Mordekay 08-25-2011 17:44

Re: xREDIRECT v2.0 RC2
 
Simply set that name like you want, but you cannot redirect yourself to a different game.

THE TAPPER 08-25-2011 19:49

Re: xREDIRECT v2.0 RC2
 
Quote:

Originally Posted by Mordekay (Post 1540971)
Simply set that name like you want, but you cannot redirect yourself to a different game.


im sorry but so that i no (just to be clear ;))

are you sayin it will work but i have to connet myself to that game ?

Mordekay 08-26-2011 03:18

Re: xREDIRECT v2.0 RC2
 
You cannot redirect you to a different game, it's impossible. Simply because you cannot connect with CS 1.6 to a CS:CZ server and vise versa. All you can do with xredirect in that case is annoncing that you have servers on other games

THE TAPPER 08-26-2011 07:26

Re: xREDIRECT v2.0 RC2
 
oh ok thanks :.(

Shadowhawk 09-26-2011 14:27

Re: xREDIRECT v2.0 RC2
 
Dude i cannot see any message like player has been redirected to that server or player bas come from that server to this server via xredirect like that.. but i need that.. wat to do?

xOR 09-26-2011 17:45

Re: xREDIRECT v2.0 RC2
 
you have to download redirect-language.zip and put xredirect.txt into your /data/lang folder.

Shadowhawk 09-27-2011 09:40

Re: xREDIRECT v2.0 RC2
 
1 Attachment(s)
Am using it for my Czero server and this is file i have added. But still am not getting any redirectiong msgs :(

itsmedevil 09-27-2011 10:01

Re: xREDIRECT v2.0 RC2
 
hi.....all

Is there any way to disable manual redirect in my primary server.

i.e. I want players to be redirected automatically to my other servers only when my primary server is full.
The manual shift has to disabled only in my main server.
In my other servers manual redirect has to be on, so that ppl can join whenever my main server is free.

Shadowhawk 09-28-2011 05:48

Re: xREDIRECT v2.0 RC2
 
Plus one more prob, I dono wat went wrong. my server is allowing only 31 players if 32nd player joins he s being redirected to the next server and next server also allowing 31 players and then it shows server full, Is thr any CVAR to change that?

Mordekay 09-28-2011 07:11

Re: xREDIRECT v2.0 RC2
 
no. This is the only way ohw redirecting can work. Read the first post of the original xredirect thread

Shadowhawk 09-28-2011 07:56

Re: xREDIRECT v2.0 RC2
 
Yeah but i have seen in a server in which players get redirected only if the server is full that is 32/32. Need to change anything in sma?

Mordekay 09-28-2011 08:32

Re: xREDIRECT v2.0 RC2
 
This is impossible. Without a slot someone can join he cannot be redirected. He would simply get the message server is full and sees his console.
Read the FAQ for that.

RAFFAK 10-01-2011 16:36

Re: xREDIRECT v2.0 RC2
 
Can anyone help me? I added 8 servers. It should be 2 servers in 9. More yeah? But showing only 6 servers and I cant press 9. How need to do, that will be second page of servers list?

xOR 10-01-2011 16:45

Re: xREDIRECT v2.0 RC2
 
yes, the FAQ can help you :wink:

RAFFAK 10-04-2011 16:53

Re: xREDIRECT v2.0 RC2
 
Yes, thank you very much. It's helped me :)

Swuifti 11-04-2011 13:07

Re: xREDIRECT v2.0 RC2
 
Hi i am sry if the Q is lame but how can i make my servers (all of them) to be loaded from SQL ? (the serverlist...)

Mordekay 11-04-2011 14:43

Re: xREDIRECT v2.0 RC2
 
1) this is no support thread, start a new thread if you have problems using xredirect and you couldn't find a sollution in another thread, but
2) non-steam is not supported here, so forget about creating a new thread, you won't get help here


All times are GMT -4. The time now is 01:51.

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