3680 Commits

Author SHA1 Message Date
Sadie Powell
72b5aec5d5 Add the SimpleExtItem::GetRef method. 2022-12-27 19:29:43 +00:00
Sadie Powell
75de6e0d5c Add the ListExtItem extension type. 2022-12-27 18:19:10 +00:00
Sadie Powell
1c2e79ea80 Move cull_delete to be inside of Cullable. 2022-12-27 14:12:10 +00:00
Sadie Powell
193408e3b4 Replace the unused padding argument of Percent::Encode with upper. 2022-12-27 13:37:38 +00:00
Sadie Powell
b1eb362d83 Refactor SocketEngine slightly.
- Remove pointless shutdown() wrapper.
- Remove pointless bounds checking function.
- Make Bind and Listen take an EventHandler instead of a fd.
- Add nullability attributes to every method.
2022-12-25 22:41:28 +00:00
Sadie Powell
7673db8d1b Pass the client/server sockaddr around as a ref instead of a ptr. 2022-12-25 13:06:50 +00:00
Sadie Powell
12518ce966 Add nullability attributes to UserManager. 2022-12-25 12:48:26 +00:00
Sadie Powell
14ab989acf Remove the string_view utility header from the global header. 2022-12-23 19:10:30 +00:00
Sadie Powell
997684e183 Fix a Doxygen documentation typo. 2022-12-20 17:17:47 +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
abc1e463a7 Move {From,To}Network from StringExtItem to SimpleExtItem. 2022-12-20 10:50:31 +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
2ddb623198 Use in_port_t instead of int/unsigned int/long. 2022-12-18 18:47:28 +00:00
Sadie Powell
3588a46e6f We actually want ADDRESS_FAMILY not SOCKET_ADDRESS for sa_family_t.
Apparently I can not read headers properly.
2022-12-18 13:44:45 +00:00
Sadie Powell
d8b4414ee1 Rework the levels things are logged at to make more sense. 2022-12-18 13:43:33 +00:00
Sadie Powell
cf3466963b Add is_local to the sockaddrs union. 2022-12-18 01:13:47 +00:00
Sadie Powell
55c1974da3 Use SOCKET_ADDRESS instead of u_short.
These are typedefs but the former is more correct.
2022-12-18 00:50:40 +00:00
Sadie Powell
bfee808f26 Fix conflicting with a predefined value on Windows.
STRICT is already defined on Windows so we'll need to do something
else here. Thanks Microsoft.
2022-12-11 10:31:00 +00:00
Sadie Powell
3c6e24665f Move <oper:autologin> from m_sslinfo to core_oper and rework.
- Promote autologin to a core concept with visibility in events.

- Replace the binary yes/no value with strict/relaxed/never. This
  intentionally breaks v3 oper block autologin as admins will need
  to review them for the security implications of the new behaviour.
2022-12-11 10:14:33 +00:00
Sadie Powell
9d35da3e84 Move password checking from core_oper into OperAccount. 2022-12-10 15:30:51 +00:00
Sadie Powell
86b4a0853e Remove the unused Extensible* parameter to PassCompare/OnPassCompare. 2022-12-10 15:22:15 +00:00
Sadie Powell
52e048b214 Allow modules to ignore any checks from OnPreOperLogin. 2022-12-10 14:58:48 +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
175bf0fa91 Merge branch 'insp3' into master. 2022-11-30 21:33:29 +00:00
Sadie Powell
1c68f3d2e2 Mark the entire client protocol namespace as CoreExport. 2022-11-30 21:11:40 +00:00
Sadie Powell
e2243c3aae Merge branch 'insp3' into master. 2022-11-30 11:04:30 +00:00
Sadie Powell
894e9d8ddc Add a method for quickly escaping a tag value. 2022-11-30 10:46:26 +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
bfd4c5d44e Add a method for quickly escaping a tag value. 2022-11-30 03:26:38 +00:00
Sadie Powell
7b3e961782 Make it easier to add tags to a numeric. 2022-11-30 02:22:51 +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
f9ef385b89 Move the oper statistics to core_oper and rewrite.
The numerics we used previously were not being used according to
the RFC and every implementation has their own behaviour here which
makes it hard for clients to do anything reasonable. Instead of this
using the generic stats numeric makes a lot more sense.
2022-11-29 04:52:42 +00:00
Sadie Powell
ee44af8d04 Refactor the internals of the oper system.
- Allow overriding privileges from the <class> blocks in the <type>
  and <oper> blocks.
- Separate oper types from oper accounts in the code. This enables
  moving some core stuff out of the config tag later.
- Merge the config tags together to make a synthetic tag that can
  have getXXX called on it instead of using getConfig and then
  converting it.
- Move the details of Have*Permission into the oper type class.
- Improve oper events to allow modules to easily hook into the oper
  system.
2022-11-28 02:57:50 +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
07246800fd Use string_view in IsNick/IsIdent/IsChannel. 2022-11-21 13:14:19 +00:00
Sadie Powell
53dde3894b Fix iterator_range when the range points to a string_view. 2022-11-21 12:27:17 +00:00
Sadie Powell
c4fa62c9ca Add a typedef for sa_family_t on Windows. 2022-11-16 17:00:08 +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
ac377bdee5 Slim down the forward declarations in typedefs. 2022-10-29 18:05:15 +01:00
Sadie Powell
561fe0fe64 Clean up the typedefs for OnBuildNeighborList. 2022-10-29 17:38:58 +01:00
Sadie Powell
8af4e2f9a2 Move xline-related typedefs from typedefs to the xline header. 2022-10-29 17:06:29 +01:00