- German translation)
(Българска версия на плугина
- Bulgarian translation, thanks to BlooD/TiDe
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
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:
Available Client Commands:
- 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)
commands are only available in the current beta version.
Server List File:
- 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
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:
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:
[my example server]
[my 2nd example server]
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.
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.
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
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_").
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:
(you need to have xVarConfig
installed for this to work)
- Metamod v1.18
- HLDS v126.96.36.199
- 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.
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.
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.
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 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.
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:
Rewrite socket code
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:
Empty lines in server list file are not skipped correctly
Option to set whether to count bots or not
Check mod/protocol version
Follow announcement displayed in wrong language
Error in protocol parsing for some remote game information
Missing colors for menu entries of manually disabled servers
Admins are automatically redirected to servers with noauto flag
Close sockets when plugin execution ends (fixes socket errors some people had)
New server list parameter "private"
New command redirect_stats
Write statistics to a text file
Write statistics to a vault using nVault
Write statistics to MySQL database
Timer and welcome message function run unnecessarily in some cases
The current mod should be cached
Server ID numbers
SQL support for server list
"adminslots" server option indicating the number of slots
Target server information for automatic redirection
Command redirect_queue that lists the current queue
Menu by categories
Announcements in chat area about feature availability
Optimize string formatting
- 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
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):
Current stable version: 188.8.131.52
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:
- 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
this thread is closed, please upen a new thread for your concern in the sub forum xREDIRECT.
ALTER TABLE `xredirect_statistics` ADD `target_server_id` INT( 11 ) NULL ;
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:
(you need to have xVarConfig
installed for this to work)