* @param user The user issuing the command
* @return A value from CmdResult to indicate command success or failure.
*/
- CmdResult Handle(const std::vector<std::string>& parameters, User *user);
+ CmdResult Handle(const std::vector<std::string>& parameters, User* user) CXX11_OVERRIDE;
bool whomatch(User* cuser, User* user, const char* matchtext);
};
else if (opt_realname)
match = InspIRCd::Match(user->fullname, matchtext);
else if (opt_showrealhost)
- match = InspIRCd::Match(user->host, matchtext, ascii_case_insensitive_map);
+ match = InspIRCd::Match(user->GetRealHost(), matchtext, ascii_case_insensitive_map);
else if (opt_ident)
match = InspIRCd::Match(user->ident, matchtext, ascii_case_insensitive_map);
else if (opt_port)
match = InspIRCd::Match(user->awaymsg, matchtext);
else if (opt_time)
{
- long seconds = InspIRCd::Duration(matchtext);
+ time_t seconds = ServerInstance->Time() - InspIRCd::Duration(matchtext);
// Okay, so time matching, we want all users connected `seconds' ago
- if (user->signon >= ServerInstance->Time() - seconds)
+ if (user->signon >= seconds)
match = true;
}
* -- w00t
*/
if (!match)
- match = InspIRCd::Match(user->dhost, matchtext, ascii_case_insensitive_map);
+ match = InspIRCd::Match(user->GetDisplayedHost(), matchtext, ascii_case_insensitive_map);
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(opt_showrealhost ? u->host : u->dhost);
- if (!ServerInstance->Config->HideWhoisServer.empty() && !user->HasPrivPermission("servers/auspex"))
- wholine.push(ServerInstance->Config->HideWhoisServer);
+ wholine.push(u->GetHost(opt_showrealhost));
+ 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':