aboutsummaryrefslogtreecommitdiffstats
path: root/include/hook.h
Commit message (Expand)AuthorAgeFilesLines
* Separate client vs server caps•••Instead of overloading the same field in a LocalUser, have separate fields for client caps vs server caps. While only one of these will ever be nonzero, it reduces error by making it explicit which set of caps is being checked. IsCapable and friends have been split as well, to IsClientCapable and IsServerCapable. Finally, both fields have been updated to uint64_t (server caps were approaching the current limit) and all APIs that reference caps updated to uint64_t as well (no more signed/unsigned mismatches). Gravatar Ryan Schmidt2026-03-171-4/+4
* Add doing_info_conf hook and cleanup unused hooks•••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. Gravatar Ryan Schmidt2026-01-211-4/+0
* 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-0/+2
* Add batch support•••- 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 Gravatar Ryan Schmidt2026-01-211-0/+1
* Refactor message_tag hook•••The original hook was defined in the (now-removed) cap_message_tag module. This new hook lives deeper down in parse.c so that it fires on all incoming tags for all incoming messages. The hook was renamed from client_tag_accept to message_tag to denote that it is used for all tags, including tags coming from server connections, and not just tags with a client-only prefix. The hook data contains two non-const fields for the capmask and approval status. Since incoming tags lack a capmask entirely, this allows hook functions that wish to keep the tag around to specify the capmask used for propagating the tag to other clients and servers. The approval status can take one of three forms: approve the tag, drop the tag from the message (but still process other tags and run the command handler), or drop the entire message (not processing any other tags and not running any command handlers). It is expected when a hook function drops the message that they'll send appropriate feedback to the client, however the nature of that feedback will likely vary by hook function so no default message is given to a client if their message is dropped. The incoming_message global defined previously with cap_server_time now holds the MsgBuf with the updated/sanitized list of tags rather than the raw values specified by the client. Additionally, cap_server_time makes use of this new hook to propagate the time tag into function callbacks that support tag propagation. The implicit propagation still exists since the majority of function callbacks do not support explicit tag propagation, and that fact will not change in the course of this patchset. Gravatar Ryan Schmidt2025-10-101-5/+19
* message-tags: facility to manipulate client-tags•••It provides for hook facilities to client-only tags: - messages can be dropped silently ; - messages can be edited ; - messages can be stripped from a client-only tag Gravatar Raito Bezarius2025-10-101-0/+9
* m_message: proper tag propagation•••This introduces an handler to accept or not the propagation of a tag. Basic sketch API is provided for modules to hook for providing their own policy for specific tag propagation. Gravatar Raito Bezarius2025-10-101-0/+1
* 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-111-0/+7
* Add umode +I to allow users to hide their idle time (#220)Gravatar David Schultz2022-08-301-0/+8
* Track and inform modules of privset changesGravatar Ed Kellett2021-03-011-0/+11
* Add a cap_change hookGravatar Ed Kellett2020-10-241-0/+9
* Refactor common channel iterationGravatar Ed Kellett2020-10-191-1/+2
* Use linear channel list comparisonsGravatar Ed Kellett2020-10-191-2/+9
* Merge pull request #327 from edk0/filter-quit•••filter quit messagesGravatar Aaron Jones2020-06-101-0/+7
|\
| * Add client_quit hookGravatar Ed Kellett2020-05-231-0/+7
* | Implement hook prioritiesGravatar Ed Kellett2020-05-011-0/+11
|/
* m_invite: Add hooks•••can_invite is called on the source server, can override channel access invite is called on the target Gravatar Ed Kellett2020-04-301-0/+1
* m_sasl: check if the agent is present after every client_exit•••When a server disconnects the client_exit hook will only be called once but there could be multiple servers and clients behind that server. After any client exits, check if the agent is still present. Gravatar Simon Arlott2018-08-121-0/+1
* Use const hook data where possible•••core/m_nick.c: In function `change_remote_nick': core/m_nick.c:745: warning: assignment discards qualifiers from pointer target type Gravatar Simon Arlott2016-10-301-1/+1
* Add hook for when rehash is called.•••This will be used by the future alias module. Gravatar Elizabeth Myers2016-04-061-0/+6
* Remove $Id tags from everything.•••These are obsolete and none have changed since 10 years gao... Gravatar Elizabeth Myers2016-03-061-2/+0
* hook: allow hook_data to have non-const arguments, add hook_cdata for argumen...Gravatar William Pitcock2016-02-201-1/+8
* send: implement linebuf_put_msgbuf() and msgbuf_build_from(), which build the...Gravatar William Pitcock2016-02-201-0/+1
* STATS: allow modules to override normal stats requestsGravatar William Pitcock2016-01-141-0/+1
* extensions/override: display mode-change string in override messagesGravatar William Pitcock2016-01-111-0/+1
* whois: add a hook allowing for ShowChannel() behaviour to be overridden for c...Gravatar William Pitcock2016-01-051-0/+2
* override: only engage override code if we're needing to authorize a WRITE to ...Gravatar William Pitcock2015-12-101-0/+1
* Implement kill-cancelling hook.•••With this comes an example module to block the killing of services. NOTE: this will not cancel remote kills. Those are still accepted, per the TS 6 specification. Gravatar Elizabeth Myers2013-04-201-0/+1
* Add new conf_read_start and conf_read_end hooks.Gravatar Keith Buck2012-05-211-0/+2
* Call the privmsg_channel hook for part messages too.Gravatar Keith Buck2012-04-071-0/+1
* Add support for hookifying PRIVMSG/NOTICE.•••This will allow us to modularize message processing, e.g. having new modules to manipulate channel and private messages in new ways. Yes: it can be used to intercept messages, but such modules are already out in the wild for charybdis anyway -- so this doesn't really change anything there. If you are changing the text, then it is your responsibility to provide a pointer to a new buffer. This buffer should be statically allocated and stored in your module's BSS segment. We will not, and cannot, free your buffer in core, so dynamically allocated buffers will cause a memory leak. This will allow us to simplify m_message considerably, by moving channel mode logic out to their own modules. Gravatar William Pitcock2012-03-311-0/+26
* Extend hook_data_channel_activity moduledata with membership struct.Gravatar William Pitcock2010-12-061-0/+1
* can_kick hook, based on the ircd-seven one.Gravatar William Pitcock2009-04-201-0/+9
* Fix various compiler warnings.Gravatar Jilles Tjoelker2008-04-201-13/+13
* start making this compileGravatar William Pitcock2008-04-011-1/+1
* [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 Gravatar nenolod2007-01-241-0/+94