diff options
| author | 2024-12-28 12:00:48 +0000 | |
|---|---|---|
| committer | 2024-12-28 12:00:48 +0000 | |
| commit | a59366947d82ddbd532901ef6015eb94f856a51d (patch) | |
| tree | cbdd2a8eac17332f711bf16b44a8985d52dc0951 | |
| parent | Update the vendored libraries. (diff) | |
Cache RPL_CREATED and improve the format slightly.
| -rw-r--r-- | src/coremods/core_info/core_info.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/coremods/core_info/core_info.cpp b/src/coremods/core_info/core_info.cpp index 24906d0e7..4bba36636 100644 --- a/src/coremods/core_info/core_info.cpp +++ b/src/coremods/core_info/core_info.cpp @@ -73,6 +73,7 @@ private: CommandTime cmdtime; ISupportManager isupport; CommandVersion cmdversion; + Numeric::Numeric numeric003; Numeric::Numeric numeric004; /** Returns a list of user or channel mode characters. @@ -119,8 +120,11 @@ public: , cmdtime(this) , isupport(this) , cmdversion(this, isupport) + , numeric003(RPL_CREATED) , numeric004(RPL_MYINFO) { + numeric003.push(Time::ToString(ServerInstance->startup_time, "This server was created on %d %b %Y at %H:%M:%S", true)); + numeric004.push(ServerInstance->Config->GetServerName()); numeric004.push(INSPIRCD_BRANCH); } @@ -186,7 +190,7 @@ public: { user->WriteNumeric(RPL_WELCOME, INSP_FORMAT("Welcome to the {} IRC Network {}", ServerInstance->Config->Network, user->GetRealMask())); user->WriteNumeric(RPL_YOURHOST, INSP_FORMAT("Your host is {}, running version {}", ServerInstance->Config->GetServerName(), INSPIRCD_BRANCH)); - user->WriteNumeric(RPL_CREATED, Time::ToString(ServerInstance->startup_time, "This server was created %H:%M:%S %b %d %Y")); + user->WriteNumeric(numeric003); user->WriteNumeric(numeric004); isupport.SendTo(user); |
