356 Commits

Author SHA1 Message Date
Sadie Powell
a9a6411051 Allow ConfigTag::getCharacter to return NUL for an empty field. 2024-10-16 11:39:59 +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
e576498408 Add --protocoldebug, make --debug default to DEBUG not RAWIO. 2024-05-01 13:44:14 +01:00
Sadie Powell
136a1ef6a2 Add an option for including the setter's full mask in list modes. 2023-09-21 20:17:13 +01:00
Sadie Powell
e9271fcb49 Rename <options:hostintopic> to <options:maskintopic>.
This option stores the user *mask* not the user host so the old
name is incorrect.
2023-09-21 20:06:39 +01:00
Sadie Powell
2f36d0aa2d Move TokenList back to its own header and move INSP_FORMAT to compat.
This allows making stringutils an optional header given that most
of it is not used by most of the codebase.
2023-09-03 18:46:48 +01:00
Sadie Powell
681b488fc0 Update usages of stdalgo::string::equalsci to use insp::equalsci. 2023-08-11 12:03:09 +01:00
Sadie Powell
cd6784021f Make config file cache invalidation more useful. 2023-08-06 00:50:05 +01:00
Sadie Powell
e6d342d89f Make the X-line quit message format a lot more flexible. 2023-07-21 18:12:46 +01:00
Sadie Powell
6cbd7a07b0 Invalidate the file cache when reading SSL certs.
This fixes reading the same file when the SSL certs are reloaded
without a full rehash (e.g. via SIGUSR1 or /REHASH -ssl).

This also reverts 8f0d732e38.
2023-07-03 18:53:47 +01:00
Sadie Powell
386f0dafd5 Replace FileReader with something more sensible. 2023-07-03 18:43:58 +01:00
Sadie Powell
fc160b3414 Make MaxTargets a size_t. 2023-07-03 18:43:31 +01:00
Sadie Powell
130966707f Refactor the ServerConfig class.
All fields are now ordered in the most memory efficient way and all
public fields use the correct case. Every member has been redocumented
to match the current documentation style.
2023-07-03 18:43:24 +01:00
Sadie Powell
d739f3c126 Move ServerLimits inside ServerConfig. 2023-07-03 14:29:09 +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
f8614ea985 Allow customising the message shown when hiding an X-line ban. 2023-04-18 14:21:11 +01:00
Sadie Powell
166a47ac68 Remove GetSID, rename sid to ServerId. 2023-02-28 16:32:27 +00:00
Sadie Powell
d4ff568093 Make reading the core config less of a mess. 2023-01-27 04:15:36 +00:00
Sadie Powell
57cc457ec6 Rename some headers to match the common naming system. 2023-01-26 06:16:57 +00:00
Sadie Powell
af8effe4f0 Replace getInt/getUInt/getFloat with type safe templated functions. 2023-01-25 00:39:27 +00:00
Sadie Powell
babc733d2d Fix using (unsigned) long instead of (s)size_t. 2023-01-24 23:02:35 +00:00
Sadie Powell
abc5d52f13 Const correct various functions. 2023-01-11 00:56:15 +00:00
Sadie Powell
1b2916c845 Avoid copying shared_ptr<ConfigTag> when not necessary. 2023-01-10 21:27:18 +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
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
3d660b8e49 Handle renamed modules when reading the modules to load. 2022-10-18 10:59:57 +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
9203f40f41 Fix some warnings noticed by the readability-* clang-tidy checkers. 2022-09-03 23:17:05 +01:00
Sadie Powell
648f813f8c Switch from NULL to nullptr. 2022-07-22 18:53:21 +01:00
Sadie Powell
255742d311 Make getEnum use the default instead of throwing. 2022-06-25 21:08:58 +01:00
Sadie Powell
a764d29de4 Centralise the logging of malformed config values. 2022-06-25 17:05:35 +01:00
Sadie Powell
fe9107c992 Modernize the syntax of various templates. 2022-06-23 21:22:04 +01:00
Sadie Powell
73c72a51c9 Move TokenList to inspstring. 2022-06-07 20:26:38 +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
30edd1070d Merge branch 'insp3' into master. 2022-04-16 16:16:29 +01:00
Sadie Powell
79b1c44721 Add a method to ConfigTag to help with retrieving a single character. 2022-04-10 23:43:43 +01:00
Sadie Powell
414105e409 Add a typedef for the mode status bitset. 2022-03-27 16:09:19 +01:00
Sadie Powell
d79147e7af Abolish the infernal space before accessibility keywords. 2022-01-25 14:02:36 +00:00
Sadie Powell
89c89fd862 Move FilePosition to be with the config stuff it is used by. 2022-01-18 16:39:27 +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
f3fa3716e5 Fix the previous commit on Windows. 2022-01-16 00:04:06 +00:00
Sadie Powell
9059147974 Replace uses of the FileSystem class with std::filesystem. 2022-01-15 23:20:45 +00:00
Sadie Powell
52cc8a4183 Refactor CoreException and ModuleException. 2022-01-07 17:16:50 +00:00
Sadie Powell
b96af051c2 Merge branch 'insp3' into master. 2022-01-03 15:14:36 +00:00
InspIRCd Robot
adbe149c56 Update copyright headers. 2021-12-30 18:52:08 +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
2f462a6098 Merge branch 'insp3' into master. 2021-09-16 15:50:00 +01:00
Sadie Powell
1586569069 Use the network name as the description when hideserver is enabled. 2021-09-04 20:14:47 +01:00