Skip to content
Alex Iadicicco edited this page Feb 3, 2014 · 2 revisions

A major goal of Tethys design is modularity and loose coupling. This has been subverted for the purposes of conciseness in other parts of the code, but is a major factor when making design decisions.

Below is a list of each distinct component and a brief description of what it does.

  • auth (auth.h, auth.c): Database of class{}, auth{}, oper{}, and link{} blocks from the config files, and functions for performing lookups.
  • chan (chan.h, chan.c): Channel-related data structures (channel, channel user, channel ban), relatively low-level data access functions, and a few high-level query functions.
  • conf (conf.h, conf.c): Configuration processing.
  • conn (conn.h, conn.c): Low-level connection management (creation, shutdown, toplevel input/output, keepalive checks, etc.)
  • cookie (cookie.h, cookie.c): Monotonically increasing integer values. Used to quickly identify if a certain piece of data has already been processed by comparing its cookie to a "current" cookie.
  • crypto (crypto.h, crypto.c): System-independent cryptographic hash API.
  • hook (hook.h, hook.c): Hook system, to allow modules to alter or react to selected internal behavior.
  • linebuf (linebuf.h, linebuf.c): Line buffering
  • log (log.h, log.c): Logging
  • map (map.m, map.c): Data structure mapping pointers to pointers or strings to pointers. Used, for example, in channels for channel membership lists, where users are mapped to their channel user structure.
  • mode (mode.h, mode.c): Flexible IRC mode string processing system. Has facilities to support output formatting as well.
  • module (module.h, module.c): Module management.
  • msg (msg.h, msg.c): The message processing subsystem. Covers message parsing, command dispatch, command handlers, and message source information.
  • sendto (sendto.h, sendto.c): Outgoing message support, preventing multiple delivery to local connections. Supports, at writing, channel, visible, and server targets, as well as list and map targets.
  • server (server.h, server.c): Server tree data structures.
  • strop (strop.h, strop.c): "Advanced" string operations tools. At writing, supports splitting and wrapping.
  • upgrade (upgrade.h, upgrade.c): (unfinished, unused) Save and restore internal state to/from disk, to assist self-exec().
  • user (user.h, user.c): User data structures.
  • util (util.h, util.c): Miscellaneous utilities.
  • vsnf() (vsnf.h, vsnf.c): snprintf() replacement with IRC-specific additions.
Clone this wiki locally