Raised This Month: $7 Target: $400
 1% 

xREDIRECT - server redirect menu


Post New Thread Closed Thread   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   General Purpose        Approver:   v3x (159)
xOR
Veteran Member
Join Date: Jun 2006
Location: x-base.info
Old 06-14-2006 , 21:03   xREDIRECT - server redirect menu
#1

(Deutsche Übersetzung - German translation)
(Българска версия на плугина - Bulgarian translation, thanks to BlooD/TiDe)



Screenshots:




Description:

First of all, if you are too lazy to read all this don't bother me with problems or questions!
It's a non-simple plugin for non-simple people who want more than only some simple features. If this is not what you want, that's ok. Then just move along. Or maybe you only want to redirect people to your new server when the IP changed? Then better check out this plugin.
Right, it is not easy to install. But it can't be too hard either, when it is running on hundreds of servers. Sorry, I just had to say that, as I don't want to have anything like this again.

For those who want to participate in coding this plugin, the code cross reference is here. You can also generate it from source (from 1.0RC2 and above) using compiler option -r.

If you want to know on how many servers it is running you can look at the official addon/plugin stats. Thanks to Bailopan for adding it at this point.
You want to find servers where this plugin is running? Use this.

The plugin does several things that all can be turned on or off separately by CVAR's:
  • on startup it reads the available servers from SERVERFILE ("amxmodx/config/serverlist.ini" by default)
  • saying /server shows a list of available servers (if redirect_manual is 1) - people can choose a number from the list and are immediately sent to that server
  • when the server is full (one free slot left, that is) people are automatically forwarded to a random server or the next server the list - redirect_auto coontrols this
  • with admin slots enabled when an admin (that is, he has reservation flag) connects the last person that had connected before is redirected to another server or dropped if there is no other so to be redirected to
  • a limit can be set how many admins can be there at the same time
  • when a server from the list is full or down the server is disabled in the menu and players are not redirected there automatically - to be able to check whether a server is down redirect_check_method must be > 0 and to check whether it is full redirect_check_method must be > 1
  • the servers are announced every redirect_announce seconds - set to 0 to turn announcements off; the server list is shown as HUD message and for living players displayed at the top and for dead players displayed somewhere below the top so it is not covered by the "spectator bars"; how much information the announcements include depends on redirect check_method
  • depending on redirect_check_method servers can be checked for being down/full or even current map, number of current players and maximum players can be displayed in the menu and in the announcements - when no server is available for automatic redirection the player is just dropped with an appropriate message
  • when someone is redirected either manually or automatically this is shown to the other players telling who was redirected and to which server
  • it is also announced that people can say /follow to follow this player to the server and they are redirected as well - both the announcements and the follow feature can be enabled or disabled by CVAR (redirect_follow)
  • the plugin is language aware (thus you need to place the redirect.txt in amxmodx/data/lang/)
  • the server can show whether someone who just connected was redirected to the server and from what server he is coming from
  • the own IP address is detected automatically and disabled in the server list - automatic detection does not work if you use DNS names in the SERVERFILE - in this case set the DNS address of the own server in redirect_external_address for the detection to work - detecting the own server is NECESSARY for the plugin to work correctly
  • with CVAR redirect_retry set to 1 the server can put people into a retry queue to be redirected back to the last server (e.g. when they were automatically redirected but only want to play on the server they connected to)
  • the server list can be loaded from an SQL database (beta only)
  • statistics about redirections can be written to a file and vault or to an SQL database (beta only)



Available Client Commands:
bold commands are only available in the current beta version.
  • say /server - show server redirection menu
  • say_team /server - show server redirection menu
  • pickserver - show server redirection menu
  • say /follow - follow the last redirected player to his server
  • say_team /follow - follow the last redirected player to his server
  • say /retry - redirect back as soon as the foregoing server has a free slot
  • say_team /retry - redirect back as soon as the foregoing server has a free slot
  • say /stopretry - stop retrying the foregoing server
  • say_team /stopretry - stop retrying the foregoing server
  • redirect_announce_now - announce server list immediately, requires ADMIN_KICK access
  • redirect_user - <playername|playerid> [servernum] - redirect a player [to a given server], requires ADMIN_KICK access
  • redirect_queue - show the current redirection queue, requires ADMIN_KICK access
  • redirect_stats - show statistics about redirections, requires ADMIN_KICK access, only available if SQL is not used



Server List File:

The file is in ini format. The section name is the server name. The keys here are used to set server properties and override general CVAR settings, e.g. you can have manual redirect (the menu) enabled but still disable it for a single server by setting nomanual=1 for that server in the server list file.
The following keys are recognized:
(bold keys are only available in the current beta version)
  • id = the ID of the server (used for unique identification in statistics or to show where a player was redirected from) - setting it makes it possible to have different orders of servers in every serverlist.ini on every server
  • address = server address (can be IP or DNS name)
  • localaddress = the server address the server has on it's local network - only neccessary to be specified, when players also can connect to the server from a local network
  • port = server port - a value between 1025 and 65536, default 27015
  • cmdbackup = defines how often the UDP request is resent to the server (with redirect_check_method > 0), default 2
  • noauto = 1 disables automatic redirection to that server regardless of what redirect_auto is set to, 0 means controlled by redirect_auto default is 0
  • nomanual = 1 disables manual redirection to that server regardless of what redirect_manual is set to, 0 means controlled by redirect_manual default is 0
  • nodisplay = if this is set to 1 it will hide the server from the /server list and announcements, default 0
  • adminslots = if this is set to 1 the plugin will redirect only people with reserved slot there if it's e.g. 12/13 players on the target server, default 0
  • password = the password that is needed to connect to the server, default <none>
  • publicpassword = if set to 1, all players can connect to passworded servers, when set to 0 only admins, default 0
  • private = if set to 0 the server is not private, setting it to "hide" (without quotes!) will hide the server only for non-admins from the menu and announcements (like nodisplay=1, which also affects admins), setting it to "fullhide" (without quotes!) is like "hide" but also doesn't display the "X was redirected to Y" message when an admin redirects himself there, default 0
  • category = setting this will assign the server to the category with the given name, e.g. "Aim map servers", set the category without quotes, default is no category assignment

If a value is not specified the default value is used. The "address" key always must be specified and doesn't have a default value

The file name by default is serverlist.ini, this can be changed by modifying the define SERVERLIST in the plugin source and then recompiling the plugin.

Here is an example on how the server file could look:

serverlist.ini
Code:
[my example server]
address=example.n-ice.org
port=27015
cmdbackup=5
noauto=1
nomanual=1
nodisplay=0

[my 2nd example server]
address=example2.n-ice.org
port=27015
All servers must have the same SERVERFILE. That means that if you got Server A and Server B, Server A must have Server A and Server B in the list. So a server always has to have itself in its list. Otherwise the plugin won't work correctly. The plugin is not stupid - it will make sure people cannot redirect to the same server again, don't worry about that. It will list the server as deactivated.
Also several parts in the plugin rely on the fact that all servers have the same number (thus, the same order in serverlist.ini file).
Beside the technical limitations you make it easy for the user to get a feeling for your servers if you always provide him the same list, no matter on which server he is. If the list would miss the current server or even the order would be different on every server you would just confuse your users.
However, if you still want to have a different order of servers in every serverlist.ini you need to set the "id" attribute in the server list (currently only available in beta).

Please be aware that when using more than 6 servers in SERVERFILE you have to change the define MAX_SERVERFORWARDS and recompile the plugin. If there are more servers in the file than specified by MAX_SERVERFORWARDS the other servers will be ignored.

There is no need to add nomanual=1, noauto=1 or the like to the server that is the server the plugin is running on. The plugin will detect that itself and prevent people from being redirected back to the same server.

Hint: if you don't want to create the server list by hand you can use xServerList to create your server list file (or load and edit an existing list). You can as well use it to check an existing file for errors.



Languages:
Many thanks to all translators! If you like a translation, why not give karma to the translator if he is listed with his account?

You can translate something that is not listed here or finish an incomplete language? Then please go to this thread.



Available CVAR's:

These CVAR's have to be set in the server's amxx.cfg. Only setting them via console (direct, ssh, rcon, hlsw...) is problematic for some of them.
When discussing errors please always post the part of your amxx.cfg that is setting these CVAR's (those beginning with "redirect_").

CVAR List

Don't want to read a full documentation and then configure everything by hand with a text editor and watch dependencies between CVARs?
For easy graphical CVAR configuration just open this file:
xREDIRECT.xconf
(you need to have xVarConfig installed for this to work)


Requirements:
  • Metamod v1.18
  • HLDS v3.1.1.1
  • AMXX v1.70 (v1.80 for beta)

Basically the plugin is intended to work with
- every HL1 mod (steam and nosteam versions)
- the currently latest and last before latest AMXX version

It has been seen working with CS 1.5 (WON2), CS 1.6, Condition Zero, Natural Selection, Day of Defeat and Team Fortress Classic. It should also work with HLTV.



Modules:

The plugin requires the sockets module to be loaded. You can enable it in your modules.ini.
If you don't want to load it search for the line containing require_module("sockets") and comment it out or delete it. When doing this you can only use redirect_check_method 0. If you set this to something different your server might crash or other problems arise.



Troubleshooting:

If you have problems with plugin functionality please first check whether your problem/question is already explained in the FAQ.
If it is not, you can ask your questions here in this thread. I don't check my PMs regularly, even when I am always notified of them. You probably just increase your waiting time if you use a PM instead of asking in this thread. Furthermore you'd just throw away your chances that someone else helps you, who can do this just as good as me.

In almost all cases people that try to help you need this information:
  • game mod
  • xREDIRECT version
  • AMXX version
  • all CVARs from xredirect (so all starting with redirect_, usually in your amxx.cfg) from one of the servers
  • the contents of your serverlist.ini file
Providing this information along with your question/problem will reduce the time until someone can help you. If information is missing, you will most probably just end up with someone stating he can't help you without this information, asking you to tell it.



Issue tracker:

Bugs and features are tracked with Mantis. The Mantis project for xREDIRECT can be found here. Everyone can read tasks there, but if you want to create one you need to register and/or login first.



Beta and Stable Differences:

For the beta version I just programmed the new features or bug fixes and gave everything a short test on my server and see whether the new features work/the bugs are fixed and check that the server does not crash. Right after that I release it here.
When a beta version is around for a while and seems to be stable for some longer time and some more people it will become a stable version and replace the last stable. There might be several beta versions before a new version is put into stable.
So beta version has the freshest features but the highest risk to contain bugs. The decision what version you want to use is up to you.



Thanks To:
Thanks to these people for patiently testing the plugin even through heavy server crashes:
Also I'd like to thank Mordekay who appeared here first in September 2006 and since then has been helping people who had issues with the plugin.



Final Note:

We plugin coders invest time, nerves and knowledge to make the best plugins we can. I try to help with any issue you might have with it. We provide the source code so people can learn from it to make more cool plugins useful for you as well.
We do all this for you (and for us). AND: we do all this for free.

So please be so kind and do the only thing I want from you:
If you like the plugin, post here that you have it running on your server and you like it. Rate the thread to whatever rate you think it deserves.
Don't just silently download the plugin and forget anything else as soon as it is running. Don't only post here if something isn't working or you have trouble installing it but as well when everything works fine.
If I don't get enough positive feedback I might start to think people don't like the plugin or noone wants it and stop developing it.

This is valid for EVERY plugin coder and EVERY plugin here. Not just me and my plugin.



Last Stable Changes:
- [000444] Rewrite socket code
- [000443] Servers not listed due to recent Half-Life 1 protocol update
- added workaround for "Server tried to send invalid command" issue, making redirection work again - thanks to joaquimandrade who had the idea
- fixed sockets not being cleaned up, causing network socket problems on some servers

Last Beta Changes:
v2.0 RC1:
- [000597] Empty lines in server list file are not skipped correctly
- [000362] Option to set whether to count bots or not
- [000379] Check mod/protocol version
- [000595] Follow announcement displayed in wrong language
- [000596] Error in protocol parsing for some remote game information
- [000594] Missing colors for menu entries of manually disabled servers
- [000447] Admins are automatically redirected to servers with noauto flag
- [000598] Close sockets when plugin execution ends (fixes socket errors some people had)
- [000351] New server list parameter "private"
- [000605] New command redirect_stats
- [000382] Redirection statistics
- [000604] Write statistics to a text file
- [000603] Write statistics to a vault using nVault
- [000602] Write statistics to MySQL database
- [000601] Timer and welcome message function run unnecessarily in some cases
- [000600] The current mod should be cached
- [000599] Server ID numbers
- [000446] SQL support for server list
- [000434] "adminslots" server option indicating the number of slots
- [000393] Target server information for automatic redirection
- [000386] Command redirect_queue that lists the current queue
- [000383] Menu by categories
- [000381] Announcements in chat area about feature availability
- [000606] Optimize string formatting
v2.0 RC2:
- 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


For a complete changelog look into the source code or at the bug tracker.



Installation:

Note that the .sma and the .inc file is only needed when you want to compile xREDIRECT or plugins using it in this amxx folder.
The files go into these directories (relative to your amxx directory):
  • xredirect.amxx --> /plugins
  • serverlist.ini --> /configs
  • redirect-language.zip --> /data/lang (read the readme file in the zip)
  • xredirect.sma/xredirect-beta.sma --> /scripting
  • xredirect.inc --> /scripting/include
  • xredirect.sql.txt --> (beta only) if using SQL: run this SQL script on your database

Current stable version: 1.0.3.3
Current beta version: 2.0RC2


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 ;


this thread is closed, please upen a new thread for your concern in the sub forum xREDIRECT.
however, update news will still be posted here. so if you want to be informed when new versions are released subscribe to this thread.

For easy graphical CVAR configuration open this file:
xREDIRECT.xconf
(you need to have xVarConfig installed for this to work)
Attached Files
File Type: inc xredirect.inc (321 Bytes, 57796 views)
File Type: sma Get Plugin or Get Source (xredirect.sma - 64329 views - 110.0 KB)
File Type: zip redirect-language.zip (48.9 KB, 38240 views)
File Type: txt xredirect.sql.txt (1.6 KB, 24405 views)
File Type: sma Get Plugin or Get Source (xredirect-beta.sma - 31914 views - 154.3 KB)

Last edited by xOR; 03-04-2018 at 09:43. Reason: updated URLs to new domain name
xOR is offline
Silver Dragon
Veteran Member
Join Date: Jan 2005
Location: Chicago, Illinois
Old 06-14-2006 , 21:14  
#2

Took the time to read it all, this plugin seems interesting especially when people can choose their server in which to redirect too.

+Karma
__________________

Silver Dragon is offline
Send a message via AIM to Silver Dragon Send a message via MSN to Silver Dragon Send a message via Yahoo to Silver Dragon
xOR
Veteran Member
Join Date: Jun 2006
Location: x-base.info
Old 06-14-2006 , 21:31  
#3

wow, now this was a fast answer

i just finished making the formatting a little bit better to make it more readable and your post was already there.
anyway, thanks for my first karma, really appreciate that
xOR is offline
xOR
Veteran Member
Join Date: Jun 2006
Location: x-base.info
Old 06-14-2006 , 21:43  
#4

well it's pretty late so...i forgot the screenshots.
added them now below the description section
xOR is offline
Brad
AMX Mod X Team Member
Join Date: Jun 2004
Old 06-14-2006 , 22:21  
#5

This looks nice.

It could also be used as a handy way for players to move between your servers without using the redirection bit. i.e. "hey i've had enough of assault, i'm going to the dust server. lemme just type /servers here... good now select dust... weee here i go!"

I'll approve this after a few days go by and after I see what comments others have.
__________________
Brad is offline
ZodiacMindwarp
Member
Join Date: Jul 2004
Location: Ventura, CA
Old 06-18-2006 , 03:28  
#6

Would like to use, very useful for our fleet of servers. Where can I get the download, it appears to be missing?

Z
__________________


RichNet.tv NS:COMBAT:SoCal[RNT]
12.191.247.153:27015
RichNet.tv NS:MvM:SoCal[RNT]
12.191.247.154:27015
RichNet.tv Quake III HeadHunters SoCal[RNT]
66.254.94.10:27960
ZodiacMindwarp is offline
Send a message via AIM to ZodiacMindwarp
Lt Llama
Senior Member
Join Date: Aug 2004
Old 06-18-2006 , 04:49  
#7

A serious and no bs plugin I have been looking for myself.
I hope you get the source up soon so we can test it.
I don't know if it would be very useful but maybe add an admin command to transfer a player to a selected server.

I love the /follow function.

+karma without a doubt
Lt Llama is offline
xOR
Veteran Member
Join Date: Jun 2006
Location: x-base.info
Old 06-18-2006 , 09:25  
#8

i really have no idea what happened to the attachment.
it was definately there and now it is gone. perhaps this has something to do with the downtime and server problems?
even worse, i can't attach the plugin anymore. when i try and click "add attachment" the page reloads but the attachment is still not there.

until i found out whether this is related to server problems or i am just too stupid ( ) i put a download link to my own server at the end.

thanks for all the positive posts already!
xOR is offline
xOR
Veteran Member
Join Date: Jun 2006
Location: x-base.info
Old 06-18-2006 , 14:46  
#9

added new languages now.
however, i am not sure about how amxx handles special characters. i know that in chat you can use special characters in NS, where in CS you can't. that's the reason why i included two versions of the language file, one with special characters and one without.

note that translators reported that in some languages it is quite difficult to live without these special characters and the translation could be bad while in other languages (like german) it works pretty good without them.

oh, and i am not sure about the language tags (such as [fi]) as well. please correct me if tags are wrong.

Last edited by xOR; 01-17-2010 at 08:33. Reason: Removed outdated mail address
xOR is offline
Multiply
Member
Join Date: Jun 2006
Location: Denmark
Old 06-18-2006 , 16:28  
#10

Hehe, GG with the translations

I've made this account instead of my old one, as i didnt like the old's nick

Great plugin!

+Karma
__________________
Wah?
Multiply is offline
Send a message via MSN to Multiply Send a message via Skype™ to Multiply
Closed Thread


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 02:01.


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