]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_alltime.cpp
m_spanningtree Remove unneeded #includes
[user/henk/code/inspircd.git] / src / modules / m_alltime.cpp
index 7012fde7ec78698d765da7fd58acf614d17626a0..00bf7dcc13cc3de518dfb12f9c3b4398885e24db 100644 (file)
@@ -28,7 +28,7 @@ class CommandAlltime : public Command
  public:
        CommandAlltime(Module* Creator) : Command(Creator, "ALLTIME", 0)
        {
-               flags_needed = 'o'; syntax.clear();
+               flags_needed = 'o';
                translation.push_back(TR_END);
        }
 
@@ -38,7 +38,7 @@ class CommandAlltime : public Command
                time_t now = ServerInstance->Time();
                strftime(fmtdate, sizeof(fmtdate), "%Y-%m-%d %H:%M:%S", gmtime(&now));
 
-               std::string msg = ":" + std::string(ServerInstance->Config->ServerName.c_str()) + " NOTICE " + user->nick + " :System time is " + fmtdate + " (" + ConvToStr(ServerInstance->Time()) + ") on " + ServerInstance->Config->ServerName;
+               std::string msg = ":" + ServerInstance->Config->ServerName + " NOTICE " + user->nick + " :System time is " + fmtdate + " (" + ConvToStr(ServerInstance->Time()) + ") on " + ServerInstance->Config->ServerName;
 
                user->SendText(msg);
 
@@ -52,7 +52,6 @@ class CommandAlltime : public Command
        }
 };
 
-
 class Modulealltime : public Module
 {
        CommandAlltime mycommand;
@@ -60,11 +59,11 @@ class Modulealltime : public Module
        Modulealltime()
                : mycommand(this)
        {
-               ServerInstance->AddCommand(&mycommand);
        }
 
-       virtual ~Modulealltime()
+       void init()
        {
+               ServerInstance->Modules->AddService(mycommand);
        }
 
        virtual Version GetVersion()