Is there such a thing as too much BZFlag?

BZTips #1 – Client Side Chat Filtering

by blast on 2009-02-22, 3 comments

Today I’m going to start a set “BZTips” postings. These will focus on some of the lesser known features of BZFlag. For this first posting, I will cover Client Side Chat Filtering.

Many servers have a chat filter set up to block profanity. But there are still quite a few that do not have such a filter. If you want to censor out profanity on those servers, there is a way built into the client to do this.

The method to accomplish this varies depending on the operating system, but it all involves passing -badwords to the BZFlag executable along with a path to the badwords file. Full directions provided in this article.

First of all, you need to get a list of swear words. I’d recommend getting the simpleSwearList.txt (Right click and save the file unless you want to learn new words…) from our SVN. For Windows users, I recommend you save this straight into the install directory for BZFlag (ex: C:\Program Files\BZFlag2.0.10\), and for OSX and Linux users, save it into your user or home directory, respectively. I typically delete everything except the English language words, since I don’t care about seeing profanity in languages I don’t know.

Now that you have the file saved, the general idea is to pass the following to the BZFlag executable:

-badwords /path/to/simpleSwearList.txt

Now for Windows, this is quite easy. Because you saved the file into the install directory, you don’t have to provide the path, since the ‘working directory’ is the installation path. So, right click on the shortcut you use to launch BZFlag, and then click on Properties. Go to the end of the Target line and add this:

-badwords simpleSwearList.txt

Make sure to include a space before the hyphen. Here is what it will look like:

For OSX, I’m not sure of an easy method, nor can I verify if this works. But you should be able to start the Terminal application, then drag your BZFlag icon into the terminal. This should automatically type out the path to your BZFlag .app file. After that, you can then try typing the same text that was used for Windows just above here:

-badwords simpleSwearList.txt

If that doesn’t work, then try typing the following, where “YourUsernameHere” is your username:

-badwords /Users/YourUsernameHere/simpleSwearList.txt

Advanced users could do something like an AppleScript or a shell script to do this automatically, but that goes beyond the scope of this article.

And for Linux, you can also do it via the Terminal, or you can edit the launcher for BZFlag. I will use Ubuntu 8.10 with Gnome as an example.

This assumes BZFlag was installed using the package manager. Go to System > Preferences > Main Menu.

From there, click on “Games” on the left, click on BZFlag, and then hit the Properties button. Edit the Command to look like it does in the screenshot (click for full sized image):

Linux Step 2 (Click for full size)

After that, click Close, and then Close again.

With all of that done, your client should filter out profanity, including text from private and team chat. The most common reason for this not working would be specifying the wrong path to your bad words file. Make sure you have it in the correct location, and worse case, use a full path to the file.

3 thoughts on “BZTips #1 – Client Side Chat Filtering

  1. It’s a well written article about this client-side badword filter – much more detailed than the BZFlagWiki one (except the MAC OSX part).

    I’m full of expectation regarding further client options, because beside the self-explaining ones like “team” or “callsign” it’s not clear what they are good for or how they work until you invest the time to try them out. :o)

  2. As mentioned above, the BZFlagWiki has an article related to this topic. The Wiki article’s description of doing this under OSX is pretty accurate — I don’t have much experience with the other OS’s.

    Note that dragging the BZFlag icon to the Terminal program in OSX won’t give the full path to the actual application, as the BZFlag icon actually represents a directory. So, for instance, in my case the path to the program is actually

    Also, it’s worth noting that all of the steps only need to be done once — the change is saved to the config file, and is will stay in effect until the config file itself is changed by commenting out the line that begins with “set filterFilename”.

Comments are closed.