diff options
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/m_alltime.cpp | 9 | ||||
-rw-r--r-- | src/modules/m_spanningtree.cpp | 2 |
2 files changed, 7 insertions, 4 deletions
diff --git a/src/modules/m_alltime.cpp b/src/modules/m_alltime.cpp index 4701b1cc1..0ce517886 100644 --- a/src/modules/m_alltime.cpp +++ b/src/modules/m_alltime.cpp @@ -21,11 +21,14 @@ class cmd_alltime : public command_t CmdResult Handle(const char **parameters, int pcnt, userrec *user) { char fmtdate[64]; - time_t time = ServerInstance->Time(); - strftime(fmtdate, sizeof(fmtdate), "%F %T", gmtime(&time)); + time_t now = ServerInstance->Time(); + strftime(fmtdate, sizeof(fmtdate), "%F %T", gmtime(&now)); + + // I'm too lazy to add a function to fetch the delta, so lets just cheat.. + int delta = time(NULL) - now; string msg = ":" + string(ServerInstance->Config->ServerName) + " NOTICE " + user->nick + " :Time for " + - ServerInstance->Config->ServerName + " is: " + fmtdate; + ServerInstance->Config->ServerName + " is: " + fmtdate + " (delta " + ConvToStr(delta) + " seconds)"; if (IS_LOCAL(user)) { diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp index 46eb8bbba..1751054c8 100644 --- a/src/modules/m_spanningtree.cpp +++ b/src/modules/m_spanningtree.cpp @@ -2745,7 +2745,7 @@ class TreeSocket : public InspSocket userrec* u = this->Instance->FindNick(params[1]); if (u) { - params.push_back(ConvToStr(Instance->Time(true))); + params.push_back(ConvToStr(Instance->Time(false))); params[0] = prefix; Utils->DoOneToOne(this->Instance->Config->ServerName,"TIME",params,params[0]); } |