# IRC Services Technical Reference Manual

## Appendix A. Source tree reference

Table of Contents

Directory or file name | Description | Section
--- | --- | ---
Makefile | Main control file for compilation. | 10-3
Makefile.inc | Basic compilation settings. Generated by `configure`. | 10-2
actions.c | Routines implementing common high-level actions. | 2-6-5
channels.c | Channel management routines. | 2-6-3
channels.h | Header file for `channels.c`. | 2-6-3
commands.c | Command lookup routines. | 2-10
commands.h | Header file for `commands.c`. | 2-10
compat.c | Compatibility functions. | 2-2-2
conffile.c | Routines for processing configuration files. | 2-3-2
conffile.h | Header file for `conffile.c`. | 2-3-2
config.h | Header file containing basic compilation settings. Generated by `configure`. | 2-2-1 10-2
configure | Script to analyze the system environment and set compilation options and program settings accordingly. | 10-2
cp-recursive | Script to copy directories recursively using `tar`. | 10-2
databases.c | Database module interface routines. | 2-9-2 6-2
databases.h | Header file for `databases.c`. | 2-9-2 6-2
defs.h | Basic constants and macros used by Services. | 2-2-1 2-3-2
encrypt.c | Encryption module interface routines. | 2-9-1
encrypt.h | Header file for `encrypt.c`. | 2-9-1
extern.h | `extern` declarations for core source files which do not have their own separate header files. | 2-2-1
hash.h | Macros for defining simple hash tables. | 2-2-5
ignore.c | Ignore list handling. | 2-5-4
init.c | Program initialization, reconfiguration, and cleanup code. | 2-3-1
install-script | Script to substitute for the `install` program. | 10-2
langstrs.h | Message name constants. Copied from `lang/langstrs.h`. | 10-3-3
language.c | Multilingual support routines. | 2-8
language.h | Header file for `language.c`. | 2-8
list-array.h | List/array utility macros. | 2-2-4
log.c | Routines for logging. | 2-4
log.h | Header file for `log.c`. | 2-4
main.c | `main()` routine. | 2-3
memory.c | `smalloc()` family of memory allocation utility functions, as well as memory misuse checking code. | 2-2-3
memory.h | Header file for `memory.c`. | 2-2-3
messages.c | Routines for handling and dispatching messages. | 2-5-3
messages.h | Header file for `messages.c`. | 2-5-3
misc.c | Miscellaneous utility routines. | 2-2-6
modes.c | User/channel mode utility routines. | 2-6-4
modes.h | Header file for `modes.c`. | 2-6-4
modules.c | Module subsystem. | 4
modules.h | Header file for `modules.c`. | 4
process.c | Message processing code. | 2-5-3
send.c | Routines for sending messages to the remote server. | 2-5-1 5-2
send.h | Header file for `send.c`. | 2-5-1
servers.c | Server management routines. | 2-6-1
servers.h | Header file for `servers.c`. | 2-6-1
services.h | Main header file for Services; provides common types and macros via several other header files. | 2-2-1
signals.c | Signal handling routines. | 2-3-4
sockets.c | Communication (socket) handling routines. | 3
sockets.h | Header file for `sockets.c`. | 3
timeout.c | Timeout routines. | 2-7
timeout.h | Header file for `timeout.c`. | 2-7
users.c | User (client) management routines. | 2-6-2
users.h | Header file for `users.c`. | 2-6-2
version.c | Version number macros and constants. Generated by `version.sh`. | 10-3-1
version.h | Header file for `version.c`. | —
version.sh | Generates `version.c`, containing version information. | 10-3-1
vsnprintf.c | Compatibility `snprintf()`/`vsnprintf()` functions. | 2-2-2
data/ | Contains data files to be installed with Services. | 10-4
data/Makefile | Controls the installation of data files. | 10-4
data/example-ircservices.conf | An example `ircservices.conf` configuration file. | 10-4
data/example-modules.conf | An example `modules.conf` configuration file. | 10-4
data/helpfiles/ | Contains sample data for use with HelpServ. | 10-4
data/helpfiles/help | A sample help file for HelpServ. | —
lang/ | Contains files related to multilingual support. | 2-8-4 10-3-3
lang/Makefile | Controls the generation and installation of precompiled language files. | 10-3-3
lang/de.l | German language source file. | 2-8-4
lang/en_us.l | English (US) language source file. | 2-8-4
lang/es.l | Spanish language source file. | 2-8-4
lang/fr.l | French language source file. | 2-8-4
lang/hu.l | Hungarian language source file. | 2-8-4
lang/index | List of message names. Generated from `en_us.l`. | 2-8-4 10-3-3
lang/ja_euc.l | Japanese (EUC) language source file. | 2-8-4
lang/ja_sjis.l | Japanese (Shift-JIS) language source file (generated from `ja_euc.l` with `jconv.pl`). | 2-8-4
lang/jconv.pl | Converts files between Japanese character encoding systems. | 10-3-3
lang/langcomp.c | Language file precompiler. | 2-8-4 10-3-3
lang/langstrs.h | Message name constants. Generated from `index`. | 2-8-4 10-3-3
lang/nl.l | Dutch language source file. | 2-8-4
lang/ru.l | Russian language source file. | 2-8-4
lang/tr.l | Turkish language source file. | 2-8-4
modules/ | Contains all module source files. | ---
modules/Makefile | Controls overall module compilation. | 10-3-2
modules/Makerules | Controls compilation of individual modules. | 10-3-2
modules/chanserv/ | Contains modules for the ChanServ pseudoclient. | 7-4
modules/chanserv/Makefile | Controls compilation of ChanServ modules. | 10-3-2
modules/chanserv/access.c | Core ChanServ routines for handling channel access lists. | 7-4-2-1
modules/chanserv/access.h | Header file for `access.c`. | 7-4-2-1
modules/chanserv/access-levels.c | Module for channel access list manipulation via `ACCESS` and `LEVELS`. | 7-4-2-2
modules/chanserv/access-xop.c | Module for channel access list manipulation via the `XOP` commands. | 7-4-2-3
modules/chanserv/chanserv.h | Header file for exported ChanServ structures and declarations. | 7-4-1-1
modules/chanserv/check.c | Routines for checking and modifying channel status. | 7-4-1-3
modules/chanserv/cs-local.h | Header file for structures and declarations internal to ChanServ. | 7-4-1-1
modules/chanserv/main.c | Core ChanServ functionality. | 7-4-1-2
modules/chanserv/set.c | ChanServ `SET` command handler. | 7-4-1-4
modules/chanserv/util.c | ChanServ utility routines. | 7-4-1-5
modules/database/ | Contains database modules. | 6-3
modules/database/Makefile | Controls compilation of database modules. | 10-3-2
modules/database/extsyms.c | Code for accessing external symbols, used by the `database/version4` module. | 6-5-2
modules/database/extsyms.h | Header file for `extsyms.c`. | 6-5-2
modules/database/fileutil.c | Utility routines for reading and writing database files. | 6-5-1 9-2-2
modules/database/fileutil.h | Header file for `fileutil.c`. | 6-5-1
modules/database/standard.c | Standard database module. | 6-4-1
modules/database/version4.c | Database module compatible with data files from Services 4.x and 5.0. | 6-4-2
modules/encryption/ | Contains encryption modules. | 8-1
modules/encryption/Makefile | Controls compilation of encryption modules. | 10-3-2
modules/encryption/md5.c | Encryption module using the MD5 hash algorithm. | 8-1-1
modules/encryption/unix-crypt.c | Encryption module using the system `crypt()` function. | 8-1-2
modules/httpd/ | Contains HTTP server modules. | 8-2
modules/httpd/Makefile | Controls compilation of HTTP server modules. | 10-3-2
modules/httpd/auth-ip.c | Authorization module for checking client IP addresses. | 8-2-4
modules/httpd/auth-password.c | Authorization module for requiring a username and password. | 8-2-5
modules/httpd/dbaccess.c | Resource module for displaying data from Services' databases. | 8-2-8
modules/httpd/debug.c | Resource module for debugging. | 8-2-9
modules/httpd/http.h | Common header file for HTTP server modules. | 8-2-1
modules/httpd/main.c | HTTP server core module. | 8-2-3
modules/httpd/redirect.c | Resource module providing redirects to URLs defined for registered nicknames and channels. | 8-2-7
modules/httpd/top-page.c | Resource module providing a default page at the server root. | 8-2-6
modules/httpd/util.c | Utility routines used by HTTP server modules. | 8-2-2
modules/mail/ | Contains mail-sending modules. | 8-3
modules/mail/Makefile | Controls compilation of mail-sending modules. | 10-3-2
modules/mail/mail.h | Exported declarations for mail-sending functionality. | 8-3-1
modules/mail/mail-local.h | Internal declarations used by mail-sending modules. | 8-3-1
modules/mail/main.c | Core mail-sending functionality. | 8-3-1
modules/mail/sendmail.c | Submodule for sending mail via the system `sendmail` command. | 8-3-2
modules/mail/smtp.c | Submodule for sending mail via the SMTP protocol. | 8-3-3
modules/memoserv/ | Contains modules for the MemoServ pseudoclient. | 7-5
modules/memoserv/Makefile | Controls compilation of MemoServ modules. | 10-3-2
modules/memoserv/forward.c | Module implementing memo forwarding. | 7-5-3
modules/memoserv/ignore.c | Module implementing memo access lists. | 7-5-2
modules/memoserv/main.c | Core MemoServ functionality. | 7-5-1-2
modules/memoserv/memoserv.h | Header for MemoServ structures and exports. | 7-5-1-1
modules/misc/ | Contains miscellaneous modules. | 7-7 8-4
modules/misc/Makefile | Controls compilation of miscellaneous modules. | 10-3-2
modules/misc/devnull.c | Module implementing the DevNull pseudoclient. | 7-7-1
modules/misc/helpserv.c | Module implementing the HelpServ pseudoclient. | 7-7-1
modules/misc/xml.h | Internal header for XML import/export modules. | 8-4-1
modules/misc/xml-export.c | Module for exporting pseudoclient databases to an XML file. | 8-4-1
modules/misc/xml-import.c | Module for importing XML data into pseudoclient databases. | 8-4-2
modules/nickserv/ | Contains modules for the NickServ pseudoclient. | 7-3
modules/nickserv/Makefile | Controls compilation of NickServ modules. | 10-3-2
modules/nickserv/access.c | Module for handling nickname access lists. | 7-3-2
modules/nickserv/autojoin.c | Module for handling nickname auto-join lists. | 7-3-3
modules/nickserv/collide.c | Nickname colliding routines. | 7-3-1-5
modules/nickserv/link.c | Module for managing nickname groups (nickname linking and unlinking). | 7-3-4
modules/nickserv/mail-auth.c | Mail-based nickname authentication module. | 7-3-5
modules/nickserv/main.c | Core NickServ functionality. | 7-3-1-2
modules/nickserv/nickserv.h | Header file for NickServ structures and exports. | 7-3-1-1
modules/nickserv/ns-local.h | Header file for internal NickServ routine declarations. | 7-3-1
modules/nickserv/set.c | Handlers for the NickServ `SET` and `UNSET` commands. | 7-3-1-3
modules/nickserv/util.c | NickServ utility routines. | 7-3-1-4
modules/operserv/ | Contains modules for the OperServ pseudoclient. | 7-2
modules/operserv/Makefile | Controls compilation of OperServ modules. | 10-3-2
modules/operserv/akill.c | Module providing autokill support. | 7-2-2-2
modules/operserv/akill.h | Header file for autokill support. | 7-2-2-2
modules/operserv/main.c | Core OperServ functionality. | 7-2-1
modules/operserv/maskdata.c | Common handling for `MaskData` structures and related OperServ commands. | 7-2-2-1
modules/operserv/maskdata.h | Header file for `MaskData` structures. | 7-2-2-1
modules/operserv/news.c | Module implementing logon and operator news. | 7-2-4
modules/operserv/news.h | Header file for news support. | 7-2-4
modules/operserv/operserv.h | Header file for OperServ exports. | 7-2-1
modules/operserv/sessions.c | Module implementing session limiting. | 7-2-3
modules/operserv/sline.c | Module providing S-line support. | 7-2-2-3
modules/operserv/sline.h | Header file for S-line support. | 7-2-2-3
modules/protocol/ | Contains protocol module source files, along with auxiliary sources and headers. | 5
modules/protocol/Makefile | Controls compilation of protocol modules. | 10-3-2
modules/protocol/bahamut.c | Module implementing the Bahamut server protocol. | 5-6-5
modules/protocol/banexcept.c | Auxiliary source file for handling channel ban exceptions. | 5-7-1
modules/protocol/banexcept.h | Header file for `banexcept.c`. | 5-7-1
modules/protocol/chanprot.c | Auxiliary source file for handling the channel protection (`+a`) mode. | 5-7-2
modules/protocol/chanprot.h | Header file for `chanprot.c`. | 5-7-2
modules/protocol/dalnet.c | Module implementing the DALnet (ircd.dal) server protocol. | 5-6-3
modules/protocol/dreamforge.c | Module implementing the Dreamforge server protocol. | 5-6-4
modules/protocol/halfop.c | Auxiliary source file for handling the halfop channel user mode. | 5-7-3
modules/protocol/halfop.h | Header file for `halfop.c`. | 5-7-3
modules/protocol/hybrid.c | Module implementing the Hybrid server protocol. | 5-6-6
modules/protocol/inspircd.c | Module implementing the InspIRCd server protocol. | 5-6-7
modules/protocol/invitemask.c | Auxiliary source file for handling channel invite masks. | 5-7-4
modules/protocol/invitemask.h | Header file for `invitemask.c`. | 5-7-4
modules/protocol/monkey.c | Module implementing the Chunky Monkey server protocol. | 5-6-8
modules/protocol/ptlink.c | Module implementing the PTlink server protocol. | 5-6-9
modules/protocol/ratbox.c | Module implementing the Ratbox server protocol | 5-6-10
modules/protocol/rfc1459.c | Module implementing the RFC 1459 standard server protocol. | 5-6-1
modules/protocol/sjoin.c | Auxiliary source file for supporting `SJOIN`-style channel state messages. | 5-7-5
modules/protocol/sjoin.h | Header file for `sjoin.c`. | 5-7-5
modules/protocol/solidircd.c | Module implementing the solid-ircd server protocol. | 5-6-11
modules/protocol/svsnick.c | Auxiliary source file for handling forced nickname changing via a `SVSNICK` message. | 5-7-6
modules/protocol/svsnick.h | Header file for `svsnick.c`. | 5-7-6
modules/protocol/token.c | Auxiliary source file for handling inter-server message tokens. | 5-7-7
modules/protocol/token.h | Header file for `token.c` | 5-7-7
modules/protocol/trircd.c | Module implementing the tr-ircd server protocol. | 5-6-12
modules/protocol/ts8.c | Module implementing the RFC 1459 server protocol with TS8 extensions. | 5-6-2
modules/protocol/undernet-p9.c | Module implementing the Undernet server protocol (version 9). | 5-6-13
modules/protocol/unreal.c | Module implementing the Unreal server protocol. | 5-6-14
modules/statserv/ | Contains modules for the StatServ pseudoclient. | 7-6
modules/statserv/Makefile | Controls compilation of StatServ modules. | 10-3-2
modules/statserv/main.c | The StatServ module. | 7-6-2
modules/statserv/statserv.h | Header for StatServ structures. | 7-6-1
tools/ | Contains the `convert-db` and `ircservices-chk` tools. | 9 10-3-4
tools/Makefile | Controls the compilation and installation of the `convert-db` and `ircservices-chk` tools. | 10-3-4
tools/convert-cygnus.c | Routines for loading databases from Cygnus. | 9-3-1
tools/convert-db.c | Main source file for the `convert-db` database conversion tool. | 9-2-1
tools/convert-db.h | Header file for the `convert-db` database conversion tool. | 9-2-1
tools/convert-epona.c | Routines for loading databases from Epona IRC Services and Anope Services. | 9-3-2
tools/convert-hybserv.c | Routines for loading databases from HybServ. | 9-3-3
tools/convert-magick.c | Routines for loading databases from Magick IRC Services and WreckedNet IRC Services. | 9-3-4
tools/convert-ptlink.c | Routines for loading databases from PTlink Services. | 9-3-5
tools/convert-sirv.c | Routines for loading databases from SirvNET Services, Auspice Services, and Bolivia IRC Services. | 9-3-6
tools/convert-trircd.c | Routines for loading databases from trircd IRC Services. | 9-3-7
tools/convert-ver8.c | Routines for loading databases from Daylight and IRCS. | 9-3-8
tools/ircservices-chk.in | Template file for generating the `ircservices-chk` script. | 10-3-4

Table of Contents