aboutsummaryrefslogtreecommitdiffstats
path: root/extensions
Commit message (Expand)AuthorAgeFilesLines
* Pass msgbuf to PART's privmsg_channel hook and propagate PART tags•••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 Gravatar Ryan Schmidt2026-01-221-0/+4
* Fix msgid tags with echo-message•••msgid generation has been moved to the privmsg_user and privmsg_channel hooks, which are called on every normal PRIVMSG/NOTICE/TAGMSG. They are not called when messaging user@server, opers@server, or mass-messages and as such none of those things will have msgid attached. This seems fine as user@server is rejected by solanum and exists solely for messaging pseudoservers, opers@server is turned into a snote, and mass-messages are oper-only and thus unlikely to need anything that keys off msgid in the future. Moving this solves the interaction with msgid and echo-message. Now, we ensure that an echoed message always has a msgid, and that msgid is always the same as the msgid shown to other clients. This requires expanding the hook_data structures for those two hooks. While a core restart is not needed, attempting to reload tag_message_id before reloading m_message may cause crashes. When updating your servers, please reload m_message first. Gravatar Ryan Schmidt2026-01-211-68/+75
* Batch updates•••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. Gravatar Ryan Schmidt2026-01-211-2/+41
* Ensure duplicate tags only use the final value•••Per spec, individual tag keys MUST only be used once per message, and implementations SHOULD disregard all but the final occurrence of a tag key. As such, iterate over the user-provided tags in reverse order and automatically discard tags that we have already approved. Also, require that a client giving us a +typing tag has negotiated the message-tags capability themselves. Gravatar Ryan Schmidt2025-10-101-0/+3
* Fix typing module decl and send 417 in more cases•••The typing module declaration had a copy/paste error that has now been corrected, and we now send 417 ERR_INPUTTOOLONG in cases where parsing the line into a MsgBuf fails because it overflowed the 8191+512 byte buffer while processing tags or the message origin. Gravatar Ryan Schmidt2025-10-101-1/+1
* extensions/tag_typing: Add +typing tag support•••The spec allows for three values: active, paused, and done, so filter to only allow those three. No ratelimiting has been added as part of this module, as the regular ratelimiting that applies to all sent messages is likely sufficient for typing notifications. Gravatar Ryan Schmidt2025-10-102-0/+71
* extensions/tag_message_id: Add msgid support•••Support the @msgid tag to label outgoing PRIVMSG, NOTICE, and TAGMSG with a server-generated ID. Clients can make use of this ID for various purposes, mostly in interaction with other (client-only) tags. The msgid format was chosen so that it encodes enough state within the id itself to be useful for eventual implementations of reply and message-redaction. The format is as follows: 1. The character '1' to indicate this is message id format version 1 2. The timestamp the message was sent (milliseconds since epoch) 3. An incrementing counter value, for when multiple messages are sent within the same second. The counter is seeded to a random number each new second, so that it is not useful as a means of determining the total number of messages sent by this server in a particular period of time 4. The ID of the client sending the message 5. If the message is being sent to a channel, the base64-encoded name of that channel This metadata achieves multiple goals: 1. Message ids are sorted in lexically ascending order based on the time they are sent, with the counter ensuring that earlier messages within the same time increment are sorted before later messages. This could potentially help in any sort of future shared message database to achieve time-based queries, e.g. chathistory 2. When a client replies to a message, the server can partially validate the msgid being replied to, ensuring that replies to a channel message are only sent to that channel or replies to a user private message are only sent to that user 3. The server can validate a client attempting to redact their own message by comparing the client's ID and connection time against the specified message's client ID and timestamp, allowing stateless approval of self-redactions 4. The server can validate a chanop attempting to redact a message sent in their channel by comparing the channel name and creation timestamp against the specified message's channel name and timestamp, allowing stateless approval of chanop-intiated redactions 5. No signing of messages is performed so a msgid cannot be used to prove any particular message was sent by any particular client Gravatar Ryan Schmidt2025-10-102-0/+144
* Cleanup areas impacted by client tags•••With the new TAGMSG support in m_message, filter now receives TAGMSG but would choke on processing them due to not having a mapping from that message type to a command name. Right now, no filtering is done on tag contents because there is currently no tags that we support that take arbitrary user-defined data (and thus would require filtering). This fact does not change in the course of this patchset. The client_tags code to register client tags for the CLIENTTAGSDENY ISUPPORT message had some general formatting cleanup as well as a fix for a segfault when removing support for a client tag if that client tag was the last one being removed (causing the src and dest for strcpy to be the same pointer) as well as a bugfix for the strcmp check that would've caused it to overwrite the wrong client tag entry. Gravatar Ryan Schmidt2025-10-101-0/+1
* Remove cap_message_tags and reorganize Makefile•••Message tags support is being rolled into core rather than as a loadable module because of the sweeping changes it requires, including at the s2s protocol level for sending since the spec increased the size of the tags portion from 512 bytes to 8191 bytes. Also alphabetized the extensions Makefile to make subsequent patches that add new tags cleaner. Gravatar Ryan Schmidt2025-10-101-16/+16
* Add dedicated hook data type for can_create_channel•••hook_data_can_create_channel includes the name of the channel being created, which is necessary for any non-trivial restriction of channel creation as well as sending correct error messages. The new hook data matches the layout of the previous hook data, taking advantage of a disused pointer field in hook_data_client_approval as used by callers of the hook (m_join). Gravatar daemoness2025-05-112-2/+2
* extensions/invite_notify: make the NOTICE optional, configurable•••This adds a configuration option that determines whether the NOTICE is sent to clients that do not support the IRCv3 invite-notify capability. Requested by LiberaChat MGM. Gravatar Aaron Jones2023-11-081-3/+8
* extensions/extb_extgecos: Fix breakage•••This commit returns $x's old behavior as long as the mask does not contain a #, otherwise it uses the new behavior that supports CIDR notation. This fixes `$x:*badword*` not matching realnames containing "badword". Gravatar TheDaemoness2023-07-041-6/+10
* Add ACCOUNTEXTBAN ISUPPORT token•••To support the draft IRCv3 spec: https://github.com/ircv3/ircv3-specifications/pull/464 Gravatar Valentin Lorentz2023-07-011-0/+3
* extensions/extb_extgecos: support CIDR masks in $x extbans (#414)•••This allows a channel operator to set a channel ban such as "$x:*!*@192.0.2.0/24#*web.libera.chat*" and have it function as intended. Closes solanum-ircd/solanum#26Gravatar Aaron Jones2023-07-011-5/+28
* Add extban type for unidentified connections (#411)•••* Add extension extb_guest This module provides an extban type that acts as a normal ban but only matches unidentified users. * Document extban g in help/opers/extban * extensions/extb_guest: support CIDR masks in $g extbans This allows a channel operator to set a channel ban such as "$g:*!*@192.0.2.0/24#*web.libera.chat*" and have it function as intended. --------- Co-authored-by: Aaron Jones <me@aaronmdjones.net>Gravatar TheDaemoness2023-07-013-0/+75
* m_shedding: user shedding module based on oftc-hybridGravatar David Schultz2023-05-182-0/+177
* extensions/umode_hide_idle_time: mask times for hidden sources (#373)•••If the user performing a WHOIS has hidden their idle time (is umode +I), also prevent them from seeing other user's idle times, even if said users are not themselves umode +I. Suggested-by: @Unit193Gravatar Aaron Jones2022-10-211-1/+1
* chm_regmsg: fix typo in descriptionGravatar David Schultz2022-10-021-1/+1
* Make +R play nicely with +zGravatar Stephen Bennett2022-10-011-14/+49
* remove old reference to the unsupported directory•••the unsupported directory was removed by charybdis a while ago Gravatar vulpine2022-09-261-1/+1
* Add umode +I to allow users to hide their idle time (#220)Gravatar David Schultz2022-08-302-0/+81
* chm_regmsg: don't duplicate nick in 415•••sendto_one_numeric already includes the nick, so there's no need to duplicate it. OFTC does not.Gravatar Doug Freed2022-07-111-1/+1
* Cast time_t to long long when printingGravatar Matthew Martin2022-07-011-1/+1
* ERROR instead of NOTICE for failed WEBIRCGravatar Jess Porter2022-07-011-5/+5
* Normalize snprintf size to use sizeof where possibleGravatar Matthew Martin2022-06-241-1/+1
* don't subject remote users to chm_nonoticeGravatar Jess Porter2022-01-161-2/+5
* helpops: show opernames to opersGravatar Ed Kellett2021-10-171-4/+10
* explicitly show IP in SNO_BANNED snotesGravatar jess2021-10-091-2/+2
* extb_canjoin: Ignore exemptionsGravatar Ed Kellett2021-09-221-1/+1
* chm_regmsg: actually check channel mode (#271)Gravatar Eric Mertens2021-08-231-0/+4
* switch sasl_usercloak.c to use SNO_BANNEDGravatar jesopo2021-08-201-3/+3
* hook_fn casts were hiding UB (#265)Gravatar Eric Mertens2021-08-1934-105/+132
* Make new_local_user hooks handle dead clientsGravatar Ed Kellett2021-08-193-1/+10
* Remove Windows supportGravatar jailbird7772021-07-301-3/+0
* kick,remove: don't confuse source and target membershipGravatar Ed Kellett2021-07-131-8/+8
* add override /inviteGravatar jesopo2021-07-061-0/+19
* Add `solanum.chat/oper` capablity (#217)Gravatar David Schultz2021-06-262-0/+148
* Show account name in cliconn snotes when SASL is used (#135)•••Show account name in cliconn snotes when SASL is usedGravatar David Schultz2021-06-121-2/+3
* Port m_invex_regonly from ircd-seven (#178)•••Port m_invex_regonly from ircd-seven This module allows +I to be used to bypass +r (registered only) as well as +i (invite only). Co-authored-by: Doug Freed <dwfreed@mtu.edu> Co-authored-by: Ed Kellett <e@kellett.im>Gravatar Mike Quin2021-06-122-0/+47
* Mailmap and copyright update for AriadneGravatar Ariadne Conill2021-06-011-1/+1
* Remove $x's magical powersGravatar Ed Kellett2021-04-261-12/+1
* Remove redundant param to update_session_deadlineGravatar Ed Kellett2021-04-261-17/+15
* Manage override sessions properlyGravatar Ed Kellett2021-04-261-5/+10
* "KDX-Line active for" is now L_NETWIDE, so remove sno_globalklineGravatar jesopo2021-04-102-65/+0
* Add +R channel mode module requiring services account to chat (#102)•••* Add +R channel mode module requiring services account to chat * Use void* in hook argument * move chm_regmsg from modules to extensions * generate error message when module fails to loadGravatar Eric Mertens2021-01-242-0/+93
* extensions: remove m_roleplayGravatar Doug Freed2020-11-222-223/+0
* m_findforwards: refactor to use multiline•••Fixes #57 Gravatar Doug Freed2020-11-121-16/+7
* make more snotes L_NETWIDEGravatar jess2020-11-083-7/+7
* Stop using chm_nosuch as a sentinel value (#53)•••Remove chmode compat modules This removes the need for chm_nosuch as well. Unknown mode detection happens in mode parsing now.Gravatar Eric Mertens2020-11-084-138/+0
* Clean up duplication in ChannelModeFunc prototypes (#52)Gravatar Eric Mertens2020-11-073-6/+3