Key Subsystems

While the architecture of the server is divided into the aforementioned four parts, there are a few "subsystems" which are necessary.


Options Parser

This is a two part system. One to parse the command-line arguments, and one to parse the configuration file. Options specified on the command line should have a higher precedence than those in the config file. Additionally, an alternate config file may be specified on the command line.

At the present, the popt library is used for command-line parsing.

The configuration file parsing is a three-phase process which bootstraps itself from a dark, dreary and empty server to one supporting multiple chat rooms, each of which can host one specific game:

The actual contents of the configuration files is discussed in the server administration documentation.


Login/User Database

The server will need to store a database of user ID, name, password and permission at the very least. This system must allow searching by name or ID, and allow for easy addition/deletion. GGZ can use libdb for this. A SQL database is possible too but probably not necessary for most installation. Both PostgreSQL and MySQL are supported at this point.


MOTD System

The message of the day is read at initialization time from a file pointed to by the MOTD configuration file option. The file can consist of up to 80 lines (this is configurable at build via MAX_MOTD_LINES).

The message of the day file can contain % specifiers which are replaced by the server before sending to the client. The following codes are supported:


Player Statistics

Since the game modules are dynamic, it makes sense to store the statistics on a per-game type basis, rather than on a per-user basis. Statistics are currently handled by ggzdmod, independent from ggzd. Several types will be supported eventually, some of them are already implemented, e.g. win/loss or ELO.


Module loading

Not written