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.
If a server has a conditional cloak method (e.g. account) as the
primary cloak method it doesn't make sense to use it for link
consistency. With this change a secondary cloak method can request
that it is used instead of the primary if the primary does not
mark itself as link sensitive.
- Only rewrite cloak => cloaking if the cloak_md5 module is also
loaded.
- Include the cloak method in the link data.
- If 1206 servers are using different cloak methods then ignore
the other data when telling operators about the link failure.
- Clean up the code in a few places.
Closes#1107.
The core of the cloaking algorithm this uses is heavily inspired
by the Plexus4 cloak_hmac_sha256 module written by Adam. I've made
a few changes to the rest of it to work more like the old InspIRCd
cloaking system as well as adding the option for configuring the
case of the character table used for cloaking.
Co-authored-by: Adam <Adam@anope.org>
Co-authored-year: 2017
- 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.