X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_alltime.cpp;h=00bf7dcc13cc3de518dfb12f9c3b4398885e24db;hb=551d687ec6d7ce44be35fae0dd7345fe73c4f63a;hp=29a0ee42c6ddc63a8959f3994fb2d96585710603;hpb=ba5c0db795824c3fc1ad48ce332d7bdc440cb77f;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_alltime.cpp b/src/modules/m_alltime.cpp index 29a0ee42c..00bf7dcc1 100644 --- a/src/modules/m_alltime.cpp +++ b/src/modules/m_alltime.cpp @@ -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()