X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_alltime.cpp;h=58f7c4fb5a484f4076a661f10c8f8371f6d38091;hb=d736eba00b274c87662bd73a3acf8288135643d6;hp=aba8fe7fe1489223b5b0b044d7029728e710511b;hpb=46a39046196f55b52336e19662bb7bac85b731ac;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_alltime.cpp b/src/modules/m_alltime.cpp index aba8fe7fe..58f7c4fb5 100644 --- a/src/modules/m_alltime.cpp +++ b/src/modules/m_alltime.cpp @@ -21,15 +21,12 @@ #include "inspircd.h" -/* $ModDesc: Display timestamps from all servers connected to the network */ - class CommandAlltime : public Command { public: CommandAlltime(Module* Creator) : Command(Creator, "ALLTIME", 0) { - flags_needed = 'o'; syntax.clear(); - translation.push_back(TR_END); + flags_needed = 'o'; } CmdResult Handle(const std::vector ¶meters, User *user) @@ -38,7 +35,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,22 +49,16 @@ class CommandAlltime : public Command } }; - class Modulealltime : public Module { CommandAlltime mycommand; public: Modulealltime() : mycommand(this) - { - ServerInstance->AddCommand(&mycommand); - } - - virtual ~Modulealltime() { } - virtual Version GetVersion() + Version GetVersion() CXX11_OVERRIDE { return Version("Display timestamps from all servers connected to the network", VF_OPTCOMMON | VF_VENDOR); }