aboutsummaryrefslogtreecommitdiffstats
path: root/ircd/ircd.c
Commit message (Expand)AuthorAgeFilesLines
* Tidy up module loading code•••The existing code had several defects: - Core module file names were hardcoded, while autoloaded non- core module filenames were not. Code that loaded core modules had a different but in some places duplicated structure to the code that loaded autoloaded modules. - Module loading for autoloaded modules happened in dentry order, making it unpredictable from one server to the next, or even across instances of `make install` on the same server. - Module loading for autoloaded modules did not verify that the dentry was a file before trying to load it. - An IRCd start (or a conftest) only printed lines about loading modules mentioned in the configuration file. - The configuration file was parsed before loading core and autoloaded modules, meaning any modules specified in the configuration file would be loaded first. - Once a module was loaded, it was added to the head of the module list, making MODLIST show them in reverse loaded order (newest (re)loaded modules at the top of the list). These are addressed as follows: - We now scan the core and autoload module directories and use this to determine which modules to load. - We now sort the dentries according to their filename before iterating them to load them, making module load order finally deterministic. - We now test if a dentry is actually a file before trying to load it. - We now print a message to the console (if running in foreground or conftest mode) when loading any module, including core and autoloaded modules. - The message printed to the console now has the IRCd module directory prefix stripped from it if it matches. - The configuration file is now parsed after loading core and autoload modules. - The modules are added to the module list in the order that they are loaded. This now makes MODLIST show the order that modules were (re)loaded in. Modifications to two modules are part of this effort: - The autoload module `m_alias` relied upon the alias dict not being NULL when loaded, but this is only the case after the configuration file has been parsed. The module already had a "rehash" hook to destroy all existing aliases and create new ones, so we can just make the module do nothing on load (remove its modinit function) and change it to use the "conf_read_end" hook instead of the "rehash" hook, and it will still create aliases after the configuration file is subsequently parsed. With this modification, there are now no in-tree consumers of the "rehash" hook. - The autoload module `m_services` iterated `service_list` upon loading it, which will now be empty (a no-op) since the module is loaded before configuration file is parsed. This module too handles the configuration file being parsed with a "conf_read_end" hook and takes the appropriate action, so we can just remove this code from its modinit function. All other modules' modinit functions have been audited for behaviour like this; there was nothing of note. amdj/modulesGravatar Aaron Jones2026-03-111-3/+2
* Remove WebSocket supportGravatar Aaron Jones2024-06-121-2/+0
* Remove ancient portability code (#361)•••Remove portability code for systems that don't follow at least SUSv3. This fairly closely aligns with ISO C99, which solanum already requires.Gravatar jailbird7772022-08-241-4/+0
* Illumos fixes•••- getexecname(3) returns const char * - pid_t is long Gravatar JailBird2022-06-291-2/+2
* Remove Windows supportGravatar jailbird7772021-07-301-99/+1
* Remove ziplinks (#218)Gravatar Ariadne Conill2021-06-261-13/+0
* make more snotes L_NETWIDEGravatar jess2020-11-081-1/+1
* Innovation by sedGravatar Ed Kellett2020-10-151-4/+4
* ircd: Zero out the global_client_list•••Otherwise we unconditionally add "me" to it twice in some unit tests, which results in a loop in the list. Gravatar Simon Arlott2019-09-151-0/+1
* tests: add sendto_* test frameworkGravatar Simon Arlott2017-08-051-7/+7
* Print initialisation notice before forkingGravatar Aaron Jones2016-08-241-3/+3
* startup: fork before initialising the event subsystem•••On FreeBSD 4.8, fork(2) doesn't actually behave like fork(2). Namely, kqueue(2) descriptors are not inherited by the child. IOW, we can't fork(2) after we get the kqueue(2) descriptor. So we'll just have to rely on people to actually read the server log file if they want to understand why their server is dying during startup. Gravatar Aaron Jones2016-08-211-6/+7
* Attempt to open /dev/null before forking incase it would failGravatar Aaron Jones2016-08-211-6/+6
* Attempt #2 at fixing the file descriptor mess.•••This commit defers daemonisation to the end of initialisation as that makes it vastly simpler to get this right. Gravatar Aaron Jones2016-08-211-75/+35
* Revert "ircd startup: avoid black magic with file descriptors"•••This reverts commit 27c0f6d8f406658655cc45a0a7f2d0a0f120244b. A more extensive investigation and refactoring of the code is necessary. Gravatar Aaron Jones2016-08-201-21/+38
* ircd startup: avoid black magic with file descriptors•••This *should* fix a reported but as yet unreproducable ircd abort on restart. Gravatar Aaron Jones2016-08-201-38/+21
* ircd: relocate_paths() back on windows only nowGravatar William Pitcock2016-06-181-0/+4
* modules: cleanupsGravatar William Pitcock2016-06-181-2/+1
* ircd: fix compile of relocate_paths()Gravatar William Pitcock2016-06-181-1/+1
* ircd: make relocate_paths() available alwaysGravatar William Pitcock2016-06-181-2/+0
* ircd: call relocate_paths() in all casesGravatar William Pitcock2016-06-181-2/+0
* ircd: print runtime path configurationGravatar William Pitcock2016-06-171-1/+25
* ircd: functions that call exit(3) should be marked noreturnGravatar Aaron Jones2016-06-011-0/+3
* strcpy: mass-migrate to strlcpy where appropriateGravatar Aaron Jones2016-05-151-1/+1
* minor spring cleaning: remove/relocate duplicate/unused includes & macros•••[ci skip] Gravatar Aaron Jones2016-05-141-1/+0
* [sslproc] Use certificate file if key file is not presentGravatar Aaron Jones2016-05-051-1/+1
* getopt: don't modify argv as it breaks restart()Gravatar Simon Arlott2016-04-251-2/+2
* ircd: load modules after conf files•••The alias module depends on this Gravatar Elizabeth Myers2016-04-061-3/+2
* Rename authd.[ch] on ircd side to authproc.[ch] to prevent shadowing.Gravatar Elizabeth Myers2016-04-021-1/+1
* ircd: integrate ircd side of wsockd supportGravatar William Pitcock2016-04-021-0/+2
* authd: It Works, Bitches™Gravatar Elizabeth Myers2016-03-281-2/+2
* Merge branch 'master' into authd-frameworkGravatar Elizabeth Myers2016-03-281-3/+3
|\
| * ircd: Move signaled variables to volatile sig_atomic_tGravatar Matt Ullman2016-03-271-3/+3
* | Replace s_auth/blacklist stuff with authd calls•••This also does a lot of surgery on the conf system to reconfigure authd. /!\ WARNING! ACHTUNG! ADVERTENCIA! ATTENTION! AVVERTIMENTO! /!\ This code has not been run-time tested yet (though it compiles)! Gravatar Elizabeth Myers2016-03-281-2/+2
|/
* ircd: only relocate_paths on windows, no point on posixGravatar William Pitcock2016-03-251-1/+3
* ircd: implement path relocationGravatar William Pitcock2016-03-251-1/+82
* ircd: use ircd_paths for logFileName and pidFileNameGravatar William Pitcock2016-03-251-2/+5
* ircd: start staging for relocatable pathsGravatar William Pitcock2016-03-241-5/+24
* common.h: raison d'être is gone, so out it goes.•••Fold whatever was left into ircd_defs.h Gravatar Elizabeth Myers2016-03-231-1/+0
* Send YES/NO to Davy Jones's Locker.Gravatar Elizabeth Myers2016-03-231-3/+3
* ircd: shut GCC the fuck up.•••No, it can't probably fail... that isn't what that's there for. Gravatar Elizabeth Myers2016-03-231-1/+7
* ircd: log runtime path (mainly as proof of concept for rb_path_to_self())Gravatar William Pitcock2016-03-211-1/+1
* ircd: win32 does not need the FD 0,1,2 stuffGravatar William Pitcock2016-03-201-0/+2
* ircd: handle some EXIT_FAILURE cases differently on win32Gravatar William Pitcock2016-03-201-1/+5
* ircd: squelch write(2) warning differentlyGravatar William Pitcock2016-03-201-7/+1
* ircd: _WIN32 checks on geteuid() tooGravatar William Pitcock2016-03-201-0/+2
* ircd: ircd main: use librb functions for daemon managementGravatar William Pitcock2016-03-201-2/+3
* config.h delenda estGravatar Elizabeth Myers2016-03-191-1/+1
* ircd: do not shadow internal openssl symbol "ssl_ok" (yeah, i know)Gravatar William Pitcock2016-03-191-4/+4
* ircd: fix a really retarded GCC warning by being anal retentively "standards ...Gravatar Elizabeth Myers2016-03-181-1/+9