# be flattened when shown to non-opers.
flatlinks="no"
- # hidewhois: When defined, the given text will be used in place
- # of the server a user is on when whoised by a non-oper. Most
- # networks will want to set this to something like "*.netname.net"
- # to conceal the actual server a user is on.
- # Note that enabling this will cause users' idle times to only be
- # shown when the format /WHOIS <nick> <nick> is used.
- hidewhois=""
+ # hideserver: When defined, the given text will be used in place
+ # of the server name in public messages. As with <server:name> this
+ # does not need to resolve but does need to be a valid hostname.
+ #
+ # NOTE: enabling this will cause users' idle times to only be shown
+ # when a remote whois (/WHOIS <nick> <nick>) is used.
+ #hideserver="*.example.com"
# hidebans: If this value is set to yes, when a user is banned ([gkz]lined)
# only opers will see the ban message when the user is removed
/** True if raw I/O is being logged */
bool RawLog;
- /** Set to a non-empty string to obfuscate the server name of users in WHOIS
- */
- std::string HideWhoisServer;
+ /** Set to a non-empty string to obfuscate server names. */
+ std::string HideServer;
/** Set to a non empty string to obfuscate nicknames prepended to a KILL.
*/
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);
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;
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());
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':
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
{
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))
{
/*
* 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;
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);
}
}
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();
}