aboutsummaryrefslogtreecommitdiff
path: root/src/modules/m_joinflood.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2025-03-03 14:47:35 +0000
committerGravatar Sadie Powell2025-03-03 14:47:35 +0000
commitabba3ed1e60f6d5d1f0a69460dc864cd7b2c429a (patch)
treec386956c13ea8089964b5eeb0436f81c70bd3d67 /src/modules/m_joinflood.cpp
parentAdd Duration::ToHuman and update messages to use it. (diff)
Use Duration::ToHuman instead of seconds in various messages.
Diffstat (limited to 'src/modules/m_joinflood.cpp')
-rw-r--r--src/modules/m_joinflood.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/modules/m_joinflood.cpp b/src/modules/m_joinflood.cpp
index f7ab1efbd..0c83abefc 100644
--- a/src/modules/m_joinflood.cpp
+++ b/src/modules/m_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(INSP_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(INSP_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);
}
}
}