From abba3ed1e60f6d5d1f0a69460dc864cd7b2c429a Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Mon, 3 Mar 2025 14:47:35 +0000 Subject: Use Duration::ToHuman instead of seconds in various messages. --- src/modules/m_nickflood.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/modules/m_nickflood.cpp') diff --git a/src/modules/m_nickflood.cpp b/src/modules/m_nickflood.cpp index db873d837..9aeb37a6f 100644 --- a/src/modules/m_nickflood.cpp +++ b/src/modules/m_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, INSP_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, INSP_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(INSP_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(INSP_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; } } -- cgit v1.3.1-10-gc9f91