3699 Commits

Author SHA1 Message Date
Sadie Powell
90d9d02c9e Improve the consistency of duration strings.
Unfortunately because of leap years we can't really make duration
strings exact. Because of this we have always added 6 hours on to
each year to make it correct over time.

However, we did not do this in any kind of consistent way which
resulted in weird roundtripped duration strings which made this
very confusing for users

While I'm touching the duration code I've also cleaned it up.
2025-02-28 03:55:08 +00:00
Sadie Powell
6c2100a2e4 Fix expanding paths on portable installations.
Closes #2148.
2025-02-15 14:44:39 +00:00
Sadie Powell
ec57c7545d Move RPL_TIME to the numeric header, unify TIME and ALLTIME. 2025-02-05 12:02:38 +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
c6238d80de Don't format log messages if we can't actually log them.
This should prevent debug messages from potentially causing
performance issues on production servers.
2025-01-11 16:51:34 +00:00
Sadie Powell
a494228f1e Release v4.5.0. 2025-01-04 12:10:09 +00:00
InspIRCd Robot
28ea18cfdf Update copyright headers. 2025-01-04 12:08:33 +00:00
Glen Miner
41293a058d Optimized membership lookup for large servers
On our server hosting 150K users we noticed that std::map lookups for user membership were high on the profile. Since there seemed to be no ordered iteration needed we were able to shave a few % off of the profile by changing this to a std::unordered_map
2024-12-19 14:10:08 +00:00
Sadie Powell
7734b2e0f5 Release v4.4.0. 2024-11-02 09:03:06 +00:00
InspIRCd Robot
9f0f434771 Update copyright headers. 2024-11-02 08:42:20 +00:00
Sadie Powell
11917e4c4a Use fmtlib instead of iostream in ConvToStr where available. 2024-11-01 13:17:44 +00:00
Sadie Powell
414a086449 All core numerics should be in numeric.h not in .cpp files. 2024-10-26 15:26:59 +01:00
Sadie Powell
fc9d49641f Add support for extbans without letters. 2024-10-16 12:25:20 +01:00
Sadie Powell
a9a6411051 Allow ConfigTag::getCharacter to return NUL for an empty field. 2024-10-16 11:39:59 +01:00
Sadie Powell
b21ec4e9a9 Count services in the global user count.
This behaviour was always kinda broken so lets just drop it.
2024-10-10 15:11:56 +01:00
Sadie Powell
ca6ccac8b0 Merge branch 'insp3' into insp4. 2024-10-10 15:03:21 +01:00
Sadie Powell
5eb21f239b When a server stops being ulined remove its users from the uline list. 2024-10-10 14:47:24 +01:00
Sadie Powell
d346d6783b Add the Time::FromNow helper function. 2024-10-03 10:51:21 +01:00
Sadie Powell
bd7e5fd621 Add a type alias for the extban letter type. 2024-09-27 18:38:42 +01:00
Sadie Powell
b0a73189db Clean up the names of some variables in the extban header. 2024-09-27 18:30:11 +01:00
Sadie Powell
bf53ff5084 Make Cullable::Deleter const. 2024-09-13 15:40:43 +01:00
Sadie Powell
45f10a7f6f Only remove extbans on unload if provided by the right module. 2024-09-13 11:52:26 +01:00
Sadie Powell
b5032fb641 Fix rawio logs not being written after a rehash. 2024-09-09 11:29:08 +01:00
Sadie Powell
73a98ce7be Use string_view in InspIRCd::Is{FQDN,Host,SID}. 2024-09-07 19:26:29 +01:00
Sadie Powell
83e142fa2f Release v4.3.0. 2024-09-07 11:14:08 +01:00
InspIRCd Robot
8e784862f5 Update copyright headers. 2024-09-07 11:10:36 +01:00
Sadie Powell
591cb8e0b9 Const correct the xline header. 2024-09-03 11:09:54 +01:00
Sadie Powell
42b46e794f Use auto in GetLevelRequired and GetSyntax. 2024-08-29 14:15:02 +01:00
Sadie Powell
3f7a7df740 Deprecate the raw overload of GenRandomStr in favour of GenRandom.
The raw overload was almost always misused where GenRandom would
be better.

While we're making changes to this code switch the printable mode
to use a static array like Anope does.
2024-08-27 16:31:38 +01:00
Sadie Powell
1302f6ee6d Fix the argument to BindPorts not being documented. 2024-08-27 15:09:40 +01:00
Sadie Powell
491d82677d Fix measuring the CPU load on Windows. 2024-08-27 14:48:28 +01:00
Sadie Powell
56b9a4e48e Redocument ServerStats and switch members to use size_t. 2024-08-27 14:47:35 +01:00
Sadie Powell
e6ea9f7d4a Change InspIRCd::ProcessColors to take a string instead of a vector.
This is more useful for how MOTDs are processed now as we iterate
through them anyway and this allows us to avoid a needless second
iteration.
2024-08-27 14:29:56 +01:00
Sadie Powell
8b02fef312 Fix a minor doxygen warning. 2024-08-27 13:32:30 +01:00
Sadie Powell
1bf5137a9d Use sa_family_t instead of int. 2024-08-27 13:27:17 +01:00
Sadie Powell
5176f8b1ba Refactor the InspIRCd class to be actually readable.
This has been long overdue as most of the comments were outdated
and members were shoved into the class in no logical way.
2024-08-27 13:25:12 +01:00
Sadie Powell
d2b09b931d Close loggers and notify opers if they throw any exceptions. 2024-08-23 19:47:58 +01:00
Sadie Powell
05cea6f835 Fix formatting strings on C++20 compilers. 2024-08-22 09:41:36 +01:00
Sadie Powell
15e7db5a21 Add Numeric::push_fmt(...) as shorthand for push(INSP_FORMAT(...)). 2024-08-18 16:30:55 +01:00
Sadie Powell
d95be0a516 Add a formatting overload to {Membership,User}::Write(Remote)Notice. 2024-08-18 16:19:12 +01:00
Sadie Powell
ca78bc4a0e Document Write* members in the User type correctly. 2024-08-18 15:53:01 +01:00
Sadie Powell
dd7544a9f0 Release v4.2.0. 2024-08-03 12:40:05 +01:00
InspIRCd Robot
0c6f97d7e9 Update copyright headers. 2024-08-03 12:39:33 +01:00
Sadie Powell
b514f826a9 Add ExtensionItem::OnSync which is called when an ext is synchronised. 2024-07-24 00:31:34 +01:00
Sadie Powell
a4bee21ab5 Update all usages of ProtocolServer to use Server. 2024-07-24 00:31:34 +01:00
Sadie Powell
4175ba7833 Add SendMetadata methods to Server. 2024-07-24 00:03:27 +01:00
Sadie Powell
4e947b8733 Allow contrib modules to specify their own module version. 2024-07-22 16:49:41 +01:00
InspIRCd Robot
a3b0aa484b Update copyright headers. 2024-07-14 11:58:57 +01:00
Sadie Powell
2302d6f99c Don't broadcast a ListExtItem when setting it in FromInternal. 2024-07-14 11:34:23 +01:00
Sadie Powell
9fcad237a1 Const correct numerichelper. 2024-07-13 15:11:41 +01:00