diff options
| author | 2023-01-24 02:58:46 +0000 | |
|---|---|---|
| committer | 2023-01-24 02:58:46 +0000 | |
| commit | f310e1c98dc262249146025ffffb81334b38680d (patch) | |
| tree | edd19152137e71db58efc5fbd289f34ce9b6919b /src/modules/m_gateway.cpp | |
| parent | Clean up some remaining old format string stuff. (diff) | |
Refactor the caching methods in User and rename to make more sense.
Diffstat (limited to 'src/modules/m_gateway.cpp')
| -rw-r--r-- | src/modules/m_gateway.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/modules/m_gateway.cpp b/src/modules/m_gateway.cpp index a61910985..1c4e3970a 100644 --- a/src/modules/m_gateway.cpp +++ b/src/modules/m_gateway.cpp @@ -66,7 +66,7 @@ public: return true; // Does the user's IP address match this hostmask? - if (InspIRCd::MatchCIDR(user->GetIPString(), mask, ascii_case_insensitive_map)) + if (InspIRCd::MatchCIDR(user->GetAddress(), mask, ascii_case_insensitive_map)) return true; } @@ -118,7 +118,7 @@ public: return true; // Does the user's IP address match this hostmask? - if (InspIRCd::MatchCIDR(user->GetIPString(), mask, ascii_case_insensitive_map)) + if (InspIRCd::MatchCIDR(user->GetAddress(), mask, ascii_case_insensitive_map)) return true; } @@ -265,7 +265,7 @@ public: if (!ipaddr.from_ip_port(parameters[3], user->client_sa.port())) { ServerInstance->SNO.WriteGlobalSno('w', "Connecting user {} ({}) tried to use WEBIRC but gave an invalid IP address.", - user->uuid, user->GetIPString()); + user->uuid, user->GetAddress()); ServerInstance->Users.QuitUser(user, "WEBIRC: IP address is invalid: " + parameters[3]); return CmdResult::FAILURE; } @@ -273,10 +273,10 @@ public: // The user matched a WebIRC block! extban.gateway.Set(user, parameters[1]); realhost.Set(user, user->GetRealHost()); - realip.Set(user, user->GetIPString()); + realip.Set(user, user->GetAddress()); ServerInstance->SNO.WriteGlobalSno('w', "Connecting user {} is using the {} WebIRC gateway; changing their IP from {} to {}.", - user->uuid, parameters[1], user->GetIPString(), parameters[3]); + user->uuid, parameters[1], user->GetAddress(), parameters[3]); // If we have custom flags then deal with them. WebIRC::FlagMap flags; @@ -320,7 +320,7 @@ public: } ServerInstance->SNO.WriteGlobalSno('w', "Connecting user {} ({}) tried to use WEBIRC but didn't match any configured WebIRC hosts.", - user->uuid, user->GetIPString()); + user->uuid, user->GetAddress()); ServerInstance->Users.QuitUser(user, "WEBIRC: you don't match any configured WebIRC hosts."); return CmdResult::FAILURE; } @@ -455,11 +455,11 @@ public: // Store the hostname and IP of the gateway for later use. cmdwebirc.realhost.Set(user, user->GetRealHost()); - cmdwebirc.realip.Set(user, user->GetIPString()); + cmdwebirc.realip.Set(user, user->GetAddress()); const std::string& newident = host.GetIdent(); ServerInstance->SNO.WriteGlobalSno('w', "Connecting user {} is using an ident gateway; changing their IP from {} to {} and their ident from {} to {}.", - user->uuid, user->GetIPString(), address.addr(), user->ident, newident); + user->uuid, user->GetAddress(), address.addr(), user->ident, newident); user->ChangeIdent(newident); user->ChangeRemoteAddress(address); |
