From ec57c7545db209f26a31852d64a854824198372f Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Wed, 5 Feb 2025 11:21:34 +0000 Subject: Move RPL_TIME to the numeric header, unify TIME and ALLTIME. --- src/modules/m_alltime.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/modules/m_alltime.cpp') diff --git a/src/modules/m_alltime.cpp b/src/modules/m_alltime.cpp index 741e7ac06..fadb325f4 100644 --- a/src/modules/m_alltime.cpp +++ b/src/modules/m_alltime.cpp @@ -37,13 +37,10 @@ public: CmdResult Handle(User* user, const Params& parameters) override { - const std::string fmtdate = Time::ToString(ServerInstance->Time(), "%Y-%m-%d %H:%M:%S", true); + auto timestr = Time::ToString(ServerInstance->Time(), "%A, %d %B %Y @ %H:%M:%S %Z", true); + timestr += INSP_FORMAT(" ({})", ServerInstance->Time()); - std::string msg = "System time is " + fmtdate + " (" + ConvToStr(ServerInstance->Time()) + ") on " + ServerInstance->Config->ServerName; - - user->WriteRemoteNotice(msg); - - /* we want this routed out! */ + user->WriteRemoteNumeric(RPL_TIME, ServerInstance->Config->ServerName, timestr); return CmdResult::SUCCESS; } -- cgit v1.3.1-10-gc9f91