<feed xmlns='http://www.w3.org/2005/Atom'>
<title>~irc/github.com/solanum-ircd/solanum.git/ircd, branch amdj/modules</title>
<subtitle>https://github.com/solanum-ircd/solanum</subtitle>
<id>https://cgit.space/~irc/github.com/solanum-ircd/solanum.git/atom/ircd?h=amdj%2Fmodules</id>
<link rel='self' href='https://cgit.space/~irc/github.com/solanum-ircd/solanum.git/atom/ircd?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>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>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>Batch updates</title>
<updated>2026-01-21T16:10:44Z</updated>
<author>
<name>Ryan Schmidt</name>
</author>
<published>2026-01-13T17:12:32Z</published>
<link rel='alternate' type='text/html' href='https://cgit.space/~irc/github.com/solanum-ircd/solanum.git/commit/?id=8162cbe9d4f350da87a6eff02d06c804889b0d5f'/>
<id>urn:sha1:8162cbe9d4f350da87a6eff02d06c804889b0d5f</id>
<content type='text'>
The extension example_module was extended to introduce a new
client-initiated batch type named test. This is primarily done to ease
testing of the client-initiated portions of m_batch, but also serves as
a useful sketch for how a module can register its own client-initiated
batch types.

The definition of struct BatchHandler was slightly modified to use a
callback function to determine if nesting is allowed. The callback can
additionally set a custom error message if desired when returning false.

The len and messages list in struct Batch no longer include the start
message, so a len of 0 indicates an empty batch. Because the start
message is still allocated and saved off, adjust anything that impacts a
client's pending_batch_lines by 1 to account for the implicit additional
message.

Empty batches now trigger the relevant batch handler. If a handler wants
to no-op on empty batches, it can do so but this allows additional
flexibility for handlers to still do something upon receiving empty
client-initiated batches.
</content>
</entry>
<entry>
<title>Include AWAY and status MODEs in netjoin batches</title>
<updated>2026-01-21T16:10:44Z</updated>
<author>
<name>Ryan Schmidt</name>
</author>
<published>2026-01-13T05:08:51Z</published>
<link rel='alternate' type='text/html' href='https://cgit.space/~irc/github.com/solanum-ircd/solanum.git/commit/?id=0ab66dade004bc3211883c1f2eebf9e0e2a17c4f'/>
<id>urn:sha1:0ab66dade004bc3211883c1f2eebf9e0e2a17c4f</id>
<content type='text'>
AWAY is burst to away-notify clients and status MODEs (+o and +v) are
burst to all clients on the channel. Excluding these from the batch
means that clients may opt to process these before the batch completes,
then get confused because they have no records of those nicknames
existing or being members of the channel. Including both in the netjoin
batch solves these concerns, although the netjoin batch spec is silent
on whether we're allowed to put non-JOIN commands in that batch.
</content>
</entry>
<entry>
<title>Add batch support</title>
<updated>2026-01-21T16:10:44Z</updated>
<author>
<name>Ryan Schmidt</name>
</author>
<published>2025-10-25T00:59:22Z</published>
<link rel='alternate' type='text/html' href='https://cgit.space/~irc/github.com/solanum-ircd/solanum.git/commit/?id=4cc9be1ddf1e14fc76bf433e23a3d528424b60ca'/>
<id>urn:sha1:4cc9be1ddf1e14fc76bf433e23a3d528424b60ca</id>
<content type='text'>
- Add "batch" client capability
- Support sending netsplit/netjoin batches
- Support receiving BATCH from clients and remote servers
- Support for modules to define supported batch types for incoming
  batches
- Add "message_handler" hook to override the handler for a particular
  incoming message
- Add technical and user-facing documentation for batches
- Add some more sendto_* overloads that support tags which were missing
  from the initial message-tags implementation but turned out to be
  needed
</content>
</entry>
<entry>
<title>Propagate tags in numerics from linked servers (#477)</title>
<updated>2026-01-11T00:39:43Z</updated>
<author>
<name>Ryan Schmidt</name>
</author>
<published>2026-01-11T00:39:43Z</published>
<link rel='alternate' type='text/html' href='https://cgit.space/~irc/github.com/solanum-ircd/solanum.git/commit/?id=e2a499f7192fa5e966dab03b7980e3240111d7b3'/>
<id>urn:sha1:e2a499f7192fa5e966dab03b7980e3240111d7b3</id>
<content type='text'>
Previously, we handled numerics before running the message_tags hook or
setting the incoming_message and incoming_client globals, which meant
that tags received from linked servers would never be passed along to
clients. Now do both of those things before passing the numeric along so
we can propagate message tags in numerics.

This will, among other things, mean server-time now works with numerics
and solves an issue with implementing labeled-response in the future.</content>
</entry>
<entry>
<title>Fix memory leak in sendto_match_servs (#465)</title>
<updated>2025-10-23T10:58:45Z</updated>
<author>
<name>Ryan Schmidt</name>
</author>
<published>2025-10-23T10:58:45Z</published>
<link rel='alternate' type='text/html' href='https://cgit.space/~irc/github.com/solanum-ircd/solanum.git/commit/?id=4544f823127c59951c7695f0f260128ee0691a67'/>
<id>urn:sha1:4544f823127c59951c7695f0f260128ee0691a67</id>
<content type='text'>
Free the msgbuf cache after we're done.</content>
</entry>
<entry>
<title>Remote the `compressed` server flag</title>
<updated>2025-10-13T20:59:30Z</updated>
<author>
<name>Andreas Rammhold</name>
</author>
<published>2025-10-13T20:47:56Z</published>
<link rel='alternate' type='text/html' href='https://cgit.space/~irc/github.com/solanum-ircd/solanum.git/commit/?id=2d483c6e3f0d33aef9447c17b3b55d3e86098831'/>
<id>urn:sha1:2d483c6e3f0d33aef9447c17b3b55d3e86098831</id>
<content type='text'>
This is a follow-up to 81531536aac9adb585c5a17b448aa0496bf68ebd where
the ziplinks feature had been ripped out. Unfortunately the value of
the `compressed` flag had been set to `0` instead of `-1`, or removed
entirely. This led to resetting a connect blocks flags being reset
whenever the `compressed` flag was being set.

When you'd set the flags (in this order) `topicburst, compressed, ssl`
you'd end up with just the `ssl` flag as setting `compressed` would
reset all of the flag back to zero (newconf.c:439) as
set_modes_from_table excepts `-1` to be passed as not-found / invalid
flag value.

With this (trivial) patch the log will contain a helpful line telling
operators that the `compressed` flag is unknown. It doesn't fail
config parsing/rehashing:

&gt; Warning -- unknown flag compressed.
</content>
</entry>
</feed>
