QSmack works by logging into the server as a client, becoming an admin, doing frequent "status" checks of the other players, and kicking any players with banned names or colors, or from banned IP addresses. As a client, it can only communicate with the server by sending impulses. So, the server needs to have certain QuakeC modifications to handle the impulses produced by QSmack.
To simplify things, we can provide you with already-modified server code, which you can use as-is or modify further to suit your needs. There are currently these choices:
- C9 Mothership <aa_sm.zip>: This is basically the same servercode that we run on the Mothership servers; you can get a description of it in the "configuration" section of our server page. It is kind of an old mod (ServerModules 1.9.6), but it does exactly what we want & is super-stable. At a minimum, you will need to change the message of the day in _motd.qc, and in weapons.qc replace the strings "PASSWORD IMPULSE 1", "PASSWORD IMPULSE 2", "PASSWORD IMPULSE 3", "PASSWORD IMPULSE 4", and "PASSWORD IMPULSE 5" with the five actual impulse numbers (not used elsewhere) that make up your QSmack password. Then of course you can also do other stuff, like reconfiguring the various modules if you want to. You will have to leave the "init" module enabled for our current method of auto-obtaining admin privileges to work correctly.
- ServerModules 3.3.12 <aasm3312.zip>: This is a more recent version of ServerModules, version 3.3.12. It does not include any of our personal "Mothership hacks"; it is simply the ServerModules 3.3.12 distribution with QSmack changes and without progs.dat (since you're going to have to compile one of your own anyway). You need to edit defs.qc and make the definitions of AUTO_PASSWD_0, AUTO_PASSWD_1, and etc. correspond to your five-impulse password. One other change is that we moved the "help-ctf" impulse from 220 to 240 to avoid a conflict with one of our default impulses, but that should be completely transparent to all users since they will be using the "help-ctf" alias rather than directly employing the impulse. As with the previous mod, you can fiddle with the configuration all you like, but you need to leave the "init" module enabled.
- Latest ClanRing I highly recommend that for the ClanRing code, you use the latest version available from the CRMod site. But if for some reason you need to use an earlier version instead, two possibilities are below:
- ClanRing 2.49 <aa_cr249.zip>: This is the code for the ClanRing server v2.49, modified only by adding QSmack support. You will need to do all the usual ClanRing configuration, plus specify the five password impulses in settings.qc (it will be obvious where).
- ClanRing 2.58beta <aa_cr258.zip>: Same as above, but for ClanRing server version 2.58 beta.
- Latest ClanRing CTF Ditto for CRCTF, get the latest. Actually the latest latest is something of a chore to find, but you can get a pretty recent version from the CRMod downloads page. If you'd rather use an earlier version for some reason, try this next one:
- ClanRing CTF 2.7 <crctf27.zip>: ClanRing CTF has QSmack support included. How cool is that? If you were using QSmack with an earlier version, you should upgrade to this one.
- Threewave CTF 4.2 <aa_ctf42.zip>: The Threewave CTF v4.2 normal Quake codebase (i.e. the stuff in the "src" directory), modified for QSmack support. This is only the QuakeC; you still need the rest of the Threewave server distribution. The QSmack password impulse definitions ("AUTO_PASSWD_0", "AUTO_PASSWD_1", etc.) are in defs.qc, and you must set these to your password before compiling the code. The admin function impulse definitions (for kicking, changing levels, etc.) have also been moved from admin.qc to defs.qc for various reasons, if you want to change those.
Note: If you want to have admin privileges as a player on your CTF 4.2 server, we recommend that you leave the original CTF admin password disabled (i.e. leave "ADMIN_PWD_1", "ADMIN_PWD_2", and "ADMIN_PWD_3" in admin.qc all set to -1) and instead use the QSmack password yourself. We describe how to do that in the QSmack FAQ. The reason for this recommendation is that the QSmack admin password is much more secure than the CTF password (something else that we also discuss in the FAQ).
- CTF 4.2v <aactf42v.zip>: Vader FLAG's adaptation of Threewave CTF 4.2, with QSmack support added. See the Threewave comments above, since they apply to this package as well. As with Threewave CTF 4.2, this download is only the QuakeC files, not the rest of the package (instructions, entity files, etc.).
- CTF EPS 1.0 <aactfe10.zip>: The Quake server source for the CTF Expansion Project v1.0, with QSmack support added. Yet another Threewave CTF 4.2 variant. Again, this is only the replacement QuakeC, not the entire CTF EPS distribution.
Even if you choose to use one of these pre-modified sets of server code, you should probably read the description of server code changes to see exactly how the code was modified. If you want to make the modifications yourself, for example to some other sort of server code besides those above, you definitely need to read that description. It covers what impulses are used by QSmack & how the server should respond to them, and it includes as an example the modifications made in the ClanRing v2.58 code.
If you want QSmack support added to a particular server code package, it wouldn't hurt to drop lemurboy a line to see if he's willing to handle it for you. The more popular/stable/well-written/etc. the package in question, the more likely it is you'll get him to do your work for you. :-)
If you plan on modifying some other server code, we still recommend that you first get QSmack working with one of the above sets of code before you try anything else.