diff options
author | Peter Powell <petpow@saberuk.com> | 2017-12-15 23:26:15 +0000 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2017-12-22 01:11:14 +0000 |
commit | e467fd0a6fc9ba97b2e2f31e654803a86bbb307f (patch) | |
tree | 5bd77f62832b7baac95223d9f320eb53e6c4b4bf /src/coremods | |
parent | 35a37bf46f2d2af8b346671de5d80d1073e5edb6 (diff) |
Rename <security:hidewhois> to <security:hideserver>.
The previous name was horrible and didn't describe what the setting
actually does.
Diffstat (limited to 'src/coremods')
-rw-r--r-- | src/coremods/core_who.cpp | 12 | ||||
-rw-r--r-- | src/coremods/core_whois.cpp | 10 | ||||
-rw-r--r-- | src/coremods/core_whowas.cpp | 4 |
3 files changed, 13 insertions, 13 deletions
diff --git a/src/coremods/core_who.cpp b/src/coremods/core_who.cpp index 5a3db9f83..29feefc2b 100644 --- a/src/coremods/core_who.cpp +++ b/src/coremods/core_who.cpp @@ -166,8 +166,8 @@ bool CommandWho::whomatch(User* cuser, User* user, const char* matchtext) if (!match) match = InspIRCd::Match(user->nick, matchtext); - /* Don't allow server name matches if HideWhoisServer is enabled, unless the command user has the priv */ - if (!match && (ServerInstance->Config->HideWhoisServer.empty() || cuser->HasPrivPermission("users/auspex"))) + /* Don't allow server name matches if HideServer is enabled, unless the command user has the priv */ + if (!match && (ServerInstance->Config->HideServer.empty() || cuser->HasPrivPermission("users/auspex"))) match = InspIRCd::Match(user->server->GetName(), matchtext); return match; @@ -199,8 +199,8 @@ void CommandWho::SendWhoLine(User* user, const std::vector<std::string>& parms, Numeric::Numeric wholine(RPL_WHOREPLY); wholine.push(memb ? memb->chan->name : "*").push(u->ident); wholine.push(u->GetHost(opt_showrealhost)); - if (!ServerInstance->Config->HideWhoisServer.empty() && !user->HasPrivPermission("servers/auspex")) - wholine.push(ServerInstance->Config->HideWhoisServer); + if (!ServerInstance->Config->HideServer.empty() && !user->HasPrivPermission("servers/auspex")) + wholine.push(ServerInstance->Config->HideServer); else wholine.push(u->server->GetName()); @@ -305,11 +305,11 @@ CmdResult CommandWho::Handle (const std::vector<std::string>& parameters, User * opt_away = true; break; case 'l': - if (user->HasPrivPermission("users/auspex") || ServerInstance->Config->HideWhoisServer.empty()) + if (user->HasPrivPermission("users/auspex") || ServerInstance->Config->HideServer.empty()) opt_local = true; break; case 'f': - if (user->HasPrivPermission("users/auspex") || ServerInstance->Config->HideWhoisServer.empty()) + if (user->HasPrivPermission("users/auspex") || ServerInstance->Config->HideServer.empty()) opt_far = true; break; case 't': diff --git a/src/coremods/core_whois.cpp b/src/coremods/core_whois.cpp index 19f5a862b..b5191dabd 100644 --- a/src/coremods/core_whois.cpp +++ b/src/coremods/core_whois.cpp @@ -201,9 +201,9 @@ void CommandWhois::DoWhois(LocalUser* user, User* dest, time_t signon, unsigned SendChanList(whois); - if (!whois.IsSelfWhois() && !ServerInstance->Config->HideWhoisServer.empty() && !user->HasPrivPermission("servers/auspex")) + if (!whois.IsSelfWhois() && !ServerInstance->Config->HideServer.empty() && !user->HasPrivPermission("servers/auspex")) { - whois.SendLine(RPL_WHOISSERVER, ServerInstance->Config->HideWhoisServer, ServerInstance->Config->Network); + whois.SendLine(RPL_WHOISSERVER, ServerInstance->Config->HideServer, ServerInstance->Config->Network); } else { @@ -238,7 +238,7 @@ void CommandWhois::DoWhois(LocalUser* user, User* dest, time_t signon, unsigned FOREACH_MOD_CUSTOM(evprov, Whois::EventListener, OnWhois, (whois)); /* - * We only send these if we've been provided them. That is, if hidewhois is turned off, and user is local, or + * We only send these if we've been provided them. That is, if hideserver is turned off, and user is local, or * if remote whois is queried, too. This is to keep the user hidden, and also since you can't reliably tell remote time. -- w00t */ if ((idle) || (signon)) @@ -292,14 +292,14 @@ CmdResult CommandWhois::HandleLocal(const std::vector<std::string>& parameters, { /* * Okay. Umpteenth attempt at doing this, so let's re-comment... - * For local users (/w localuser), we show idletime if hidewhois is disabled + * For local users (/w localuser), we show idletime if hideserver is disabled * For local users (/w localuser localuser), we always show idletime, hence parameters.size() > 1 check. * For remote users (/w remoteuser), we do NOT show idletime * For remote users (/w remoteuser remoteuser), spanningtree will handle calling do_whois, so we can ignore this case. * Thanks to djGrrr for not being impatient while I have a crap day coding. :p -- w00t */ LocalUser* localuser = IS_LOCAL(dest); - if (localuser && (ServerInstance->Config->HideWhoisServer.empty() || parameters.size() > 1)) + if (localuser && (ServerInstance->Config->HideServer.empty() || parameters.size() > 1)) { idle = labs((long)((localuser->idle_lastmsg)-ServerInstance->Time())); signon = dest->signon; diff --git a/src/coremods/core_whowas.cpp b/src/coremods/core_whowas.cpp index 1f72fe2d2..f456a57db 100644 --- a/src/coremods/core_whowas.cpp +++ b/src/coremods/core_whowas.cpp @@ -67,8 +67,8 @@ CmdResult CommandWhowas::Handle (const std::vector<std::string>& parameters, Use user->WriteNumeric(RPL_WHOWASIP, parameters[0], InspIRCd::Format("was connecting from *@%s", u->host.c_str())); std::string signon = InspIRCd::TimeString(u->signon); - bool hide_server = (!ServerInstance->Config->HideWhoisServer.empty() && !user->HasPrivPermission("servers/auspex")); - user->WriteNumeric(RPL_WHOISSERVER, parameters[0], (hide_server ? ServerInstance->Config->HideWhoisServer : u->server), signon); + bool hide_server = (!ServerInstance->Config->HideServer.empty() && !user->HasPrivPermission("servers/auspex")); + user->WriteNumeric(RPL_WHOISSERVER, parameters[0], (hide_server ? ServerInstance->Config->HideServer : u->server), signon); } } |