The database can be either external or internal. Since porting an external database would force some structure on the code, we have chosen to use a flat database at current level.
The database is implemented as a flat directory in which there is a file for each contact list stored.
The format of the stored contact list is very simple. Each file contains pairs of lines. The first line contains the contact's UIN and the second contains its nickname. Therefore it is very easy to access the database in the C code.
We are aware of the flaws of flat database and therefore the functions that handle the database in the server are designed so that replacing the flat database with a ``real'' database would require minimal changes of code.