3549 Commits

Author SHA1 Message Date
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
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
a46b8b8ede Allow UserManager::Find{Nick,UUID,} to ignore unregistered users. 2022-10-29 13:01:42 +01:00
Sadie Powell
859088dac5 More const correctness. 2022-10-23 14:51:33 +01:00
Sadie Powell
0d686818a2 Revert the previous commit slightly to work around a bug in Clang. 2022-10-22 15:11:39 +01:00
Sadie Powell
3928f478f1 Assign more class members inline instead of in the constructor. 2022-10-21 17:15:10 +01:00
Sadie Powell
77a76b8553 Merge branch 'insp3' into master. 2022-10-18 12:33:09 +01:00
Sadie Powell
ad24454084 Fix an unintentional string copy in the geolocation API. 2022-10-18 12:30:15 +01:00
Sadie Powell
3d660b8e49 Handle renamed modules when reading the modules to load. 2022-10-18 10:59:57 +01:00
Sadie Powell
4dfb70a936 Add the accountnicks metadata as a replacement for user mode +r.
This isn't used much currently but in the future will allow doing
a lot of behaviour which is currently implemented in services in
the IRCd instead e.g. killing ghost clients, nickname enforcement.
2022-10-18 10:58:14 +01:00
Sadie Powell
edfa7270f7 Fix various inappropriate uses of UINT_MAX. 2022-10-14 12:54:36 +01:00
Sadie Powell
cf628fb946 Fix a harmless todo in clientprotocolmsg. 2022-10-14 12:20:50 +01:00
Sadie Powell
f49cfd2f30 Merge branch 'insp3' into master. 2022-10-13 08:35:02 +01:00
Sadie Powell
a4ec09b455 Clean up various socket-related code. 2022-10-12 19:34:22 +01:00
Sadie Powell
59ec1f6eb6 Allow modules to control the visible channel in a WHO request. 2022-10-12 08:50:06 +01:00
Sadie Powell
a54b78fb9d Add the matched channel to the WHO request data. 2022-10-12 08:50:06 +01:00
Sadie Powell
41d1312853 Rename User::age to User::nickchanged and fix the docs. 2022-10-11 11:12:04 +01:00
Sadie Powell
552b2db321 Mark User::Has{Command,Priv}Permission as const. 2022-10-07 21:34:37 +01:00
Sadie Powell
986b9ae594 Remove a now unused overload of ConvToStr. 2022-10-07 20:09:40 +01:00
Sadie Powell
1cdf4a5ca1 Rename user_hash to UserMap and move to usermanager. 2022-10-07 20:03:05 +01:00
Sadie Powell
45cfe11c98 Fix saving the database identifier in SQL::Provider. 2022-10-07 19:41:07 +01:00
Sadie Powell
69aab925da Modernize an old-style loop that was previously missed. 2022-10-01 22:26:26 +01:00
Sadie Powell
ee633a943c Replace foo.erase(foo.{size|end}()-1) with foo.pop_back(). 2022-10-01 22:15:23 +01:00
Sadie Powell
c7f6ffccbd Replace *foo.rbegin() with foo.end(). 2022-10-01 22:15:23 +01:00
Sadie Powell
04b4b81a0a Inline the one use of ServerNoticeAll and rm the function. 2022-10-01 02:00:48 +01:00
Sadie Powell
e4efd41a99 Use a global typedef for representing a character set. 2022-09-30 20:21:59 +01:00
Sadie Powell
44986c7976 Use auto instead of type names where the type is obvious. 2022-09-29 12:54:24 +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
c036834745 Use NOMINMAX on Windows and undefine error in the log header. 2022-09-23 22:15:02 +01:00
Sadie Powell
68fe8cb864 Merge branch 'insp3' into master. 2022-09-19 23:46:53 +01:00
Sadie Powell
72802fac3f Fix not adding tags when converting a Numeric to a Message. 2022-09-18 21:15:34 +01:00
Sadie Powell
023e3bd22e Merge branch 'insp3' into master. 2022-09-12 23:26:22 +01:00