diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/configreader.cpp | 2 | ||||
-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 | ||||
-rw-r--r-- | src/users.cpp | 8 |
5 files changed, 18 insertions, 18 deletions
diff --git a/src/configreader.cpp b/src/configreader.cpp index ff9d5bd14..970aaba80 100644 --- a/src/configreader.cpp +++ b/src/configreader.cpp @@ -431,7 +431,7 @@ void ServerConfig::Fill() CustomVersion = security->getString("customversion"); HideSplits = security->getBool("hidesplits"); HideBans = security->getBool("hidebans"); - HideWhoisServer = security->getString("hidewhois"); + HideServer = security->getString("hideserver", security->getString("hidewhois")); HideKillsServer = security->getString("hidekills"); HideULineKills = security->getBool("hideulinekills"); RestrictBannedUsers = security->getBool("restrictbannedusers", true); 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); } } diff --git a/src/users.cpp b/src/users.cpp index ead862b7d..b3546a134 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -1163,15 +1163,15 @@ void User::PurgeEmptyChannels() const std::string& FakeUser::GetFullHost() { - if (!ServerInstance->Config->HideWhoisServer.empty()) - return ServerInstance->Config->HideWhoisServer; + if (!ServerInstance->Config->HideServer.empty()) + return ServerInstance->Config->HideServer; return server->GetName(); } const std::string& FakeUser::GetFullRealHost() { - if (!ServerInstance->Config->HideWhoisServer.empty()) - return ServerInstance->Config->HideWhoisServer; + if (!ServerInstance->Config->HideServer.empty()) + return ServerInstance->Config->HideServer; return server->GetName(); } |