diff options
| author | 2025-03-03 14:47:35 +0000 | |
|---|---|---|
| committer | 2025-03-03 14:47:35 +0000 | |
| commit | abba3ed1e60f6d5d1f0a69460dc864cd7b2c429a (patch) | |
| tree | c386956c13ea8089964b5eeb0436f81c70bd3d67 /src/modules/m_delaymsg.cpp | |
| parent | Add Duration::ToHuman and update messages to use it. (diff) | |
Use Duration::ToHuman instead of seconds in various messages.
Diffstat (limited to 'src/modules/m_delaymsg.cpp')
| -rw-r--r-- | src/modules/m_delaymsg.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/modules/m_delaymsg.cpp b/src/modules/m_delaymsg.cpp index 9627223c1..4408a1654 100644 --- a/src/modules/m_delaymsg.cpp +++ b/src/modules/m_delaymsg.cpp @@ -25,6 +25,7 @@ #include "inspircd.h" #include "modules/ctctags.h" #include "modules/exemption.h" +#include "timeutils.h" #include "numerichelper.h" class DelayMsgMode final @@ -139,7 +140,8 @@ ModResult ModuleDelayMsg::HandleMessage(User* user, const MessageTarget& target) if (user->HasPrivPermission("channels/ignore-delaymsg")) return MOD_RES_PASSTHRU; - const std::string message = INSP_FORMAT("You cannot send messages to this channel until you have been a member for {} seconds.", len); + const std::string message = INSP_FORMAT("You cannot send messages to this channel until you have been a member for {}.", + Duration::ToHuman(len)); user->WriteNumeric(Numerics::CannotSendTo(channel, message)); return MOD_RES_DENY; } |
