diff options
| author | 2025-03-03 14:47:35 +0000 | |
|---|---|---|
| committer | 2025-03-03 14:47:35 +0000 | |
| commit | abba3ed1e60f6d5d1f0a69460dc864cd7b2c429a (patch) | |
| tree | c386956c13ea8089964b5eeb0436f81c70bd3d67 /src/modules/m_nickflood.cpp | |
| parent | Add Duration::ToHuman and update messages to use it. (diff) | |
Use Duration::ToHuman instead of seconds in various messages.
Diffstat (limited to 'src/modules/m_nickflood.cpp')
| -rw-r--r-- | src/modules/m_nickflood.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
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; } } |
