Quake 3 Rcon (detailed)
(4289 total words in this text) (36599 reads) 
By Fia
This guide uses the following syntax
conventions to describe Quake III Arena commands:
|
Angle brackets (<>)
indicate that the enclosed parameter(s) must be replaced with specific
information. Omit the brackets when you enter the command. |
| [optional] |
Square brackets ([])
indicate that the enclosed parameter(s) are optional. Omit the brackets when
you enter the command. |
| | |
A vertical bar (|)
indicates an either/or choice. |
Input to
the console is represented by bold code style text and
console output is represented by plain code style text. Quake
III Arena variables are represented by italic style text. All console
command lines must begin with a slash (/) or backslash () character. |
For a list of Quake III Arena variables and console commands, visit
Commander Keen's Quake III Arena Console
Page.
Rcon Basics
| rcon [rcon_password]
|
The rcon command lets
you send console commands to a remote server and receive console responses
from that server. The remote server is either the server you are connected
to as a player, or can be specified by setting the rconAddress
variable to the server's IP address. The rcon_password parameter is optional
only if the rconPassword variable has been set. |
| set
|
The set command lets
you change the variable specified by variable_name to the value specified by
new_value. If new_value is a string which contains spaces, you must quote
the string with double-quotes (for example, /set g_motd "Get the
New Threewave Maps"). To get the current value of a variable,
simply enter variable's name on the command line (for example, /g_motd). |
| seta |
The seta command works just like the
set command except that seta tells Quake III Arena to change the set command
for variable_name in the q3config.cfg file. |
|
rconpassword |
The rconpassword
variable holds the password for remote console control of a server. On
a server, the value of rconpassword is the server's rcon
password. On a client, the value of rconpassword is the password
sent to the server to allow remote console control. |
| rconaddress |
The rconaddress
variable holds the IP address (and optional port number if the port
number isn't the default port number, 27960) of the server you are sending
console commands to. |
The normal way to use the rcon command is:
]/rcon [rcon_password]
Where rcon_password matches the server's rconpassword variable and
console_command is the console command you want to send to the server.
If you're going to be sending lots of commands to a server, you can set your
local rconpassword variable to match the server's rconpassword variable. This
makes it so that you do not have to enter the rcon password on every rcon
command line. For example (assuming your rcon password is MyRconPW), after
using:
]/set rconpassword MyRconPW
you can then omit the rcon_password parameter and use:
]/rcon
Throughout the rest of this guide, the rcon_password parameter will be
omitted (it will be assumed you set the rconpassword variable).
What if you need to use rcon on your server, but the server is full (including
all private player slots)? You can use rcon on a server without joining the game
by setting your local rconaddress variable. For example:
]/set rconaddress 17.201.23.155:27960
sets rconaddress to 17.201.23.155:27960 and then:
]/rcon
will send commands to the server at that address.
Getting a Server's Status
| status |
The status command lets
you get the status of a server. This command can be entered at the server's
console, or can be sent to the server via rcon. |
The most common command you'll send with
rcon is the status command. The rcon status command and response will look
something like this:
]/rcon status
| map:
somemap |
|
num |
score |
ping |
name |
lastmsg |
address |
qport |
rate |
| 0 |
2 |
218 |
name with spaces |
0 |
xxx.xxx.xxx.xxx:27960 |
39882 |
4000 |
| 1 |
6 |
117 |
bandwidthpig |
50 |
xxx.xxx.xxx.xxx:27960 |
35752 |
25000 |
| 2 |
4 |
146 |
AnOtHeRpLaYeR |
50 |
xxx.xxx.xxx.xxx:27960 |
18657 |
3000 |
| 3 |
7 |
62 |
^1c00l^2color^3name |
50 |
xxx.xxx.xxx.xxx:27960 |
14616 |
5000 |
The response displays the current map, and each player's slot number, their
score, their last ping, their name, the time since the last message the server
received from them, their IP address, their qport (it is possible to have
multiple clients from a single IP address, so they are differentiated by qport),
and their rate setting (speed of data transfer).
What can you do with this information? The most common use is to get a
disruptive player's slot number, name or IP address for kicking or banning.
However, by looking at the ping and rate settings, you may be able to help
players who complain of lag problems. For example, if a player's ping is high
and so is their rate (for example, the player in slot 1), they may be on a slow
connection with their "Network: Data rate" set to a high speed connection.
Inversely, if a player's rate is too low for their connection (for example, the
player in slot 2 might be on something faster than a 33K modem), they may be
artificially raising their ping.
Kicking Players
| kick |
The kick command kicks
the player with the specified name off the server. If nobody is using the
name "all" and "all" is specified as player_name, then all players are
kicked. If there are no bots with the name "allbots" and "allbots" is
specified as player_name, then all of the bots are kicked. |
| clientkick |
The clientkick command
kicks a client by slot number. Used in conjunction with status, you can kick
players by their slot number regardless of player name. |
A couple of commands you might want to send to your Quake III Arena server
are the kick and clientkick commands. The kick and clientkick commands do what
you'd think -- they kick a player off the server. If you already know a player's
name, you can kick them off the server with:
]/rcon kick
As mentioned above, you can also use the special player names "all" to kick all
players and "allbots" to kick all bots if those names are not in use as a player
or bot name.
Sometimes it's hard or impossible to get a player's name right because they have
a name that's not visible or difficult to enter. In those cases, you can kick by
player slot number using the clientkick command. The way to get the player slot
number is with the status command. For example:
]/rcon status
| map:
somemap |
|
num |
score |
ping |
name |
lastmsg |
address |
qport |
rate |
| 0 |
2 |
218 |
name with spaces |
0 |
xxx.xxx.xxx.xxx:27960 |
39882 |
4000 |
| 1 |
6 |
117 |
bandwidthpig |
50 |
xxx.xxx.xxx.xxx:27960 |
35752 |
25000 |
| 2 |
4 |
146 |
AnOtHeRpLaYeR |
50 |
xxx.xxx.xxx.xxx:27960 |
18657 |
3000 |
| 3 |
7 |
62 |
^1c00l^2color^3name |
50 |
xxx.xxx.xxx.xxx:27960 |
14616 |
5000 |
The slot number for each player is in the "num" column. With that player slot
number, you can then kick the client by number with the clientkick command. For
example, to kick that player with no visible name (" ^1 "), you would use:
]/rcon clientkick 3
Banning Players
Quake III Arena Common Remote Console
| addIP |
The addIP command adds
a single IP or IP mask to the banned list stored in the g_banIPs
variable. |
| removeIP |
The removeIP command
removes a single IP or IP mask from the banned list stored in the
g_banIPs variable. |
| g_banIPs |
The g_banIPs
variable contains the list of the server's currently banned IP addresses. |
| g_filterBan |
The g_filterBan
variable contains a Boolean value (0 or 1) which specifies if filter banning
is off or on. Set g_filterBan to 0 to turn IP banning off; set
g_filterBan to 1 to turn IP banning on. |
OK, it happens to all administrators eventually, someone is disrupting game play on your server and won't stop connecting to your game server. You've asked them nicely to stay off, you've kicked them numerous times, and you're at the point of desperation. Don't get frustrated, use the power given to you and ban them from your server.
The first step is to turn on filter banning and we do that by setting the g_filterBan variable to 1 with the seta command:
]/rcon seta g_filterBan 1
Now that we've turned on filter banning, let's add that troublesome player. First, we'll get the player's IP address with the status command:
]/rcon status
| map:
somemap |
| num |
score |
ping |
name |
lastmsg |
address |
qport |
rate |
| 0 |
2 |
218 |
Grunt |
0 |
bot |
39882 |
4000 |
| 1 |
6 |
117 |
BadGuy |
50 |
312.27.48.132:27960 |
35752 |
25000 |
(Note that BadGuy's IP is a fictitious IP -- here is no such thing as an IP
number higher than 255. We will be using it as the example IP to ban.)
Here is how we add BadGuy's IP to our list of IPs to ban:
]/rcon addIP 312.27.48.132
So what do we do if BadGuy's IP is a dynamic (changing) IP? This is were you
must do a little investigator work. The goal here is to ban the least number of
IP addresses possible (to allow for innocent players to connect). To do this you
will have to start collecting the IP addresses that BadGuy connects with. The
list you come up with may look similar to this:
312.27.48.120
312.27.48.38
312.27.32.12
312.27.32.89
312.27.48.10
312.27.48.93
312.27.32.140
Notice what the numbers in common, they are: 312.27.48.xxx and 312.27.32.xxx ,
all IPs have one of these 2 prefixes. To ban a range of IPs to block BadGuy,
we'll pass IP_masks instead of IP_addresses to addIP with:
]/rcon addIP 312.27.48
]/rcon addIP 312.27.32
This will filter all IPs in the range of 312.27.48.0 through 312.27.48.255 and
312.27.32.0 through 312.27.32.255. Please note that Quake III Arena will add
them to your filter list as: 312.27.48.0 and 312.27.32.0 respectfully. The worse
case scenario would be to use:
]/rcon addIP 312.27
This would ban all players with an IP of 312.27.0.0 through 312.217.255.255.
However, we want to avoid this if possible because it bans over 65,000 player
IPs (255 x 255).
To view the list of current IPs banned in the server console, simply ask for the
value of the g_banIPs variable:
]/rcon g_banIPs
"g_banIPs" is:"312.27.48.0 312.27.32.0 " default:"^7"
Notice that there is a space after each entry (even the last entry) and that IP
ranges (called masks in IP speak) use a 0 to designate them (i.e., addIP
312.27.48 becomes 312.27.48.0). If you follow this pattern, you can maintain
your own list (in a config file or the q3config.cfg file that Quake III Arena
uses). Just don't forget the trailing space.
To remove an IP, you can use the removeIP command like this:
]/rcon removeIP 312.27.48.132
or this:
]/rcon removeIP 312.27.48
The second example will remove all IPs from 312.27.48.0 through 312.27.48.255,
not just the 312.27.48.0 entry. A quick way to remove ALL the IPs banned is
this:
]/rcon seta g_banIPs ""
This method completely wipes out all IP entries held in the q3config.cfg file.
I would like to mention at this point that banning a player is not the only
thing a server admin can do. For those truly deserving of further action, a
letter to their ISP can have the player's internet access suspended or
terminated.
Sending Messages to Players
| say |
The say command sends a
message from the console to all clients connected to the server. |
Let's say you need to send a message from the console to everyone connected
to the server. For example, when you want to tell a teammate on your server that
it's time to get ready for a match, the say command will let you do that. For
example:
]/rcon say "All dv8's get back to IRC for our match"
console: All dv8's get back to IRC for our match
Other Server Commands and Variables
You may use most other console commands or set any server variable with rcon
(i.e., /rcon timelimit 25, /rcon g_motd "clan match at 1400" or /rcon map
q3ctf1). Some console commands can only be made from the actual server console
and some variable changes require a map change or a server restart to take
affect. Again, for a list of Quake III Arena variables and console commands,
visit Commander Keen's Quake III Arena
Console Page.
Making Rcon Easy
Isn't it a hassle to fire up Quake III Arena and use it's clunky command line
interface every time you want to send a couple of rcon commands to your server?
There is an easier way: QxAdmin. QxAdmin is a Win32 program that lets you check
your server status, and send rcon commands. It launches quickly and presents an
easy to use interface for checking your server's status and sending rcon
commands to your server.
Acknowledgments
Many thanks to Dekard, Zxel, bodo, and Commander Keen. This guide borrows
heavily (sometimes, verbatim) from their work.
|