609 Commits

Author SHA1 Message Date
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
342f94ec22 Normalise the case of ServerStats. 2023-07-13 14:07:26 +01:00
Sadie Powell
1e20faa07f Misc grammar fixes. 2023-06-29 19:29:59 +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
fe4c512839 Rename duration to timeutils and relocate InspIRCd::TimeString. 2023-05-10 11:57:48 +01:00
Sadie Powell
8900f17231 Merge branch 'insp3' into master. 2023-04-28 19:30:25 +01:00
InspIRCd Robot
f2c74267ac Update copyright headers. 2023-04-28 10:21:39 +01: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
57cc457ec6 Rename some headers to match the common naming system. 2023-01-26 06:16:57 +00:00
Sadie Powell
7edc627317 Replace VAFORMAT/InspIRCd::Format/... with fmt::sprintf. 2023-01-23 13:07:53 +00:00
Sadie Powell
5c4badf8ea Replace InspIRCd::Format with fmt::format. 2023-01-23 13:07:53 +00:00
Sadie Powell
9bb0cfa4f8 Default more stuff inline in the InspIRCd class. 2023-01-23 01:09:51 +00:00
Sadie Powell
b5404f8415 Move duration functions to their own header. 2023-01-23 01:01:06 +00:00
Sadie Powell
e26cb5cacd Fix some Doxygen comment issues. 2023-01-21 13:32:53 +00:00
Sadie Powell
8856210499 Add support for SCTP listeners. 2023-01-16 21:15:55 +00:00
Sadie Powell
046b1a2b65 Remove some more unnecessary things from the global headers. 2023-01-14 10:19:38 +00:00
Sadie Powell
713b577496 Merge branch 'insp3' into master. 2023-01-13 07:46:47 +00:00
Sadie Powell
b353b799a2 Fix core_dns rejecting simple hostnames. 2023-01-13 07:23:45 +00:00
Sadie Powell
1b2916c845 Avoid copying shared_ptr<ConfigTag> when not necessary. 2023-01-10 21:27:18 +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
1c2e79ea80 Move cull_delete to be inside of Cullable. 2022-12-27 14:12:10 +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
86b4a0853e Remove the unused Extensible* parameter to PassCompare/OnPassCompare. 2022-12-10 15:22:15 +00:00
Sadie Powell
5e44188857 More const correctness work. 2022-12-08 10:19:47 +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
07246800fd Use string_view in IsNick/IsIdent/IsChannel. 2022-11-21 13:14:19 +00: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
2cfc79bfcb Rip out the extensible/user serialisation system.
This was part of a failed attempt to implement zero downtime
restarts in v3. This can be implemented in a better way but for
now its just slowing down build times so lets kill it.
2022-09-01 11:53:47 +01:00
Sadie Powell
648f813f8c Switch from NULL to nullptr. 2022-07-22 18:53:21 +01:00
Sadie Powell
b763b1e69e Merge branch 'insp3' into master. 2022-07-19 17:00:23 +01:00
Sadie Powell
42b1429b37 Also use binary exit codes in places that terminate abruptly.
This is a partial reversion of commit 57330e973b3eb1f2a84803c84daf9d6b420859fd.
2022-07-19 16:47:02 +01:00
Sadie Powell
968bf77eb4 Make dynamic a non-default header. 2022-06-26 17:06:22 +01:00
Sadie Powell
68fd81b319 Make clientprotocol{msg,event} and numericbuilder non-default headers. 2022-06-26 16:34:21 +01:00
Sadie Powell
89712e2e84 Move numerics to the source files where they are actually used. 2022-06-26 15:29:29 +01:00
Sadie Powell
3be039e332 Get rid of GetVersionString.
TODO: split fullversion/version into individual fields.
2022-05-17 18:28:16 +01:00
Sadie Powell
507887f001 Get rid of entrypoint, specify the main function name directly. 2022-05-07 20:18:15 +01:00
Sadie Powell
c382faf9c9 Rewrite the entire logging system.
- Much cleaner API for writing to the log.
- Adds support for stderr and stdout logging to the core.
- Adds support for sql and syslog logging in modules.
2022-05-01 22:07:04 +01:00
Sadie Powell
0df16f0144 Delete the old logging system. 2022-05-01 21:44:54 +01:00
Sadie Powell
af1d0f6a4b Slim down the globally included files. 2022-04-30 17:48:12 +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
d682f3f2c9 Only write to the pid file on boot.
Being able to change this after first boot is error prone and does
not work well on system-wide installs where the server needs root
to write the file.

Closes #566.
2022-04-23 09:57:52 +01:00
Sadie Powell
9fbcb685e8 Merge branch 'insp3' into master. 2022-04-21 16:32:29 +01:00
Sadie Powell
5d90fa4c6e Mark the main loop as noreturn. 2022-04-21 09:20:33 +01:00
Sadie Powell
b122c182cc Fix an outdated comment. 2022-04-20 23:57:04 +01:00
Sadie Powell
ed6e19bbd0 Fix unsigned/const keyword ordering, remove unnecessary consts. 2022-03-27 15:41:28 +01:00
Sadie Powell
4fd71323d3 Slim the included headers down more. 2022-01-26 14:00:58 +00:00
Sadie Powell
d79147e7af Abolish the infernal space before accessibility keywords. 2022-01-25 14:02:36 +00:00