In BZTip #3 – Commands for admins – Part 1, we covered the first section of commands that admins or cops typically use on a daily basis. In part 2, we will cover the various ban commands that are available. In BZFlag, there is three different types of bans: IP bans, host bans, and ID bans. Each type has their own set of commands. When a banned user tries to join, they should see the fact that they are banned, the reason they are banned, and who banned them.
Please review Part 1 for information on the /playerlist command. This command comes in very handy for issuing bans as it shows the IP address and hostname of every user on the server.
Every type of ban needs to have a ban duration set. The supported units of time are years (y), weeks (w), days (d), and minutes (m). Contrary to somewhat popular belief, the ‘m’ unit is not months. You can string these together like 1w2d30m to get 1 week, 2 days, 30 minutes. Or you can just specify one type, such as 2w. If you donâ€™t provide any units and just give a number, it defaults to minutes. You can also specify “short” or “default” to use the poll ban length, which defaults to 5 hours. Providing 0, “max” or “forever” will set it to a permanent ban.
NOTE: If you only have the “shortban” permission instead of the “ban” permission, the longest duration you can ban for is the “short” poll ban length. It will automatically limit the setting. Cops commonly are limited to this duration, while admins can typically ban for any duration.
The ban command is typically used after a user has been verbally warned and then kicked. It will prevent them from rejoining. You can specify a callsign (with quotes if they have spaces in their name), or an IP address. Banning by callsign will only work if they are still on the server.
NOTE: If a user is globally identified (they have a plus sign by their name), banning by callsign will ban their IP address AND their BZID. If you unban them later, removing the IP ban will not remove their ID ban. You will have to use /idunban to remove their ID ban. The ID ban commands will be discussed later in the article.
In addition to the name, you will also have to pass the ban duration. Examples:
/ban Argooon 1w Teamkilling is not allowed. You have been warned repeatedly.
/ban 188.8.131.52 30m Please try to be respectful to other players next time you are here.
There are also times when a player will rejoin with a different, but similar IP address. This is an issue with dynamic IP addresses. An Internet Service Provider (ISP) will rarely give each user their own dedicated (aka “static”) IP address. When their modem connects, they get an address from a pool of available addresses. This can cover a huge range of addresses in some cases, which may require you to ban a range if things get bad enough.
You can use an asterisk (*) as a wildcard to ban a range of addresses. Example:
/ban 206.222.24.* 2w Cheater (god mode)
/ban 206.222.*.* 1d Teamkilling is not allowed.
The asterisk would match any value in that spot. Range bans have a higher possibility of banning innocent players, as you are banning a portion of an ISP. You also have less control than with a hostban, so you might ban several ISPs instead of just one. A host ban (discussed later) can be used to more accurately target a specific ISP or a specific part of an ISP.
The banlist command will list all active IP bans. This will include most (if not all) of the bans from the masterban list. Bans from the masterban list will display “(m)” after the banned address. For each ban, it will list the IP that is banned, duration remaining, reason, and the one who created the ban.
Here is an example of what a masterban would look like. Notice the (m) after the IP address:
[SERVER->] 127.0.0.1 (m) banned by: bzflag developers [SERVER->] reason: web service abuse
And here is an example of a regular ban that was created by an admin or cop on the server. Notice that it shows a duration in this example. If the ban was permement (duration set to 0, “forever”, or “max”) it would not show the number of minutes left:
[SERVER->] 184.108.40.206 (256.1 minutes) banned by: blast [SERVER->] reason: Please try to be respectful to other players next time you are here.
A ban list can get quite long. It is possible to pass a filter to the /banlist command that will search for a specific word or phrase. For example, let’s say you wanted to only show bans that were for cheating. You could run this:
You can also specify the name of who created the ban to find all the bans from that admin/cop.
The unban command can only remove IP bans. You can use the /banlist command to get the exact address or range that was banned, and then use that to unban. Example:
Or to unban a range:
It must match what was banned exactly.
You can use this command to check if an IP address is banned. This only checks IP bans, so even if it says that an IP is not banned, there still might be a host ban or an ID ban preventing a player from joining. Examples:
[SERVER->] 127.0.0.1 is not banned.
[SERVER->] 220.127.116.11 is banned: [SERVER->] 18.104.22.168 (256.1 minutes) banned by: blast [SERVER->] reason: Please try to be respectful to other players next time you are here.
The hostban command is used to ban someone’s hostname. An example of a hostname would be dsl-127.0.0.1.ca.comcast.net (but of course, this one is not real). Most players will have a hostname. You can use this to more accurately ban a specific ISP or part of an ISP. Here are some examples:
/hostban *.yomomma.com 2w Yo momma so stupid, she got banned from my server.
/hostban *.porteighty.org 1d Repeated teamkilling and rejoining. Contact blast if you are caught in this ban.
NOTE: At least in BZFlag 2.0.x, there is a bug where a player might not get the rejected message if they are host banned. Instead, when they try to connect, it will just hang during the join process and never show them the ban reason. Because of this, it is recommended that you don’t use hostbans unless you have to (at least until BZFlag 3.0.0).
This is the same as /banlist, but it will show host bans. As well, you can pass filters to this command the same way. Example:
[SERVER->] *.porteighty.org (800.5 minutes) banned by: blast [SERVER->] reason: Repeated teamkilling and rejoining. Contact blast if you are caught in this ban.
This works the same as /unban, for only works for host bans. Example:
The idlist command will show the global ID for every user online. You can use this for banning a specific globally registered user. Example of the output:
[SERVER->] Argooon : 99999
This command is not used as often. When you do an IP ban by callsign, it automatically adds an ID ban as well. Also, an ID ban only blocks a single account, so a user can either switch to a different account, or just use an unregistered name. ID bans are more useful on servers that require a registered account to spawn or talk.
Anyway, you will typically use this command when the user is still online:
/idban Argooon 2w Repeated teamkilling after several warnings.
You can also ban a BZID after they have already left. You could have obtained this from /idlist or the server log files. Let’s say someone’s BZID is 12345678. You just have to include a plus (+) sign before the number to indicate you are banning a BZID instead of a callsign.
/idban +12345678 1d Spamming
This will list any current ID bans that are active. You can, like /banlist and /hostbanlist, filter out the list however you want by passing words after the command. Example output:
[SERVER->] 99999 (7041.0 minutes) banned by: blast [SERVER->] reason: (Argooon) Repeated teamkilling after several warnings. [SERVER->] 12345678 (1439.0 minutes) banned by: blast [SERVER->] reason: Spamming
Notice that for the second ban, it doesn’t show a callsign in the ban reason. This is because we banned by a raw BZID instead of a callsign. We could have manually placed the name in our ban reason if this is needed.
To remove an ID ban, you use the idunban command. Just provide the BZID of the user you want to unban. Examples:
I hope all of this information was helpful. I will have a “Part 3” of this topic at a later time that covers some other commonly used commands.