Server Online Redirect

Server Online Redirect

Server Online Redirect

Download : Click Here 

 

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)
  • 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:
(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.

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.

CATEGORIES
TAGS
Share This

COMMENTS

Wordpress (0)
Disqus ( )