330 Commits

Author SHA1 Message Date
Sadie Powell
45d68e95c9 Sort opers alphabetically in /STATS P. 2023-02-27 22:11:52 +00:00
Sadie Powell
d141f9c025 Make module classes specify their priority manually. 2023-02-27 20:29:56 +00:00
Sadie Powell
23ab5cfa51 Allow modules to get/reset the cloak lists. 2023-02-14 14:24:22 +00:00
Sadie Powell
06d801b527 Merge branch 'insp3' into master. 2023-02-14 09:21:59 +00:00
Sadie Powell
297212ca4d Switch to the IRCv3 standard-replies cap.
Nothing is using this so far so I'm not counting it as a breaking
change.
2023-02-13 14:27:51 +00:00
Sadie Powell
416661d17d Add an option so local non-SSL users can be seen as securely connected. 2023-02-11 09:30:22 +00:00
Sadie Powell
e64ace4c82 Expose the removed away message in OnUserBack. 2023-02-03 09:26:31 +00:00
Sadie Powell
4472683dc7 Move CheckExemption::Call to CheckExemption::EventProvider.
Now FirstResult not a macro there's no need for this to be a free
function.
2023-01-25 03:43:40 +00:00
Sadie Powell
f3a023523f Include more stuff in the Doxygen documentation. 2023-01-24 08:02:56 +00:00
Sadie Powell
f310e1c98d Refactor the caching methods in User and rename to make more sense. 2023-01-24 02:58:46 +00:00
Sadie Powell
5c4badf8ea Replace InspIRCd::Format with fmt::format. 2023-01-23 13:07:53 +00:00
Sadie Powell
b5404f8415 Move duration functions to their own header. 2023-01-23 01:01:06 +00:00
Sadie Powell
9ed53d543f Fix Cloak::Method and Log::Method being needlessly Cullable.
If a method needs to be cullable it can inherit from that type and
pass Cullable::Deleter as a custom deleter to the shared_ptr.
2023-01-18 14:57:57 +00:00
Sadie Powell
37ff45ac56 Improve the output of /CLOAK when there are no methods available. 2023-01-14 20:28:33 +00:00
Sadie Powell
3e75792e31 Fix a Doxygen comment typo in Cloak::Method. 2023-01-14 20:28:33 +00:00
Sadie Powell
1f4ffdfee9 Various improvements to the cloak system.
- Only rewrite cloak => cloaking if the cloak_md5 module is also
  loaded.

- Include the cloak method in the link data.

- If 1206 servers are using different cloak methods then ignore
  the other data when telling operators about the link failure.

- Clean up the code in a few places.
2023-01-13 20:50:00 +00:00
Sadie Powell
b680306816 Add a new cloak system that cloaks using HMAC-SHA256.
Closes #1107.

The core of the cloaking algorithm this uses is heavily inspired
by the Plexus4 cloak_hmac_sha256 module written by Adam. I've made
a few changes to the rest of it to work more like the old InspIRCd
cloaking system as well as adding the option for configuring the
case of the character table used for cloaking.

Co-authored-by: Adam <Adam@anope.org>
Co-authored-year: 2017
2023-01-13 07:02:02 +00:00
Sadie Powell
5da15b0c5a Add the core of the new cloak implementation. 2023-01-13 07:01:03 +00:00
Sadie Powell
b2d86bb8a1 Qualify auto correctly in all cases. 2023-01-10 23:30:34 +00:00
Sadie Powell
b25cd86ddf Avoid copying shared_ptr<IOHookProvider> when not necessary. 2023-01-10 21:27:29 +00:00
Sadie Powell
8831595e1a Rework how users are assigned to connect classes.
- Move core connect class checks and <performance:clonesonconnect>
  to the core_user module.
- Add pre-change and post-change events for when a connect class
  changes.
- Split explicit class changing out into its own method.
- Remove the need to almost always call CheckClass after SetClass.
- Add use counting to the connect class instead of relying on the
  shared_ptr use count.
2023-01-08 16:28:40 +00:00
Sadie Powell
756ed58b77 Silence a Valgrind warning in SSLIOHook.
Closes #2011.
2023-01-05 17:23:54 +00:00
Sadie Powell
d7182c584c Add a helper class for creating a reference to a DNS manager. 2023-01-05 00:41:04 +00:00
Sadie Powell
26c6a8811b Allow specifying milliseconds and a timespec in the server-time API. 2023-01-04 19:56:57 +00:00
Sadie Powell
d048778f78 Merge branch 'insp3' into master. 2023-01-01 13:19:45 +00:00
InspIRCd Robot
2b810b412a Update copyright headers. 2022-12-30 11:31:28 +00:00
Sadie Powell
8025a69a53 Allow remapping mode and extban characters at load time.
Closes #1970.
2022-12-20 16:02:12 +00:00
Sadie Powell
43d48a2e98 Move extension types to their own header to speed up build times. 2022-12-19 14:18:30 +00:00
Sadie Powell
513309fc68 Fix building with the Intel C++ compiler.
- Fix adding -Wshadow in the compiler flags twice.
- Detect the new Clang-based Intel compiler as well as the old one.
- Silence some deprecation warnings using Intel syntax.
2022-12-10 06:58:39 +00:00
Sadie Powell
5e44188857 More const correctness work. 2022-12-08 10:19:47 +00:00
Sadie Powell
ce57199237 Const correct the IRCv3 standard replies API. 2022-12-06 13:02:52 +00:00
Sadie Powell
69442119e0 Fix a missing doxygen parameter. 2022-12-04 06:07:01 +00:00
Sadie Powell
d130106374 Avoid copying a shared_ptr where not actually necessary. 2022-12-01 05:39:24 +00:00
Sadie Powell
45e56e5ee1 Yet more stylistic fixes. 2022-12-01 05:25:01 +00:00
Sadie Powell
5dd3629f12 Allow attaching tags with extra info to stats rows.
Stats responses are incredibly non-standard and no clients render
them correctly. This makes using /STATS a massive pain in the ass
for users.

However, now we have message tags we have a way to fix this. We can
send a <trailing> with the message details and for clients (probably
bots) that need to parse the response we can include the specific
details in message tags enabled by the new inspircd.org/stats-tags
capability.

The average user will get this:

    :<server> 210 <nick> <stats-char> :<stats-message>

If however they enable the newcapability they will get this instead:

    @inspircd.org/stats-foo=bar;inspircd.org/stats-baz=bax :<server> 210 <nick> <stats-char> :<stats-message>
2022-11-30 04:08:30 +00:00
Sadie Powell
7a623b0663 Use T&& instead of T or const T&. 2022-11-29 06:09:01 +00:00
Sadie Powell
d5759d1de2 Extract the logic for tags that need message-tags to its own type. 2022-11-29 05:12:42 +00:00
Sadie Powell
b045f49afb Merge branch 'insp3' into master. 2022-11-24 19:16:25 +00:00
Sadie Powell
5a30466990 Add a workaround for the replies API not working with a cap reference.
A Cap::Reference can not be cast to a Cap::Capability& because it may
not be available and that would create a null reference. In v4 we can
change the API to take a Cap::Capability* but for now this is the best
we can do.
2022-11-24 19:01:22 +00:00
Sadie Powell
92739a57f6 Merge branch 'insp3' into master. 2022-11-16 16:29:12 +00:00
delthas
6939a79a67
Add support for the IRCv3 extended-monitor specification.
Co-authored-by: Sadie Powell <sadie@witchery.services>
2022-11-02 12:18:37 +00:00
Sadie Powell
41926908ec Fix some types which were missed when making stuff final. 2022-10-30 12:58:38 +00:00
Sadie Powell
6fc111ccb6 Rename session registration to connection to avoid a semantic conflict.
We previously referred to both session registration and user registration
as "registration" which is confusing for users who aren't familiar with
how IRC works.
2022-10-29 15:54:59 +01:00
Sadie Powell
859088dac5 More const correctness. 2022-10-23 14:51:33 +01:00
Sadie Powell
77a76b8553 Merge branch 'insp3' into master. 2022-10-18 12:33:09 +01:00
Sadie Powell
ad24454084 Fix an unintentional string copy in the geolocation API. 2022-10-18 12:30:15 +01:00
Sadie Powell
4dfb70a936 Add the accountnicks metadata as a replacement for user mode +r.
This isn't used much currently but in the future will allow doing
a lot of behaviour which is currently implemented in services in
the IRCd instead e.g. killing ghost clients, nickname enforcement.
2022-10-18 10:58:14 +01:00
Sadie Powell
f49cfd2f30 Merge branch 'insp3' into master. 2022-10-13 08:35:02 +01:00
Sadie Powell
59ec1f6eb6 Allow modules to control the visible channel in a WHO request. 2022-10-12 08:50:06 +01:00
Sadie Powell
a54b78fb9d Add the matched channel to the WHO request data. 2022-10-12 08:50:06 +01:00