diff options
author | Peter Powell <petpow@saberuk.com> | 2017-12-03 13:40:33 +0000 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2017-12-23 12:18:27 +0000 |
commit | 3adafd95820df664006f81e2b3b7453747957ab1 (patch) | |
tree | 8ab0b455c96a4839e9b6c0161737a3379900e113 | |
parent | 57330e973b3eb1f2a84803c84daf9d6b420859fd (diff) |
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
-rw-r--r-- | src/server.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
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 |