<feed xmlns='http://www.w3.org/2005/Atom'>
<title>~irc/github.com/solanum-ircd/solanum.git, branch amdj/modules</title>
<subtitle>https://github.com/solanum-ircd/solanum</subtitle>
<id>https://cgit.space/~irc/github.com/solanum-ircd/solanum.git/atom/?h=amdj%2Fmodules</id>
<link rel='self' href='https://cgit.space/~irc/github.com/solanum-ircd/solanum.git/atom/?h=amdj%2Fmodules'/>
<link rel='alternate' type='text/html' href='https://cgit.space/~irc/github.com/solanum-ircd/solanum.git/'/>
<updated>2026-03-11T08:57:36Z</updated>
<entry>
<title>Tidy up module loading code</title>
<updated>2026-03-11T08:57:36Z</updated>
<author>
<name>Aaron Jones</name>
</author>
<published>2026-03-11T03:57:11Z</published>
<link rel='alternate' type='text/html' href='https://cgit.space/~irc/github.com/solanum-ircd/solanum.git/commit/?id=f5dcfe9a95d236d2041f5bbbceeb54128d851299'/>
<id>urn:sha1:f5dcfe9a95d236d2041f5bbbceeb54128d851299</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>Make TAGMSG behave like NOTICE for errors</title>
<updated>2026-02-12T20:17:53Z</updated>
<author>
<name>Ryan Schmidt</name>
</author>
<published>2026-02-12T01:57:44Z</published>
<link rel='alternate' type='text/html' href='https://cgit.space/~irc/github.com/solanum-ircd/solanum.git/commit/?id=59e35e3f5e0943729f2b55f860416b63c4a0e73f'/>
<id>urn:sha1:59e35e3f5e0943729f2b55f860416b63c4a0e73f</id>
<content type='text'>
We explicitly do not send error numerics to clients for NOTICE in most
cases, instead silently discarding the command. Give this treatment to
TAGMSG across the board as well. Previously, this was the case for
TAGMSG without tags but was not applied for TAGMSG that had tags but
otherwise had issues (e.g. +m channel and the user is not +ov). This
prevents spamming users whose clients send automatic TAGMSG with errors
they can do nothing about.
</content>
</entry>
<entry>
<title>Create $PREFIX/var/solanum on install with --enable-fhs-paths</title>
<updated>2026-02-03T09:13:41Z</updated>
<author>
<name>Valentin Lorentz</name>
</author>
<published>2026-01-29T23:05:25Z</published>
<link rel='alternate' type='text/html' href='https://cgit.space/~irc/github.com/solanum-ircd/solanum.git/commit/?id=9778247c3dca59370b21c4f34f328c52e8b8c669'/>
<id>urn:sha1:9778247c3dca59370b21c4f34f328c52e8b8c669</id>
<content type='text'>
On startup, bandb tries to create $PREFIX/var/solanum/ban.db, which fails if the directory does not exist.
</content>
</entry>
<entry>
<title>Write data files to $PREFIX/var/lib/solanum instead of $PREFIX/var/solanum with --enable-fhs-paths</title>
<updated>2026-02-03T09:10:57Z</updated>
<author>
<name>Valentin Lorentz</name>
</author>
<published>2026-02-02T21:29:19Z</published>
<link rel='alternate' type='text/html' href='https://cgit.space/~irc/github.com/solanum-ircd/solanum.git/commit/?id=a38f27bfde178dcf943c3fee657ab9c345b8c652'/>
<id>urn:sha1:a38f27bfde178dcf943c3fee657ab9c345b8c652</id>
<content type='text'>
</content>
</entry>
<entry>
<title>parse: fix crash</title>
<updated>2026-01-27T19:29:05Z</updated>
<author>
<name>Ryan Schmidt</name>
</author>
<published>2026-01-27T19:29:05Z</published>
<link rel='alternate' type='text/html' href='https://cgit.space/~irc/github.com/solanum-ircd/solanum.git/commit/?id=852bef71f56d206aa224231589849c4c9be81867'/>
<id>urn:sha1:852bef71f56d206aa224231589849c4c9be81867</id>
<content type='text'>
The incoming_client and incoming_message globals were not properly 
cleared after processing a numeric command. Ensure they are cleared by 
not returning early after setting those global values.

Fixes: e2a499f</content>
</entry>
<entry>
<title>ircd/newconf.c: conf_set_general_hidden_caps: fix order of operations</title>
<updated>2026-01-27T18:03:42Z</updated>
<author>
<name>Aaron Jones</name>
</author>
<published>2026-01-27T10:53:13Z</published>
<link rel='alternate' type='text/html' href='https://cgit.space/~irc/github.com/solanum-ircd/solanum.git/commit/?id=7282591e5c62f68f735ed3f918550ca596a928c7'/>
<id>urn:sha1:7282591e5c62f68f735ed3f918550ca596a928c7</id>
<content type='text'>
We should increment the number of capabilities to allocate space
for after freeing any existing capabilities, in order to prevent
the loop that frees them from overwriting the number.

Reported-By: Ryan Schmidt
</content>
</entry>
<entry>
<title>Add doing_version_confopts hook</title>
<updated>2026-01-22T22:01:58Z</updated>
<author>
<name>Ryan Schmidt</name>
</author>
<published>2026-01-22T20:11:43Z</published>
<link rel='alternate' type='text/html' href='https://cgit.space/~irc/github.com/solanum-ircd/solanum.git/commit/?id=fd89d4e837fe2e98cb273c340ddf4762ce1eb070'/>
<id>urn:sha1:fd89d4e837fe2e98cb273c340ddf4762ce1eb070</id>
<content type='text'>
This hook allows modification of the confopts portion of a VERSION
response (i.e. the set of flags representing how the ircd was
configured).

Extension modules can use this hook to display additional confopts
without needing to edit m_version or add things to core in order to
share state with m_version.
</content>
</entry>
<entry>
<title>Pass msgbuf to PART's privmsg_channel hook and propagate PART tags</title>
<updated>2026-01-22T00:42:01Z</updated>
<author>
<name>Ryan Schmidt</name>
</author>
<published>2026-01-21T22:08:55Z</published>
<link rel='alternate' type='text/html' href='https://cgit.space/~irc/github.com/solanum-ircd/solanum.git/commit/?id=6a1cd5ec8650ea4a8f47db64f8a4032cc4827c11'/>
<id>urn:sha1:6a1cd5ec8650ea4a8f47db64f8a4032cc4827c11</id>
<content type='text'>
The privmsg_channel hook gained a new msgbuf member which was
uninitialized in m_part. Properly pass the msgbuf to that parameter and
propagate any tags set by the hook to downstream servers.

This requires introducing sendto_server_tags(), and I refactored
sendto_server() to call the same helper internal method as
sendto_server_tags(). I took the opportunity to update the method to use
msgbuf instead of linebuf directly (meaning sendto_server() now calls
outbound_msgbuf).

Fixes #484
</content>
</entry>
<entry>
<title>Overhaul hooks documentation</title>
<updated>2026-01-21T17:10:18Z</updated>
<author>
<name>Ryan Schmidt</name>
</author>
<published>2026-01-13T01:38:15Z</published>
<link rel='alternate' type='text/html' href='https://cgit.space/~irc/github.com/solanum-ircd/solanum.git/commit/?id=86596936c1c4a708cb3ec3a642c008489d67255e'/>
<id>urn:sha1:86596936c1c4a708cb3ec3a642c008489d67255e</id>
<content type='text'>
The new hooks documentation is now a comprehensive accounting of every
hook that exists in the solanum repo. The document includes changes to
hooks present in the (as of now unmerged) PRs #466, #478, and #482.
</content>
</entry>
<entry>
<title>Add doing_info_conf hook and cleanup unused hooks</title>
<updated>2026-01-21T17:09:43Z</updated>
<author>
<name>Ryan Schmidt</name>
</author>
<published>2026-01-13T00:59:37Z</published>
<link rel='alternate' type='text/html' href='https://cgit.space/~irc/github.com/solanum-ircd/solanum.git/commit/?id=1b44c4de4d955156bc010fa8223031a14ab69202'/>
<id>urn:sha1:1b44c4de4d955156bc010fa8223031a14ab69202</id>
<content type='text'>
doing_info_conf is called during INFO commands after all conf options
have been sent to opers. Modules can use this hook to expose any conf
options they define by sending relevant RPL_INFO replies to the oper.
This addition removes the final barrier to defining new ircd.conf
options inside of extension modules rather than requiring core changes
for extension configuration.

Additionally, some cleanup has been performed for hook definitions that
are not called anywhere inside of solanum. Three hooks were declared in
hook.h as extern int but were not defined or referenced in any other
file: iosend_id, iorecv_id, and iorecvctrl_id. The doing_admin,
doing_info, doing_motd, and doing_trace "spy" hooks were defined in the
module headers for those modules, however the modules never actually
invoked those hooks. All of the lingering declarations for these hooks
have now been removed as they weren't doing anything anyway.
</content>
</entry>
</feed>
