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/hostserv/hs_request.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'modules/hostserv/hs_request.cpp') diff --git a/modules/hostserv/hs_request.cpp b/modules/hostserv/hs_request.cpp index 25f089647..44612ada0 100644 --- a/modules/hostserv/hs_request.cpp +++ b/modules/hostserv/hs_request.cpp @@ -124,9 +124,9 @@ public: if (!user.empty()) { - if (user.length() > Config->GetBlock("networkinfo")->Get("userlen")) + if (user.length() > IRCD->GetMaxUser()) { - source.Reply(HOST_SET_IDENTTOOLONG, Config->GetBlock("networkinfo")->Get("userlen")); + source.Reply(HOST_SET_IDENTTOOLONG, IRCD->GetMaxUser()); return; } else if (!IRCD->CanSetVIdent) @@ -144,9 +144,9 @@ public: } } - if (host.length() > Config->GetBlock("networkinfo")->Get("hostlen")) + if (host.length() > IRCD->GetMaxHost()) { - source.Reply(HOST_SET_TOOLONG, Config->GetBlock("networkinfo")->Get("hostlen")); + source.Reply(HOST_SET_TOOLONG, IRCD->GetMaxHost()); return; } -- cgit