]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_spanningtree/capab.cpp
m_spanningtree Replace manual string building of outgoing commands with CmdBuilder...
[user/henk/code/inspircd.git] / src / modules / m_spanningtree / capab.cpp
index fe673f5c313339e688443dcfea9f123a7162be77..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 (ServerInstance->Modules->Find("m_sha256.so"))
+       if (ServerInstance->Modules->FindService(SERVICE_DATA, "hash/sha256"))
        {
                SetOurChallenge(ServerInstance->GenRandomStr(20));
                extra = " CHALLENGE=" + this->GetOurChallenge();
@@ -312,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 ((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);
@@ -324,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);