From c4e9c0bf8548da1bf4fe2cfe5e7f5ab101b35e52 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Thu, 22 Feb 2024 15:58:23 +0000 Subject: If the IRCd sends a field limit then use it over that of the config. --- modules/operserv/os_svs.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/operserv') diff --git a/modules/operserv/os_svs.cpp b/modules/operserv/os_svs.cpp index 3a1ba29b8..ee2131c17 100644 --- a/modules/operserv/os_svs.cpp +++ b/modules/operserv/os_svs.cpp @@ -34,10 +34,10 @@ public: } /* Truncate long nicknames to nicklen characters */ - unsigned nicklen = Config->GetBlock("networkinfo")->Get("nicklen"); + size_t nicklen = IRCD->GetMaxNick(); if (newnick.length() > nicklen) { - source.Reply(_("Nick \002%s\002 was truncated to %u characters."), newnick.c_str(), nicklen); + source.Reply(_("Nick \002%s\002 was truncated to %zu characters."), newnick.c_str(), nicklen); newnick = params[1].substr(0, nicklen); } -- cgit