aboutsummaryrefslogtreecommitdiff
path: root/modules/delaymsg.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2025-03-03 14:58:58 +0000
committerGravatar Sadie Powell2025-03-03 14:58:58 +0000
commitd4d2293244c1845d2ca44708e82cad0bd38741e5 (patch)
treee6c03e062dd5b2dc13f215169ab11455a2b89d88 /modules/delaymsg.cpp
parentMerge branch 'insp4' into master. (diff)
parentUse Duration::ToHuman instead of seconds in various messages. (diff)
Merge branch 'insp4' into master.
Diffstat (limited to 'modules/delaymsg.cpp')
-rw-r--r--modules/delaymsg.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/delaymsg.cpp b/modules/delaymsg.cpp
index dc56cf210..3ed216ea7 100644
--- a/modules/delaymsg.cpp
+++ b/modules/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 = FMT::format("You cannot send messages to this channel until you have been a member for {} seconds.", len);
+ const std::string message = FMT::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;
}