aboutsummaryrefslogtreecommitdiffstats
path: root/modules/joinflood.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/joinflood.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/joinflood.cpp')
-rw-r--r--modules/joinflood.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/joinflood.cpp b/modules/joinflood.cpp
index 654f74441..0e2f40f22 100644
--- a/modules/joinflood.cpp
+++ b/modules/joinflood.cpp
@@ -28,6 +28,7 @@
#include "extension.h"
#include "modules/server.h"
#include "numerichelper.h"
+#include "timeutils.h"
// The number of seconds the channel will be closed for.
static unsigned int duration;
@@ -201,8 +202,8 @@ public:
f->lock();
PrefixMode* pm = ServerInstance->Modes.FindNearestPrefixMode(notifyrank);
- memb->chan->WriteNotice(FMT::format("This channel has been closed to new users for {} seconds because there have been more than {} joins in {} seconds.",
- duration, f->joins, f->secs), pm ? pm->GetPrefix() : 0);
+ memb->chan->WriteNotice(FMT::format("This channel has been closed to new users for {} because there have been more than {} joins in {}.",
+ Duration::ToHuman(duration), f->joins, Duration::ToHuman(f->secs)), pm ? pm->GetPrefix() : 0);
}
}
}