diff options
| author | 2021-04-17 18:52:19 +0100 | |
|---|---|---|
| committer | 2021-04-17 18:52:19 +0100 | |
| commit | 8e6b4d17d4d5fc45d2ed8c3043bed770c6d64d22 (patch) | |
| tree | 54c9b151e3812bdd49daf012ed3664c39f50b555 /src/modules/m_gateway.cpp | |
| parent | Clean up the ConvTo functions. (diff) | |
| parent | Improve the debug logging for httpd_acl auth attempts. (diff) | |
Merge branch 'insp3' into master.
Diffstat (limited to 'src/modules/m_gateway.cpp')
| -rw-r--r-- | src/modules/m_gateway.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/modules/m_gateway.cpp b/src/modules/m_gateway.cpp index e8e45ab24..dbf2d9b4c 100644 --- a/src/modules/m_gateway.cpp +++ b/src/modules/m_gateway.cpp @@ -518,11 +518,16 @@ class ModuleGateway void OnWhois(Whois::Context& whois) override { // If these fields are not set then the client is not using a gateway. - const std::string* realhost = cmdwebirc.realhost.Get(whois.GetTarget()); - const std::string* realip = cmdwebirc.realip.Get(whois.GetTarget()); + std::string* realhost = cmdwebirc.realhost.Get(whois.GetTarget()); + std::string* realip = cmdwebirc.realip.Get(whois.GetTarget()); if (!realhost || !realip) return; + // If the source doesn't have the right privs then only show the gateway name. + std::string hidden = "*"; + if (!whois.GetSource()->HasPrivPermission("users/auspex")) + realhost = realip = &hidden; + const std::string* gateway = cmdwebirc.extban.gateway.Get(whois.GetTarget()); if (gateway) whois.SendLine(RPL_WHOISGATEWAY, *realhost, *realip, "is connected via the " + *gateway + " WebIRC gateway"); |
