aboutsummaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree/hmac.cpp
diff options
context:
space:
mode:
authorGravatar w00t2008-09-21 12:56:03 +0000
committerGravatar w00t2008-09-21 12:56:03 +0000
commitad3524174350633c25dc8a4e5ffbb7066c4b8cba (patch)
tree32b54faeca449b75ae9bc9f839c36ef448c9dd57 /src/modules/m_spanningtree/hmac.cpp
parentFixes. Dont try and catch exceptions within the RLine ctor, we dont always wa... (diff)
Be consistent. Use ServerInstance in all places instead of 'Instance' in half. This has bugged me forever :p. I think I got all of extra/ too..
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10579 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_spanningtree/hmac.cpp')
-rw-r--r--src/modules/m_spanningtree/hmac.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/modules/m_spanningtree/hmac.cpp b/src/modules/m_spanningtree/hmac.cpp
index 418a64724..2e81dcc54 100644
--- a/src/modules/m_spanningtree/hmac.cpp
+++ b/src/modules/m_spanningtree/hmac.cpp
@@ -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 */