diff options
| author | 2025-02-05 11:21:34 +0000 | |
|---|---|---|
| committer | 2025-02-05 12:02:38 +0000 | |
| commit | ec57c7545db209f26a31852d64a854824198372f (patch) | |
| tree | c9d0caf76c3f4fc12de7656f1354fc46a72d3b1c /src/modules/m_alltime.cpp | |
| parent | Improve 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.cpp | 9 |
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; } |
