]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_alltime.cpp
Always deny invite to users below halfop status, move OnUserPreInvite up to above...
[user/henk/code/inspircd.git] / src / modules / m_alltime.cpp
index 1ffd7c5b5328fde941cee3c35ef1d98561a30fc2..b0ccd2886cb9faf85ab70c8be0e11120e0cc2a0b 100644 (file)
@@ -25,22 +25,22 @@ class CommandAlltime : public Command
                translation.push_back(TR_END);
        }
 
-       CmdResult Handle(const char* const* parameters, int pcnt, User *user)
+       CmdResult Handle(const std::vector<std::string> &parameters, User *user)
        {
                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;
-               
+
                if (IS_LOCAL(user))
                {
                        user->Write(msg);
                }
                else
                {
-                       ServerInstance->PI->PushToClient(user, msg);
+                       ServerInstance->PI->PushToClient(user, ":" + msg);
                }
 
                /* we want this routed out! */
@@ -60,16 +60,16 @@ class Modulealltime : public Module
                ServerInstance->AddCommand(mycommand);
 
        }
-       
+
        virtual ~Modulealltime()
        {
        }
-       
+
        virtual Version GetVersion()
        {
                return Version(1, 2, 0, 0, VF_COMMON | VF_VENDOR, API_VERSION);
        }
-       
+
 };
 
 MODULE_INIT(Modulealltime)