summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-03-16 17:53:53 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-03-16 17:53:53 +0000
commit0ce46290aeca32e386961a6c79f04113f59fccd7 (patch)
treedf64c99f6f269263f4c6253723cab2b04006842f
parent5bbc794c7db6363e8f43b69a6f19307dfc411a04 (diff)
Improve this to show time with and without delta, without the user having to work it out in their head
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6684 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/modules/m_alltime.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/modules/m_alltime.cpp b/src/modules/m_alltime.cpp
index 81a3fbf39..3356974c6 100644
--- a/src/modules/m_alltime.cpp
+++ b/src/modules/m_alltime.cpp
@@ -30,13 +30,16 @@ class cmd_alltime : public command_t
CmdResult Handle(const char **parameters, int pcnt, userrec *user)
{
char fmtdate[64];
- time_t now = ServerInstance->Time();
+ char fmtdate2[64];
+ time_t now = ServerInstance->Time(false);
strftime(fmtdate, sizeof(fmtdate), "%F %T", gmtime(&now));
+ now = ServerInstance->Time(true);
+ strftime(fmtdate2, sizeof(fmtdate2), "%F %T", gmtime(&now));
int delta = ServerInstance->GetTimeDelta();
- string msg = ":" + string(ServerInstance->Config->ServerName) + " NOTICE " + user->nick + " :Time for " +
- ServerInstance->Config->ServerName + " is: " + fmtdate + " (delta " + ConvToStr(delta) + " seconds)";
+ string msg = ":" + string(ServerInstance->Config->ServerName) + " NOTICE " + user->nick + " :System time for " +
+ ServerInstance->Config->ServerName + " is: " + fmtdate + " (delta " + ConvToStr(delta) + " seconds): Time with delta: "+ fmtdate2;
if (IS_LOCAL(user))
{