diff options
| author | 2023-06-29 16:29:56 +0100 | |
|---|---|---|
| committer | 2023-06-29 17:01:25 +0100 | |
| commit | 29705306f21d713c2928d8896f48a3cbb640eacc (patch) | |
| tree | 5642409ba5a61ab578eb84a11cce5ba81e493187 /src/modules/m_ircv3_chghost.cpp | |
| parent | Merge branch 'insp3' into master. (diff) | |
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.
Diffstat (limited to 'src/modules/m_ircv3_chghost.cpp')
| -rw-r--r-- | src/modules/m_ircv3_chghost.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/modules/m_ircv3_chghost.cpp b/src/modules/m_ircv3_chghost.cpp index 97a09e2fc..cf1131b4f 100644 --- a/src/modules/m_ircv3_chghost.cpp +++ b/src/modules/m_ircv3_chghost.cpp @@ -31,14 +31,14 @@ class ModuleIRCv3ChgHost final ClientProtocol::EventProvider protoevprov; Monitor::API monitorapi; - void DoChgHost(User* user, const std::string& ident, const std::string& host) + void DoChgHost(User* user, const std::string& username, const std::string& hostname) { if (!(user->connected & User::CONN_NICKUSER)) return; ClientProtocol::Message msg("CHGHOST", user); - msg.PushParamRef(ident); - msg.PushParamRef(host); + msg.PushParamRef(username); + msg.PushParamRef(hostname); ClientProtocol::Event protoev(protoevprov, msg); IRCv3::WriteNeighborsWithCap res(user, protoev, cap, true); Monitor::WriteWatchersWithCap(monitorapi, user, protoev, cap, res.GetAlreadySentId()); @@ -53,14 +53,14 @@ public: { } - void OnChangeIdent(User* user, const std::string& newident) override + void OnChangeUser(User* user, const std::string& newuser) override { - DoChgHost(user, newident, user->GetDisplayedHost()); + DoChgHost(user, newuser, user->GetDisplayedHost()); } void OnChangeHost(User* user, const std::string& newhost) override { - DoChgHost(user, user->ident, newhost); + DoChgHost(user, user->GetDisplayedUser(), newhost); } }; |
