aboutsummaryrefslogtreecommitdiff
path: root/modules/nickflood.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/nickflood.cpp')
-rw-r--r--modules/nickflood.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/modules/nickflood.cpp b/modules/nickflood.cpp
index 1051861d2..91a81db55 100644
--- a/modules/nickflood.cpp
+++ b/modules/nickflood.cpp
@@ -26,6 +26,7 @@
#include "extension.h"
#include "modules/exemption.h"
#include "numerichelper.h"
+#include "timeutils.h"
// The number of seconds nickname changing will be blocked for.
static unsigned int duration;
@@ -159,8 +160,8 @@ public:
if (f->islocked())
{
- user->WriteNumeric(ERR_CANTCHANGENICK, FMT::format("{} has been locked for nickchanges for {} seconds because there have been more than {} nick changes in {} seconds",
- memb->chan->name, duration, f->nicks, f->secs));
+ user->WriteNumeric(ERR_CANTCHANGENICK, FMT::format("{} has been locked for nick changes for {} because there have been more than {} nick changes in {}",
+ memb->chan->name, Duration::ToHuman(duration), f->nicks, Duration::ToHuman(f->secs)));
return MOD_RES_DENY;
}
@@ -168,8 +169,8 @@ public:
{
f->clear();
f->lock();
- memb->chan->WriteNotice(FMT::format("No nick changes are allowed for {} seconds because there have been more than {} nick changes in {} seconds.",
- duration, f->nicks, f->secs));
+ memb->chan->WriteNotice(FMT::format("No nick changes are allowed for {} because there have been more than {} nick changes in {}.",
+ Duration::ToHuman(duration), f->nicks, Duration::ToHuman(f->secs)));
return MOD_RES_DENY;
}
}