| Commit message (Expand) | Author | Age | Files | Lines |
| * | 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.
| Aaron Jones | 2026-03-22 | 1 | -3/+0 |
| * | Adjust unsigned int -> uint64_t for all caps•••The previous commit addressed the issue with (most) function signatures,
but forgot to update the caps themselves to be 64-bit. This fixes that,
and finishes the remaining overlooked function signatures.
| Ryan Schmidt | 2026-03-17 | 1 | -1/+1 |
| * | Innovation by sed | Ed Kellett | 2020-10-15 | 1 | -3/+3 |
| * | Merge pull request #329 from edk0/reload-by-path•••Reload modules by path | Aaron Jones | 2020-06-25 | 1 | -0/+1 |
| |\ |
|
| | * | Reload modules by path | Ed Kellett | 2020-06-02 | 1 | -0/+1 |
| * | | Implement hook priorities | Ed Kellett | 2020-05-01 | 1 | -1/+1 |
| |/ |
|
| * | m_modules: make modreload work like restart•••/modrestart used to be implemented as a normal command and could crash
when used remotely because it would reload m_encap, which was on the
call stack at the time. This was fixed in 41390bfe5f. However,
/modreload has exactly the same problem, so I'm giving it the
same treatment.
Incidentally: This bug was first discovered in ircd-seven, where the
`/mod*` commands themselves live in the core, so m_encap was the only way
the crash could happen (and it didn't most of the time, because m_encap
would only be moved if you got unlucky). But `/mod*` are in modules in
charybdis, so /modrestart would have unloaded the code it was in the
middle of executing. With that in mind, I'm not sure how it ever
appeared to work.
| Ed Kellett | 2019-11-17 | 1 | -0/+7 |
| * | Deferred capability notifications from modules•••Reloading modules sends CAP DEL followed by an immediate CAP NEW:
:staberinde.local CAP * DEL :account-tag
:staberinde.local CAP * NEW :account-tag
This isn't very nice. /modrestart is particularly bad. In order to avoid
doing this, we remember the capability set at the beginning of module
operations, compare that with the set afterwards, and report only the
differences with CAP {DEL,NEW}.
| Ed Kellett | 2019-09-07 | 1 | -0/+4 |
| * | modules: serious cleanups | William Pitcock | 2016-06-18 | 1 | -5/+4 |
| * | modules: cleanups | William Pitcock | 2016-06-18 | 1 | -1/+1 |
| * | modules: move module loading/unloading commands to dedicated module.•••There's no reason to really have these in the main ircd anymore, static
modules are dead and aren't coming back.
To ensure people don't do something hopelessly retarded, this is a core
module.
| Elizabeth Myers | 2016-04-07 | 1 | -0/+5 |
| * | bool-ify modules stuff | Elizabeth Myers | 2016-04-03 | 1 | -7/+7 |
| * | config.h delenda est | Elizabeth Myers | 2016-03-19 | 1 | -1/+1 |
| * | Move module description headers to the top•••This is cleaner.
Note this was broken out of a much larger piece of work I did, so if
there's any problems, I apologise!
| Elizabeth Myers | 2016-03-09 | 1 | -1/+1 |
| * | Add ircd serials to AV2. | Elizabeth Myers | 2016-03-07 | 1 | -1/+3 |
| * | modules: AV2: use unsigned int for capability IDs instead of signed int | William Pitcock | 2016-03-07 | 1 | -1/+1 |
| * | modules: tag origin at load time. | Elizabeth Myers | 2016-03-06 | 1 | -8/+6 |
| * | modules: add origin field to V2 | Elizabeth Myers | 2016-03-06 | 1 | -2/+9 |
| * | modules: add description field | Elizabeth Myers | 2016-03-06 | 1 | -0/+1 |
| * | modules: whoops, forgot one tiny thing | Elizabeth Myers | 2016-03-06 | 1 | -1/+1 |
| * | modules: add new MAPI V2•••MAPI V1 is still supported for legacy modules, but it is highly
recommended to update to MAPI V2. It includes support for capability
tables, module descriptions, and implicit versions.
| Elizabeth Myers | 2016-03-06 | 1 | -15/+43 |
| * | Remove $Id tags from everything.•••These are obsolete and none have changed since 10 years gao...
| Elizabeth Myers | 2016-03-06 | 1 | -2/+0 |
| * | general: remove last vestiges of static modules support (this hasn't ever act... | William Pitcock | 2016-01-06 | 1 | -7/+1 |
| * | modules: use libltdl to load the modules | William Pitcock | 2016-01-05 | 1 | -7/+2 |
| * | Simplify module path list, removing strcpy use. | Jilles Tjoelker | 2014-02-23 | 1 | -5/+0 |
| * | Prefer PATH_MAX to non-standard MAXPATHLEN. | Jilles Tjoelker | 2011-10-28 | 1 | -1/+1 |
| * | Remove irc_basename, replace it with rb_basename from libratbox. | Valeriy Yatsko | 2008-12-03 | 1 | -1/+0 |
| * | libcharybdis includes gone. | Valery Yatsko | 2008-04-02 | 1 | -1/+0 |
| * | [svn] - the new plan:••• + branches/release-2.1 -> 2.2 base
+ 3.0 -> branches/cxxconversion
+ backport some immediate 3.0 functionality for 2.2
+ other stuff
| nenolod | 2007-01-24 | 1 | -0/+123 |