aboutsummaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree/hmac.cpp
diff options
context:
space:
mode:
authorGravatar danieldg2010-01-15 19:46:01 +0000
committerGravatar danieldg2010-01-15 19:46:01 +0000
commit33318dd6fbc2fa38ccf16ca90a95666f28d860b3 (patch)
tree286968ccc2195b8c68f57e47ff431381014e6515 /src/modules/m_spanningtree/hmac.cpp
parentAllow regex engine to be omitted in configuration to use automatic binding (diff)
Add CAPAB CHANMODES, CAPAB USERMODES to verify matching of modes by name, not just by letter
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12262 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_spanningtree/hmac.cpp')
-rw-r--r--src/modules/m_spanningtree/hmac.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/modules/m_spanningtree/hmac.cpp b/src/modules/m_spanningtree/hmac.cpp
index 573dada4f..172883f3f 100644
--- a/src/modules/m_spanningtree/hmac.cpp
+++ b/src/modules/m_spanningtree/hmac.cpp
@@ -29,22 +29,22 @@
const std::string& TreeSocket::GetOurChallenge()
{
- return this->ourchallenge;
+ return capab->ourchallenge;
}
void TreeSocket::SetOurChallenge(const std::string &c)
{
- this->ourchallenge = c;
+ capab->ourchallenge = c;
}
const std::string& TreeSocket::GetTheirChallenge()
{
- return this->theirchallenge;
+ return capab->theirchallenge;
}
void TreeSocket::SetTheirChallenge(const std::string &c)
{
- this->theirchallenge = c;
+ capab->theirchallenge = c;
}
std::string TreeSocket::MakePass(const std::string &password, const std::string &challenge)
@@ -130,8 +130,8 @@ std::string TreeSocket::RandString(unsigned int ilength)
bool TreeSocket::ComparePass(const Link& link, const std::string &theirs)
{
- this->auth_fingerprint = !link.Fingerprint.empty();
- this->auth_challenge = !ourchallenge.empty() && !theirchallenge.empty();
+ capab->auth_fingerprint = !link.Fingerprint.empty();
+ capab->auth_challenge = !capab->ourchallenge.empty() && !capab->theirchallenge.empty();
std::string fp;
if (GetIOHook())
@@ -143,9 +143,9 @@ bool TreeSocket::ComparePass(const Link& link, const std::string &theirs)
}
}
- if (auth_challenge)
+ if (capab->auth_challenge)
{
- std::string our_hmac = MakePass(link.RecvPass, ourchallenge);
+ std::string our_hmac = MakePass(link.RecvPass, capab->ourchallenge);
/* Straight string compare of hashes */
if (our_hmac != theirs)
@@ -158,7 +158,7 @@ bool TreeSocket::ComparePass(const Link& link, const std::string &theirs)
return false;
}
- if (auth_fingerprint)
+ if (capab->auth_fingerprint)
{
/* Require fingerprint to exist and match */
if (link.Fingerprint != fp)