]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_alltime.cpp
Someone is getting slapped for this; the new hidesplits/hidebans behavior doesn't...
[user/henk/code/inspircd.git] / src / modules / m_alltime.cpp
index 4701b1cc1789844b29779906e39e62dfc930168d..81a3fbf399e73ff311486ef4bd02d0022bc42086 100644 (file)
@@ -1,6 +1,15 @@
-/* Written by Special (john@yarbbles.com) */
-
-using namespace std;
+/*       +------------------------------------+
+ *       | Inspire Internet Relay Chat Daemon |
+ *       +------------------------------------+
+ *
+ *  InspIRCd: (C) 2002-2007 InspIRCd Development Team
+ * See: http://www.inspircd.org/wiki/index.php/Credits
+ *
+ * This program is free but copyrighted software; see
+ *            the file COPYING for details.
+ *
+ * ---------------------------------------------------
+ */
 
 #include <stdio.h>
 #include <string>
@@ -21,11 +30,13 @@ 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));
+               
+               int delta = ServerInstance->GetTimeDelta();
                
                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))
                {