]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Improve the default ISUPPORT tokens.
authorPeter Powell <petpow@saberuk.com>
Wed, 14 Sep 2016 01:35:05 +0000 (02:35 +0100)
committerPeter Powell <petpow@saberuk.com>
Wed, 14 Sep 2016 14:34:14 +0000 (15:34 +0100)
- Replace the deprecated MAXCHANNELS token with CHANLIMIT.
- Remove the deprecated FNC token (other implementations can force
  a nick change without sending this token so informing clients of
  that we might force a nick change is pointless)

src/server.cpp

index 932be319e83e0670e042b53016bcf67f8464ff03..2feb08f965c3bf51748778d4c2b71ebd0bdc39ad 100644 (file)
@@ -165,13 +165,13 @@ void ISupportManager::Build()
 
        tokens["AWAYLEN"] = ConvToStr(ServerInstance->Config->Limits.MaxAway);
        tokens["CASEMAPPING"] = "rfc1459";
+       tokens["CHANLIMIT"] = InspIRCd::Format("#:%u", ServerInstance->Config->MaxChans);
        tokens["CHANMODES"] = ServerInstance->Modes->GiveModeList(MODETYPE_CHANNEL);
        tokens["CHANNELLEN"] = ConvToStr(ServerInstance->Config->Limits.ChanMax);
        tokens["CHANTYPES"] = "#";
        tokens["ELIST"] = "MU";
        tokens["KICKLEN"] = ConvToStr(ServerInstance->Config->Limits.MaxKick);
        tokens["MAXBANS"] = "64"; // TODO: make this a config setting.
-       tokens["MAXCHANNELS"] = ConvToStr(ServerInstance->Config->MaxChans);
        tokens["MAXTARGETS"] = ConvToStr(ServerInstance->Config->MaxTargets);
        tokens["MODES"] = ConvToStr(ServerInstance->Config->Limits.MaxModes);
        tokens["NETWORK"] = ServerInstance->Config->Network;
@@ -179,8 +179,7 @@ void ISupportManager::Build()
        tokens["PREFIX"] = ServerInstance->Modes->BuildPrefixes();
        tokens["STATUSMSG"] = ServerInstance->Modes->BuildPrefixes(false);
        tokens["TOPICLEN"] = ConvToStr(ServerInstance->Config->Limits.MaxTopic);
-
-       tokens["FNC"] = tokens["VBANLIST"];
+       tokens["VBANLIST"];
 
        // Modules can add new tokens and also edit or remove existing tokens
        FOREACH_MOD(On005Numeric, (tokens));