]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_spanningtree/capab.cpp
Remove current time parameter of the Timer constructor
[user/henk/code/inspircd.git] / src / modules / m_spanningtree / capab.cpp
index dc48c87df43534d1af9c9c8dc55520225346ff4c..e242bcd4a2ad8b044c545338ce2e987e29ba3bdd 100644 (file)
@@ -69,7 +69,7 @@ static std::string BuildModeList(ModeType type)
                        modes.push_back(mdesc);
                }
        }
-       sort(modes.begin(), modes.end());
+       std::sort(modes.begin(), modes.end());
        return irc::stringjoiner(modes);
 }
 
@@ -129,7 +129,7 @@ void TreeSocket::SendCapabilities(int phase)
 
        std::string extra;
        /* Do we have sha256 available? If so, we send a challenge */
-       if (Utils->ChallengeResponse && (ServerInstance->Modules->Find("m_sha256.so")))
+       if (ServerInstance->Modules->FindService(SERVICE_DATA, "hash/sha256"))
        {
                SetOurChallenge(ServerInstance->GenRandomStr(20));
                extra = " CHALLENGE=" + this->GetOurChallenge();
@@ -149,6 +149,7 @@ 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(MODETYPE_CHANNEL)+
@@ -311,7 +312,7 @@ bool TreeSocket::Capab(const parameterlist &params)
 
                /* Challenge response, store their challenge for our password */
                std::map<std::string,std::string>::iterator n = this->capab->CapKeys.find("CHALLENGE");
-               if (Utils->ChallengeResponse && (n != this->capab->CapKeys.end()) && (ServerInstance->Modules->Find("m_sha256.so")))
+               if ((n != this->capab->CapKeys.end()) && (ServerInstance->Modules->FindService(SERVICE_DATA, "hash/sha256")))
                {
                        /* Challenge-response is on now */
                        this->SetTheirChallenge(n->second);
@@ -323,7 +324,7 @@ bool TreeSocket::Capab(const parameterlist &params)
                }
                else
                {
-                       /* They didnt specify a challenge or we don't have m_sha256.so, we use plaintext */
+                       // They didn't specify a challenge or we don't have sha256, we use plaintext
                        if (this->LinkState == CONNECTING)
                        {
                                this->SendCapabilities(2);