summaryrefslogtreecommitdiff
path: root/src/commands
diff options
context:
space:
mode:
authorattilamolnar <attilamolnar@hush.com>2013-08-30 13:01:10 +0200
committerattilamolnar <attilamolnar@hush.com>2013-08-30 13:01:10 +0200
commit1031f333332cf1b09db4fd632f141143ee637c34 (patch)
tree3f2b3c08e9a743f19725da45f3879aa2bf54bfbf /src/commands
parent7432fea968127b606fc029ae462e91d3f30df8a4 (diff)
parentd54eec6dd8d44cba3c1e935f72089dbe675e0820 (diff)
Merge insp20
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