diff options
author | Attila Molnar <attilamolnar@hush.com> | 2015-11-23 11:22:03 +0100 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2015-11-23 11:22:03 +0100 |
commit | 4cdde6e77525350692f3a3776691102ff15ba96c (patch) | |
tree | f824eefbb11f37f72afe37e3f841b2d5c5ac5dcb | |
parent | bbc6a0bbbe7475e5e1d0c4f2418c6fe6e0e952b7 (diff) |
core_whowas Remove dead code
-rw-r--r-- | src/coremods/core_whowas.cpp | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/src/coremods/core_whowas.cpp b/src/coremods/core_whowas.cpp index d73fdf491..53c978ae8 100644 --- a/src/coremods/core_whowas.cpp +++ b/src/coremods/core_whowas.cpp @@ -47,23 +47,18 @@ CmdResult CommandWhowas::Handle (const std::vector<std::string>& parameters, Use else { const WhoWas::Nick::List& list = nick->entries; - if (!list.empty()) + for (WhoWas::Nick::List::const_iterator i = list.begin(); i != list.end(); ++i) { - for (WhoWas::Nick::List::const_iterator i = list.begin(); i != list.end(); ++i) - { - WhoWas::Entry* u = *i; + WhoWas::Entry* u = *i; - user->WriteNumeric(RPL_WHOWASUSER, "%s %s %s * :%s", parameters[0].c_str(), - u->ident.c_str(),u->dhost.c_str(),u->gecos.c_str()); + user->WriteNumeric(RPL_WHOWASUSER, "%s %s %s * :%s", parameters[0].c_str(), u->ident.c_str(),u->dhost.c_str(),u->gecos.c_str()); - if (user->HasPrivPermission("users/auspex")) - user->WriteNumeric(RPL_WHOWASIP, "%s :was connecting from *@%s", - parameters[0].c_str(), u->host.c_str()); + if (user->HasPrivPermission("users/auspex")) + user->WriteNumeric(RPL_WHOWASIP, "%s :was connecting from *@%s", parameters[0].c_str(), 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, "%s %s :%s", parameters[0].c_str(), (hide_server ? ServerInstance->Config->HideWhoisServer.c_str() : u->server.c_str()), signon.c_str()); - } + std::string signon = InspIRCd::TimeString(u->signon); + bool hide_server = (!ServerInstance->Config->HideWhoisServer.empty() && !user->HasPrivPermission("servers/auspex")); + user->WriteNumeric(RPL_WHOISSERVER, "%s %s :%s", parameters[0].c_str(), (hide_server ? ServerInstance->Config->HideWhoisServer.c_str() : u->server.c_str()), signon.c_str()); } } |