aboutsummaryrefslogtreecommitdiffstats
path: root/modules
Commit message (Expand)AuthorAgeFilesLines
* 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-1/+2
* modules: remove unused spy code.Gravatar RealKindOne2024-07-245-146/+1
* m_stats: correct format specifiers and types•••These format specifiers were all wrong. Use the right ones. Musl time_t is always 64 bits, so promote all rb_current_time usage to 64 bits. Fixes #437Gravatar Doug Freed2024-07-241-26/+26
* m_whois: restore original multi-prefix behavior•••The original behavior has existed since before git history, and has no known impact on clients that exist today. This reverts commit 746ced2Gravatar Doug Freed2024-06-121-1/+1
* Revert "Fix WHOIS reply not respecting a lack of the multi-prefix capability"•••A server handling a remote WHOIS cannot safely use IsCapable() to determine if the client has multi-prefix enabled or not. This is because client capabilities are not shared between servers; and the IsCapable() macro dereferences source_p->localClient which will be NULL if source_p is not on this server. Instead rework the commit to always pretend that multi-prefix is not enabled, to still respect the fact that multiple prefixes should not be returned in case a client does not have multi-prefix enabled. This reverts commit 4633665ad62bdfe26529 Gravatar Aaron Jones2024-06-111-1/+1
* Fix WHOIS reply not respecting a lack of the multi-prefix capability•••Prior to this commit, RPL_WHOISCHANNELS always contained all channel membership prefixes, even when the client had not enabled the multi-prefix capability. This behaviour predates available commit history. Other ircds only return the highest prefix, as prescribed by the RFCs. Gravatar JustAnotherArchivist2024-06-111-1/+1
* m_starttls: advertise tls cap only if SSL is possibleGravatar Doug Freed2024-03-121-0/+7
* MODRESTART/MODRELOAD: Defer reloading more quickly•••Commit 41390bfe5fa3895b8dee fixed a bug whereby the processing of a MODRESTART command could result in a crash. The approach taken in this fix was to defer the reloading of all modules so that the call stack does not contain functions located in modules that are being reloaded. It did this by scheduling a one-shot timer event for 1 second in the future, in the absense of any better deferral mechanism at the time. Timers are processed by the event loop, which is core to IRCd and cannot be reloaded. Commit 59ea3c6753e80d051b20 introduced a mechanism to defer the execution of a function until all events have been processed by the event loop, in order to fix a REHASH bug that could result in a crash due to closing and reopening listener sockets with a pending socket connection event to process after the REHASH was completed. Rework commit 41390bfe5fa3895b8dee to use the new deferral mechanism introduced by commit 59ea3c6753e80d051b20 and do the same for module reloads. Gravatar Aaron Jones2023-11-201-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-0/+5
* client: refactor del_all_accepts to allow skipping own accept list•••This allows reusing this function for other uses that just need to remove this client from others' accept lists on nick change and not have duplicates of this code everywhere Gravatar Doug Freed2023-11-062-17/+5
* modules/m_oper.c: give a better error message for failure to find o:line•••The snotice sent to other opers can be misleading. For example, it will say host mismatch even if the host is correct but the username is wrong, or if the oper name given does not exist in the configuration. Gravatar Aaron Jones2023-11-061-2/+2
* modules/m_challenge.c: give a better error message for failure to find o:line•••The snotice sent to other opers can be misleading. For example, it will say host mismatch even if the host is correct but the username is wrong, or if the oper name given does not exist in the configuration. Gravatar Aaron Jones2023-11-061-2/+2
* modules/m_challenge.c: log correct mechanism•••I suspect this is a copy/paste omission when duplicating the code from modules/m_oper.c when it was created. Gravatar Aaron Jones2023-11-061-5/+5
* Replace RPL_WHOISTEXT(337) with RPL_WHOISSPECIAL(320) (#419)•••Reasons: * 337 conflicts with other IRCds use as RPL_ENDOFINVITELIST * 320 is commonly used for extra human-readable informationGravatar Eric Mertens2023-10-031-5/+5
* Clarify messages when auspex users have hidden their own idle times•••Co-authored-by: Doug Freed <dwfreed@mtu.edu>Gravatar Stephen Bennett2023-07-011-13/+11
* prioritise telling opers that a auspexed target is +IGravatar jesopo2023-07-011-7/+12
* show opers a reasonable message when auspex allows them to see idle timeGravatar jesopo2023-07-011-5/+15
* support RSFNC indicating type of FNC (e.g. FORCE vs REGAIN) (#406)Gravatar Jess Porter2023-07-011-0/+13
* Warn opers about unresponsive serversGravatar David Schultz2023-06-131-0/+5
* um_callerid: increase hook priority to restore +Rg behavior•••Before splitting things out into hooks, umode +Rg would only notify the recipient if the sender satisfied +R. This restores that behavior by making the +g hook happen after +R.Gravatar Doug Freed2023-01-181-2/+2
* authd: fix crash/restart breaking DNSBL lookups (#394)•••authd child processes are only told about configured DNSBLs when the configuration is being parsed. This is bad, because when authd crashes or is killed, IRCd will restart it, but will not tell it about any configured DNSBLs until IRCd is next rehashed. We already have a dictionary that stores configured DNSBLs (for hit statistics for `STATS n'), so store the additional needed fields in that structure, and loop over that dictionary's entries when authd is restarted, sending the fields just as if the configuration were being reloaded. Reported-By: @Unit193Gravatar Aaron Jones2023-01-111-3/+3
* send RPL_LOGGEDIN to target_p upon ENCAP SU (#308)Gravatar Jess Porter2022-12-231-0/+10
* Remove the unused COMPRESSED flag and stats handler•••- Null "compress" handler left as-is in newconf.c Gravatar JailBird2022-12-221-2/+0
* Don't crash on receiving GRANT from a serverGravatar Stephen Bennett2022-11-221-0/+6
* SET SPANNUM: Fix incorrect > 0 check to be >= 0Gravatar JailBird2022-11-091-1/+1
* Make auto-accept on message conditional on oper:always_message, not oper:gene...Gravatar Stephen Bennett2022-11-031-1/+1
* 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-3/+6
* m_sasl: Remove implicit abort on registration•••This doesn't make sense in a world where post-registration SASL is allowed, and should fix one case of an annoying login desync that's seen in the real world. Specifically, when a client sends its final AUTHENTICATE and Atheme receives it, it sends an SVSLOGIN for that client. If the client sends us its CAP END *before* we see the SVSLOGIN, the implicit abort will try to abort the SASL session that's already succeeded. Atheme interprets this as an instruction to forget about the successful SASL session; you'll connect unidentified. But it's already sent SVSLOGIN, which will log the client in ircd-side, causing ircd and services views to differ until the user authenticates again manually. I think allowing a SASL session to be aborted when it has already succeeded is an Atheme bug, and it can still be triggered without this change. But our behaviour here seems silly anyway. Gravatar Ed Kellett2022-10-061-4/+0
* Add oper:free_target (#374)•••Co-authored-by: Ed Kellett <e@kellett.im>Gravatar Jess Porter2022-09-261-1/+1
* Add umode +I to allow users to hide their idle time (#220)Gravatar David Schultz2022-08-304-13/+67
* OpenSSL 3.0 compatibility•••Edited by @aaronmdjones: - Correct some data types and casts - Minor style fixups (e.g. we put * on the variable name not the type) - librb/src/openssl.c: - Defer call of BIO_free(3ssl) to the end of the conditional block to avoid having calls to it in multiple paths - Check the return value of SSL_CTX_set0_tmp_dh_pkey(3ssl) because if it fails then we must use EVP_PKEY_free(3ssl) to avoid a memory leak This could fail if, for example, the user supplied DSA parameters in the DH parameters file instead. - ircd/newconf.c: - Check whether OSSL_DECODER_CTX_new_for_pkey(3ssl) was able to parse the given CHALLANGE public key as a valid RSA public key, and then check whether OSSL_DECODER_from_bio(3ssl) actually loads it successfully - ircd/s_newconf.c: - Use EVP_PKEY_free(3ssl) instead of OPENSSL_free(3ssl) on EVP_PKEY pointers; this will avoid inadvertent memory leaks if the EVP_PKEY structure contains any dynamically-allocated child members - modules/m_challenge.c: - Unconditionally use EVP(3ssl) to generate the SHA-1 digest of the random challenge; this API has been around for a very long time and is available in all supported versions of OpenSSL - Add lots of error checking to all steps of the process Tested against 1.1.1 and 3.0; both with missing and provided DH parameters (which works as you'd expect; the server will not negotiate a DHE cipher without them), and CHALLENGE, including missing keys or keys of the wrong type (e.g. when you supply an EdDSA key instead of an RSA key). This does break compatibility with OpenSSL 1.1.0 and below, which are now all end-of-life and unsupported anyway. Closes #357 Gravatar jailbird7772022-08-251-36/+84
* m_stats: z: remove unnecessary casting and fix format stringsGravatar Doug Freed2022-08-241-29/+29
* m_stats: z: restore total memory displayGravatar Doug Freed2022-08-241-0/+4
* um_regonlymsg: prevent unregistered users from NOTICEing +R users tooGravatar Doug Freed2022-08-241-2/+2
* EBMASK capab, to burst BMASK metadata (#354)Gravatar Jess Porter2022-08-201-49/+88
* send "End of burst" snote to L_NETWIDE (#356)Gravatar Jess Porter2022-08-191-1/+1
* Cast time_t to long long when printingGravatar Matthew Martin2022-07-014-5/+5
* global masktrace doesn't need to be an operspy actionGravatar Jess Porter2022-07-011-26/+1
* refuse opers setting an invalidly long k-line reasonGravatar Jess Porter2022-06-301-3/+5
* Illumos fixes•••- getexecname(3) returns const char * - pid_t is long Gravatar JailBird2022-06-291-2/+2
* Normalize snprintf size to use sizeof where possibleGravatar Matthew Martin2022-06-242-4/+4
* don't truncate operspy WHOGravatar Jess Porter2022-06-101-2/+6
* Add description parameter to auth blocks (#327)Gravatar Eric Mertens2022-04-142-6/+7
* Apply cmode C to replies (#328)Gravatar Eric Mertens2022-04-141-2/+4
* Make opers talking through +g controllable by user mode +M (#275)•••Times out after 30 minutes, and adds oper:always_message privilege for bots and services to always talk through +gGravatar Stephen Bennett2022-04-121-29/+203
* m_list: fail on invalid parameters•••Loose port of 6ea60b2297948211925e22bd1f284179d680b4ae. I've chosen to reduce indentation where it's convenient, and I'm allowing >-[0-9] as a way of specifying a minimum of 0 because... I don't know, it just seems neater to me. Gravatar Ed Kellett2021-10-201-25/+37
* m_list: Treat valid names with wildcards as masks•••* and ? are valid characters for channel names on IRC, and ELIST M gives no way to distinguish between `LIST #foo-*` that's meant to search for channels beginning `#foo-` and `LIST #foo-*` that's meant to list one channel named literally `#foo-*`. In order to deal with this, we will always assume a name with wildcards is a mask. If it's also a channel name, that will be listed first. Gravatar Ed Kellett2021-10-191-2/+10
* Support *mask* and !*mask* in LISTGravatar Ed Kellett2021-10-191-2/+23
* m_names: use ITER_COMM_CHANNELSGravatar Ed Kellett2021-10-171-7/+7
* Send RPL_ENDOFTRACE on local /etraceGravatar Ryan Schmidt2021-09-231-0/+3