]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_alltime.cpp
Chain ValidateServerName onto ValidateHostname so that the servername gets hostname...
[user/henk/code/inspircd.git] / src / modules / m_alltime.cpp
index 75ed4f35560cf6327d28f797dacd78c5d3a2fa9c..5254025417a8d5d8f45c0886c00397c4413ad42c 100644 (file)
@@ -29,8 +29,8 @@ class CommandAlltime : public Command
        {
                char fmtdate[64];
                time_t now = ServerInstance->Time();
-               strftime(fmtdate, sizeof(fmtdate), "%F %T", gmtime(&now));
-               
+               strftime(fmtdate, sizeof(fmtdate), "%Y-%m-%d %H:%M:%S", gmtime(&now));
+
                std::string msg = ":" + std::string(ServerInstance->Config->ServerName) + " NOTICE " + user->nick + " :System time for " +
                        ServerInstance->Config->ServerName + " is: " + fmtdate;
                
@@ -40,11 +40,7 @@ class CommandAlltime : public Command
                }
                else
                {
-                       std::deque<std::string> params;
-                       params.push_back(user->nick);
-                       params.push_back(msg);
-                       Event ev((char *) &params, NULL, "send_push");
-                       ev.Send(ServerInstance);
+                       ServerInstance->PI->PushToClient(user, msg);
                }
 
                /* we want this routed out! */
@@ -71,7 +67,7 @@ class Modulealltime : public Module
        
        virtual Version GetVersion()
        {
-               return Version(1, 0, 0, 0, VF_COMMON | VF_VENDOR, API_VERSION);
+               return Version(1, 2, 0, 0, VF_COMMON | VF_VENDOR, API_VERSION);
        }
        
 };