From 3adafd95820df664006f81e2b3b7453747957ab1 Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Sun, 3 Dec 2017 13:40:33 +0000 Subject: Add ISUPPORT tokens for the host, line, and user length. This allows clients to accurately predict the maximum safe length of a NOTICE or PRIVMSG and truncate/split as appropriate. As proposed at https://defs.ircdocs.horse/defs/isupport.html --- src/server.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/server.cpp b/src/server.cpp index cd0889fb2..ff8f6211f 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -190,7 +190,9 @@ void ISupportManager::Build() tokens["CHANMODES"] = ServerInstance->Modes->GiveModeList(MODETYPE_CHANNEL); tokens["CHANNELLEN"] = ConvToStr(ServerInstance->Config->Limits.ChanMax); tokens["CHANTYPES"] = "#"; + tokens["HOSTLEN"] = ConvToStr(ServerInstance->Config->Limits.MaxHost); tokens["KICKLEN"] = ConvToStr(ServerInstance->Config->Limits.MaxKick); + tokens["LINELEN"] = ConvToStr(ServerInstance->Config->Limits.MaxLine); tokens["MAXTARGETS"] = ConvToStr(ServerInstance->Config->MaxTargets); tokens["MODES"] = ConvToStr(ServerInstance->Config->Limits.MaxModes); tokens["NETWORK"] = ServerInstance->Config->Network; @@ -198,6 +200,7 @@ void ISupportManager::Build() tokens["PREFIX"] = ServerInstance->Modes->BuildPrefixes(); tokens["STATUSMSG"] = ServerInstance->Modes->BuildPrefixes(false); tokens["TOPICLEN"] = ConvToStr(ServerInstance->Config->Limits.MaxTopic); + tokens["USERLEN"] = ConvToStr(ServerInstance->Config->Limits.IdentMax); tokens["VBANLIST"]; // Modules can add new tokens and also edit or remove existing tokens -- cgit v1.2.3