aboutsummaryrefslogtreecommitdiff
path: root/src/modules/m_alltime.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2025-02-05 11:21:34 +0000
committerGravatar Sadie Powell2025-02-05 12:02:38 +0000
commitec57c7545db209f26a31852d64a854824198372f (patch)
treec9d0caf76c3f4fc12de7656f1354fc46a72d3b1c /src/modules/m_alltime.cpp
parentImprove the time format in TIME. (diff)
Move RPL_TIME to the numeric header, unify TIME and ALLTIME.
Diffstat (limited to 'src/modules/m_alltime.cpp')
-rw-r--r--src/modules/m_alltime.cpp9
1 files changed, 3 insertions, 6 deletions
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;
}