# instead of the server names in the quit message, #
# identical to the way IRCu displays them. #
# #
+# hidewhois - When defined with a non-empty value, the given #
+# text will be used in place of the user's server #
+# in WHOIS, when a user is WHOISed by a non-oper. #
+# For example, most nets will want to set this to #
+# something like '*.netname.net' to conceal the #
+# actual server the user is on. #
+# #
<options prefixquit="Quit: "
loglevel="default"
customversion=""
maxtargets="20"
hidesplits="no"
+ hidewhois=""
allowhalfop="yes">
*/
bool HideSplits;
+ /** Set to a non-empty string to obfuscate the server name of users in WHOIS
+ */
+ char HideWhoisServer[MAXBUF];
+
/** A list of IP addresses the server is listening
* on.
*/
WriteServ(user->fd,"319 %s %s :%s",user->nick, dest->nick, cl.c_str());
}
}
- WriteServ(user->fd,"312 %s %s %s :%s",user->nick, dest->nick, dest->server, GetServerDescription(dest->server).c_str());
+ if (*Config->HideWhoisServer)
+ {
+ WriteServ(user->fd,"312 %s %s %s :%s",user->nick, dest->nick, *user->oper ? dest->server : Config->HideWhoisServer, *user->oper ? GetServerDescription(dest->server).c_str() : Config->Network);
+ }
+ else
+ {
+ WriteServ(user->fd,"312 %s %s %s :%s",user->nick, dest->nick, dest->server, GetServerDescription(dest->server).c_str());
+ }
if (*dest->awaymsg)
{
WriteServ(user->fd,"301 %s %s :%s",user->nick, dest->nick, dest->awaymsg);
{
this->ClearStack();
*ServerName = *Network = *ServerDesc = *AdminName = '\0';
- *AdminEmail = *AdminNick = *diepass = *restartpass = '\0';
+ *HideWhoisServer = *AdminEmail = *AdminNick = *diepass = *restartpass = '\0';
*CustomVersion = *motd = *rules = *PrefixQuit = *DieValue = *DNSServer = '\0';
*OperOnlyStats = *ModPath = *MyExecutable = *DisabledCommands = *PID = '\0';
log_file = NULL;
ConfValue("options","customversion",0,Config->CustomVersion,&Config->config_f);
ConfValue("options","maxtargets",0,MT,&Config->config_f);
ConfValue("options","hidesplits",0,HS,&Config->config_f);
+ ConfValue("options","hidewhois",0,Config->HideWhoisServer,&Config->config_f);
Config->HideSplits = ((*HS == 'y') || (*HS == 'Y') || (*HS == '1') || (*HS == 't') || (*HS == 'T'));
Config->SoftLimit = atoi(SLIMT);