Dev:Unreal Architecture

From UnrealIRCd documentation wiki
Jump to navigation Jump to search

Unreal's architecture is made of several important components:


The core includes several components listed in more detail below, but is responsible for loading the configuration, interacting with sockets and low-level I/O, server linking, and other core functionality to the IRCd.

  • Socket Engine
  • "Core" modes
  • "Core" commands
  • Configuration parsing
  • Server linking
  • Client connections
  • Resource management


The Module article will explain the basics of a module, while Dev:Module API will elaborate on the various ways to integrate your module in UnrealIRCd and extend functionality (add commands, modes, etc).

Coding Standards

Throughout Unreal, we generally assume we have C89 support as our baseline, that means we try not to require C99 support anywhere within the code. Furthermore, while we do use POSIX specific features where necessary (socket engine comes to mind) we try to explicitly provide alternatives to make everything we do compatible with Win32.

As a general goal, any modules you write, or patches you submit, should aim to support following environments and compilers:

  • GCC and Generic POSIX Systems
  • clang and Generic POSIX Systems
  • Win32 using a MSVC compiler (not mingw or through cygwin)

In terms of coding style, Unreal is descended from the original IRCd, and so has numerous places in the code where we should and hope to do a better job with in the future. Towards that goal, we want to avoid the following wherever possible:

  • goto statements, with some exceptions for breaking out of nested loops
  • non-explicit variable names
  • K&R style method prototypes

So please avoid putting any of these into the codebase.