671 Commits

Author SHA1 Message Date
InspIRCd Robot
cdd3226bef Update copyright headers. 2025-02-28 14:30:22 +00:00
Sadie Powell
b9fee8b43d Convert debug logging from string concatenation to format strings.
When running in normal mode this will prevent a bunch of expensive
string concatenation.
2025-01-23 16:35:32 +00:00
Sadie Powell
4e947b8733 Allow contrib modules to specify their own module version. 2024-07-22 16:49:41 +01:00
InspIRCd Robot
fd4c5e3840 Update copyright headers. 2024-06-21 10:36:09 +01:00
InspIRCd Robot
ae3e2db109 Update copyright headers. 2024-06-07 10:37:56 +01:00
Sadie Powell
89f1c853f7 Add nullability attributes to module functions. 2024-06-04 12:40:16 +01:00
Sadie Powell
4b6af49b43 Allow mutating the status message type in OnUserPre(Tag)Message. 2024-05-06 17:18:07 +01:00
Sadie Powell
5f6bf28684 Rename some of the Module member variables. 2024-03-04 13:18:04 +00:00
Sadie Powell
a23392459d Move DataProvider to base. 2024-01-22 17:22:38 +00:00
Sadie Powell
1d96baaf77 Remove OnPreChange{Host,RealName} events and deboolify methods.
These have not ever been used as far as I can see.
2023-06-29 22:52:07 +01:00
Sadie Powell
29705306f2 Retain the "real" username properly like we do for hostnames.
This introduces the concept of a real username. This value comes
from either the initial USER message or from an ident lookup. Doing
this allows us to use it for bans through vidents and cloaking web
client users using their remote username.

While changing this I also changed all of the uses of "ident" other
than RFC 1413 lookups and some compatibility cases to refer to
usernames as user(name) instead of ident. Our use of ident in these
places was incorrect as that only refers to the RFC 1413 response
and is not commonly used in the way we used it by any other IRC
server implementations.
2023-06-29 17:01:25 +01:00
Sadie Powell
ea85c0c6ba Fix casing of metadata in function and event names.
Metadata is one word not two so it shouldn't be capitalised like this.
2023-05-30 02:38:25 +01:00
Sadie Powell
054fd8de79 Allow modules to provide an error for when a class doesn't match. 2023-03-24 12:01:03 +00:00
Sadie Powell
1c6d20e73c Refactor the password checking API.
- Rename from (On)PassCompare to (On)CheckPassword.

- Fix the order of the arguments to be password, hash, value. This
  makes more sense than what it was previously.

- Fix the code documentation to not be complete nonsense and not
  reference ancient outdated APIs.
2023-02-28 14:38:44 +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
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
7673db8d1b Pass the client/server sockaddr around as a ref instead of a ptr. 2022-12-25 13:06:50 +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
d8b4414ee1 Rework the levels things are logged at to make more sense. 2022-12-18 13:43:33 +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
86b4a0853e Remove the unused Extensible* parameter to PassCompare/OnPassCompare. 2022-12-10 15:22:15 +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
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
561fe0fe64 Clean up the typedefs for OnBuildNeighborList. 2022-10-29 17:38:58 +01: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
89537ed2ab Fix various cases of the &* being next to the name instead of type. 2022-09-29 12:36:01 +01:00
Sadie Powell
61283b949d Refactor the core event macros. 2022-08-20 18:24:56 +01:00
Sadie Powell
5c751696d6 Rename OnSetUserIP to OnChangeRemoteAddress. 2022-08-10 22:18:06 +01:00
Sadie Powell
648f813f8c Switch from NULL to nullptr. 2022-07-22 18:53:21 +01:00
Sadie Powell
968bf77eb4 Make dynamic a non-default header. 2022-06-26 17:06:22 +01:00
Sadie Powell
c31e4c6a97 Add a typedef for a mode rank. 2022-05-17 13:45:18 +01:00
Sadie Powell
ed95dcf44a Remove unnecessary arguments to On(Post)Oper.
These are already accessible from the user object.
2022-05-07 18:01:43 +01:00
Sadie Powell
e23ee3fde1 Rewrite logging calls to use the new APIs. 2022-05-01 22:07:14 +01:00
Sadie Powell
d7912e6a3e Merge branch 'insp3' into master. 2022-04-29 11:24:05 +01:00
InspIRCd Robot
346ec99c43 Update copyright headers. 2022-04-28 18:49:16 +01:00
Sadie Powell
2d329701db Merge branch 'insp3' into master. 2022-03-11 14:52:56 +00:00
Sadie Powell
744f8b4604 Fix various minor Doxygen warnings. 2022-02-02 14:15:57 +00:00
Sadie Powell
d79147e7af Abolish the infernal space before accessibility keywords. 2022-01-25 14:02:36 +00:00
Sadie Powell
5486c0f383 Add ConnectClass::Ptr as an alias for std::shared_ptr<ConnectClass>. 2022-01-16 14:26:49 +00:00
Sadie Powell
b867007d20 Allow setting extension data on connect classes. 2022-01-16 02:19:16 +00:00
Sadie Powell
6282e1f287 Promote ExtensionItem::ExtensibleType to a top level enum class. 2021-12-23 21:34:53 +00:00
Sadie Powell
421e8c8c79 Add the final keyword to all remaining classes that can have it. 2021-12-20 20:19:40 +00:00
Sadie Powell
b7615ccd86 Merge branch 'insp3' into master. 2021-08-28 13:20:53 +01:00
InspIRCd Robot
4540162276 Update copyright headers. 2021-08-27 09:38:22 +01:00
Sadie Powell
06a96d121f Add a detach method that takes an Implementation array. 2021-08-17 13:50:51 +01:00
Sadie Powell
e0fedaacb2 Reorder some functions in the ModuleManager class. 2021-08-17 13:50:51 +01:00
Sadie Powell
d95d7fc4f5 Merge branch 'insp3' into master. 2021-07-01 12:33:51 +01:00