X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_alltime.cpp;h=075064c62465be4b131cdb9c6a1f647165667f52;hb=df4afba6c23c939af1013582c94138832017af4e;hp=3e634b05626229931779049607cb25b2e7d10aa2;hpb=c25a59d9036444872d831a126c6326f3d8be5e74;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_alltime.cpp b/src/modules/m_alltime.cpp index 3e634b056..075064c62 100644 --- a/src/modules/m_alltime.cpp +++ b/src/modules/m_alltime.cpp @@ -21,8 +21,6 @@ #include "inspircd.h" -/* $ModDesc: Display timestamps from all servers connected to the network */ - class CommandAlltime : public Command { public: @@ -33,9 +31,7 @@ class CommandAlltime : public Command CmdResult Handle(const std::vector ¶meters, User *user) { - char fmtdate[64]; - time_t now = ServerInstance->Time(); - strftime(fmtdate, sizeof(fmtdate), "%Y-%m-%d %H:%M:%S", gmtime(&now)); + const std::string fmtdate = InspIRCd::TimeString(ServerInstance->Time(), "%Y-%m-%d %H:%M:%S", true); std::string msg = ":" + ServerInstance->Config->ServerName + " NOTICE " + user->nick + " :System time is " + fmtdate + " (" + ConvToStr(ServerInstance->Time()) + ") on " + ServerInstance->Config->ServerName; @@ -60,11 +56,6 @@ class Modulealltime : public Module { } - void init() CXX11_OVERRIDE - { - ServerInstance->Modules->AddService(mycommand); - } - Version GetVersion() CXX11_OVERRIDE { return Version("Display timestamps from all servers connected to the network", VF_OPTCOMMON | VF_VENDOR);