]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_spanningtree/hmac.cpp
Clarify module mismatch message
[user/henk/code/inspircd.git] / src / modules / m_spanningtree / hmac.cpp
index 418a64724bc7fbcac3b7e8966e0b94471d581064..74462fe1c2e73b42e2f3ef3259125779da70fd0b 100644 (file)
@@ -2,7 +2,7 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  InspIRCd: (C) 2002-2008 InspIRCd Development Team
+ *  InspIRCd: (C) 2002-2009 InspIRCd Development Team
  * See: http://www.inspircd.org/wiki/index.php/Credits
  *
  * This program is free but copyrighted software; see
@@ -58,7 +58,7 @@ std::string TreeSocket::MakePass(const std::string &password, const std::string
         * Note: If m_sha256.so is not loaded, we MUST fall back to plaintext with no
         *       HMAC challenge/response.
         */
-       Module* sha256 = Instance->Modules->Find("m_sha256.so");
+       Module* sha256 = ServerInstance->Modules->Find("m_sha256.so");
        if (Utils->ChallengeResponse && sha256 && !challenge.empty())
        {
                /* XXX: This is how HMAC is supposed to be done:
@@ -89,7 +89,7 @@ std::string TreeSocket::MakePass(const std::string &password, const std::string
                return "HMAC-SHA256:"+ hmac;
        }
        else if (!challenge.empty() && !sha256)
-               Instance->Logs->Log("m_spanningtree",DEFAULT,"Not authenticating to server using SHA256/HMAC because we don't have m_sha256 loaded!");
+               ServerInstance->Logs->Log("m_spanningtree",DEFAULT,"Not authenticating to server using SHA256/HMAC because we don't have m_sha256 loaded!");
 
        return password;
 }
@@ -108,7 +108,7 @@ std::string TreeSocket::RandString(unsigned int ilength)
        {
 #ifndef WINDOWS
                if (read(f, randombuf, ilength) < 1)
-                       Instance->Logs->Log("m_spanningtree", DEFAULT, "There are crack smoking monkeys in your kernel (in other words, nonblocking /dev/urandom blocked.)");
+                       ServerInstance->Logs->Log("m_spanningtree", DEFAULT, "There are crack smoking monkeys in your kernel (in other words, nonblocking /dev/urandom blocked.)");
                close(f);
 #endif
        }
@@ -135,7 +135,7 @@ bool TreeSocket::ComparePass(const std::string &ours, const std::string &theirs)
                /* One or both of us specified hmac sha256, but we don't have sha256 module loaded!
                 * We can't allow this password as valid.
                  */
-               if (!Instance->Modules->Find("m_sha256.so") || !Utils->ChallengeResponse)
+               if (!ServerInstance->Modules->Find("m_sha256.so") || !Utils->ChallengeResponse)
                        return false;
                else
                        /* Straight string compare of hashes */