Commit graph

4146 commits

Author SHA1 Message Date
Aaron Jones
fd241b5fc8 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.
2023-11-06 14:47:16 +00:00
Aaron Jones
3b24363e91 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.
2023-11-06 14:47:16 +00:00
Aaron Jones
c790520218 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.
2023-11-06 14:47:16 +00:00
Eric Mertens
f718aed2ae Replace free with rb_free 2023-11-06 14:22:55 +00:00
Ed Kellett
59ea3c6753 Delay rehashing until we're not processing events
Fixes crash introduced by 0ab6dbbc65. It's
probably a regression since it defeats a system designed to stop this
from happening, but I didn't dig through the history.

rehash() closes listeners. If we happen to get a single epoll() result
that wants to first rehash and then accept a connection, the epoll info
will point to a freed rb_fde_t. Other selectors should have similar
problems, but we didn't investigate that.

rb_fde_ts are normally batched up and freed outside the event
processing, but as of the above commit close_listeners() screws that up
by closing pending FDs immediately in order to create new listeners.

I think it might be a bit better to revert this behaviour and simply not
close listeners if we are going to open new ones over them, but have
opted for the smallest reasonable change I can think of.

Helped-by: Eric Mertens <emertens@gmail.com>
2023-11-06 14:22:55 +00:00
Eric Mertens
460e793274
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 information
2023-10-03 16:35:52 -07:00
Svetlana T
2a0f0393d2
document +M cmode (#417) 2023-08-29 09:12:01 -07:00
Mike Quin
1b4957f617 Terminate last line in setfilter help 2023-08-07 16:48:50 +01:00
Mike Quin
7a7aa92f8a Fix typo 2023-08-07 16:48:50 +01:00
Mike Quin
a4db1d4784 Correct order of chunking and encoding steps. 2023-08-07 16:48:50 +01:00
Mike Quin
21dbde201c Describe database loading. 2023-08-07 16:48:50 +01:00
Mike Quin
28bcd75330 Add documentation for extensions/filter 2023-08-07 16:48:50 +01:00
TheDaemoness
0ca18d072a 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".
2023-07-04 05:00:51 -05:00
Stephen Bennett
309e1e624e Clarify messages when auspex users have hidden their own idle times
Co-authored-by: Doug Freed <dwfreed@mtu.edu>
2023-07-01 22:39:11 +01:00
jesopo
fa33bdd14d prioritise telling opers that a auspexed target is +I 2023-07-01 22:39:11 +01:00
jesopo
c5a067165c show opers a reasonable message when auspex allows them to see idle time 2023-07-01 22:39:11 +01:00
Valentin Lorentz
83f7888d72 Add ACCOUNTEXTBAN ISUPPORT token
To support the draft IRCv3 spec: https://github.com/ircv3/ircv3-specifications/pull/464
2023-07-01 19:24:32 +01:00
Doug Freed
cc95a6722e modules: quietly succeed at loading a module if already loaded
This allows explicitly loading a module in the config so it's available
for later config items that might need it, and skips the double load
when main loads all modules, which would cause errors
2023-07-01 19:23:56 +01:00
Doug Freed
7a2ccb077f modules: clear module list and mod paths in init
If main is called more than once (like in tests), everything is
reinitialized except the loaded module list and module paths, so clear
them too so that modules are loaded again and the path list is correct.
2023-07-01 19:23:56 +01:00
Jess Porter
c33da0d24e
support RSFNC indicating type of FNC (e.g. FORCE vs REGAIN) (#406) 2023-07-01 19:22:40 +01:00
Aaron Jones
5ca20c098a
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#26
2023-07-01 19:16:27 +01:00
TheDaemoness
a6ad35e5d8
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>
2023-07-01 19:09:41 +01:00
David Schultz
d1c028f212
Warn opers about unresponsive servers 2023-06-13 09:13:42 -05:00
Tom Wesley
fe83a33526 Sort reps in CREDITS case insensitive alphabetically 2023-06-05 19:08:57 +01:00
Tom Wesley
2b0410bc2c Replace libera reps with amdj and spb 2023-06-03 18:48:08 +01:00
David Schultz
f5e8ad65c1 reference.conf: document hide_opers 2023-05-18 22:45:24 -05:00
David Schultz
1608b0e70e
m_shedding: user shedding module based on oftc-hybrid 2023-05-18 14:44:23 -05:00
David Schultz
a445c2ed63 doc/connecting-servers: update example atheme protocol module
Atheme has had a protocol module designed specifically for Solanum for some time now that includes proper support for new IRCd features.
2023-05-15 17:50:58 -05:00
jonesman
e593329945 Add "automake" and "libtool" to the list of packages required for building 2023-02-21 15:45:16 -05:00
Doug Freed
4a47689a35 chmode: convert bants to a proper serial
This way it increments for every change. It need not be a timestamp, as
its actual value is not important.

This fixes an issue where a ban could be set, hit, and cleared all in
the same second, and the affected client would still be cached as banned
because the bants hadn't actually changed.
2023-01-23 04:27:25 -06:00
Doug Freed
2a64b1e5b9
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.
2023-01-18 17:21:30 -05:00
Aaron Jones
e02cc991bb ircd/authproc.c: avoid crash on lack of any configured DNSBLs
Fixes fbc97166a6
Closes #396
2023-01-11 21:31:50 +00:00
Aaron Jones
7285e5febf help/opers/: add HELP entry for DEHELPER 2023-01-11 05:37:11 +00:00
Aaron Jones
fbc97166a6
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: @Unit193
2023-01-11 01:28:32 +00:00
Tobias Geerinckx-Rice
32d37a1660 strip_colour: Strip '\x11' (monospace) and '\x1e' (strikethrough)
Also clarify the comment: this function strips more than just colours.
2023-01-03 05:08:29 -06:00
Jess Porter
8e3239be2e
send RPL_LOGGEDIN to target_p upon ENCAP SU (#308) 2022-12-23 16:27:30 +00:00
JailBird
6f4dfd9c78 Remove the unused COMPRESSED flag and stats handler
- Null "compress" handler left as-is in newconf.c
2022-12-22 16:23:00 -06:00
Stephen Bennett
f26681c735 Don't crash on receiving GRANT from a server 2022-11-22 03:33:35 -06:00
JailBird
ab9f279a1d ssld: Remove unused zlib_ok variable 2022-11-09 18:14:41 -06:00
JailBird
21cc31f4e5 SET SPANNUM: Fix incorrect > 0 check to be >= 0 2022-11-09 17:56:15 -06:00
Jess Porter
3a4efe9081
CHGHOST when only case changes (#384) 2022-11-09 23:33:07 +00:00
Aaron Jones
63ee10379c
timeout_dead_authd_clients(): fix memory leak and order of operations (#385)
Ensure we deallocate the nodes created by the first loop, and zero out
the authd data after removing them from the authd clients dict.

The authd_abort_client() function already does the latter, so just call
that instead of authd_free_client().
2022-11-06 08:14:15 +00:00
Stephen Bennett
ed775e9bb4
Make auto-accept on message conditional on oper:always_message, not oper:general. This updates the test to match current behaviour of +g 2022-11-03 14:43:59 +00:00
Tobias Geerinckx-Rice
d03347cbb6 Note that messages caught in +g/+G are discarded 2022-10-26 14:08:07 -04:00
Doug Freed
7cd188a91f ircd.conf.example: reference.conf: fix invalid line wrapping 2022-10-26 12:45:49 -04:00
Aaron Jones
1548c14021
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: @Unit193
2022-10-21 08:01:41 +00:00
Doug Freed
33822550e5 librb/helper: pass our fd limit to the child
Instead of arbitrarily limiting it to 256.  This avoids an issue with 
busy authds "running out" of fds because librb says no more.
2022-10-21 03:04:09 -04:00
Unit 193
f085388a74 Unify helper snotes and make netwide. 2022-10-21 03:00:22 -04:00
Ed Kellett
06c5309534 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.
2022-10-06 17:06:28 -04:00
Jess Porter
687f290a6c
make some authd warnings L_NETWIDE 2022-10-03 20:00:21 +01:00