summaryrefslogtreecommitdiff
path: root/src/commands
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands')
-rw-r--r--src/commands/cmd_whowas.cpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/commands/cmd_whowas.cpp b/src/commands/cmd_whowas.cpp
index b406781b1..75d1ee8ff 100644
--- a/src/commands/cmd_whowas.cpp
+++ b/src/commands/cmd_whowas.cpp
@@ -54,14 +54,6 @@ CmdResult CommandWhowas::Handle (const std::vector<std::string>& parameters, Use
for (whowas_set::iterator ux = grp->begin(); ux != grp->end(); ux++)
{
WhoWasGroup* u = *ux;
- time_t rawtime = u->signon;
- tm *timeinfo;
- char b[25];
-
- timeinfo = localtime(&rawtime);
-
- strncpy(b,asctime(timeinfo),24);
- b[24] = 0;
user->WriteNumeric(314, "%s %s %s %s * :%s",user->nick.c_str(),parameters[0].c_str(),
u->ident.c_str(),u->dhost.c_str(),u->gecos.c_str());
@@ -70,8 +62,9 @@ CmdResult CommandWhowas::Handle (const std::vector<std::string>& parameters, Use
user->WriteNumeric(379, "%s %s :was connecting from *@%s",
user->nick.c_str(), parameters[0].c_str(), u->host.c_str());
+ std::string signon = ServerInstance->TimeString(u->signon);
bool hide_server = (!ServerInstance->Config->HideWhoisServer.empty() && !user->HasPrivPermission("servers/auspex"));
- user->WriteNumeric(312, "%s %s %s :%s",user->nick.c_str(), parameters[0].c_str(), (hide_server ? ServerInstance->Config->HideWhoisServer.c_str() : u->server.c_str()), b);
+ user->WriteNumeric(312, "%s %s %s :%s",user->nick.c_str(), parameters[0].c_str(), (hide_server ? ServerInstance->Config->HideWhoisServer.c_str() : u->server.c_str()), signon.c_str());
}
}
else