]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_spanningtree/capab.cpp
Make the maximum hostname length configurable in the config.
[user/henk/code/inspircd.git] / src / modules / m_spanningtree / capab.cpp
index 07d11ad8328822e7286739f27007c4ccc1b66881..6542a1f3abb9dd758b6276be7cde14c1fd9b1d48 100644 (file)
@@ -70,8 +70,7 @@ static std::string BuildModeList(ModeType type)
                }
        }
        sort(modes.begin(), modes.end());
-       irc::stringjoiner line(modes);
-       return line.GetJoined();
+       return irc::stringjoiner(modes);
 }
 
 void TreeSocket::SendCapabilities(int phase)
@@ -150,10 +149,11 @@ void TreeSocket::SendCapabilities(int phase)
                        " MAXKICK="+ConvToStr(ServerInstance->Config->Limits.MaxKick)+
                        " MAXGECOS="+ConvToStr(ServerInstance->Config->Limits.MaxGecos)+
                        " MAXAWAY="+ConvToStr(ServerInstance->Config->Limits.MaxAway)+
+                       " MAXHOST="+ConvToStr(ServerInstance->Config->Limits.MaxHost)+
                        extra+
                        " PREFIX="+ServerInstance->Modes->BuildPrefixes()+
-                       " CHANMODES="+ServerInstance->Modes->GiveModeList(MASK_CHANNEL)+
-                       " USERMODES="+ServerInstance->Modes->GiveModeList(MASK_USER)
+                       " CHANMODES="+ServerInstance->Modes->GiveModeList(MODETYPE_CHANNEL)+
+                       " USERMODES="+ServerInstance->Modes->GiveModeList(MODETYPE_USER)
                        );
 
        this->WriteLine("CAPAB END");
@@ -284,7 +284,7 @@ bool TreeSocket::Capab(const parameterlist &params)
                }
                else if (this->capab->CapKeys.find("CHANMODES") != this->capab->CapKeys.end())
                {
-                       if (this->capab->CapKeys.find("CHANMODES")->second != ServerInstance->Modes->GiveModeList(MASK_CHANNEL))
+                       if (this->capab->CapKeys.find("CHANMODES")->second != ServerInstance->Modes->GiveModeList(MODETYPE_CHANNEL))
                                reason = "One or more of the channel modes on the remote server are invalid on this server.";
                }
 
@@ -306,7 +306,7 @@ bool TreeSocket::Capab(const parameterlist &params)
                }
                else if (this->capab->CapKeys.find("USERMODES") != this->capab->CapKeys.end())
                {
-                       if (this->capab->CapKeys.find("USERMODES")->second != ServerInstance->Modes->GiveModeList(MASK_USER))
+                       if (this->capab->CapKeys.find("USERMODES")->second != ServerInstance->Modes->GiveModeList(MODETYPE_USER))
                                reason = "One or more of the user modes on the remote server are invalid on this server.";
                }