1
0
mirror of https://github.com/anope/anope.git synced 2026-07-02 22:23:13 +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
+2 -2
View File
@@ -34,10 +34,10 @@ public:
}
/* Truncate long nicknames to nicklen characters */
unsigned nicklen = Config->GetBlock("networkinfo")->Get<unsigned>("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);
}