1
0
mirror of https://github.com/anope/anope.git synced 2026-06-25 05:56:38 +02:00

If the IRCd sends a field limit then use it over that of the config.

This commit is contained in:
Sadie Powell
2024-02-22 15:58:23 +00:00
parent 84ad85ee85
commit c4e9c0bf85
22 changed files with 251 additions and 163 deletions
+4 -4
View File
@@ -124,9 +124,9 @@ public:
if (!user.empty())
{
if (user.length() > Config->GetBlock("networkinfo")->Get<unsigned>("userlen"))
if (user.length() > IRCD->GetMaxUser())
{
source.Reply(HOST_SET_IDENTTOOLONG, Config->GetBlock("networkinfo")->Get<unsigned>("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<unsigned>("hostlen"))
if (host.length() > IRCD->GetMaxHost())
{
source.Reply(HOST_SET_TOOLONG, Config->GetBlock("networkinfo")->Get<unsigned>("hostlen"));
source.Reply(HOST_SET_TOOLONG, IRCD->GetMaxHost());
return;
}