Got rid of user having one key... now both users have to add eachother with the same key

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@599 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
prozacx
2006-01-23 08:09:02 +00:00
parent 57184172db
commit f16c1175d8
+3 -8
View File
@@ -125,11 +125,6 @@ public:
MODCONSTRUCTOR(CAutoOpMod) {}
virtual bool OnLoad(const CString& sArgs) {
if (sArgs.empty() || sArgs.find(" ") != CString::npos) {
return false;
}
m_sKey = sArgs;
AddTimer(new CAutoOpTimer(this));
// Load the users
@@ -378,9 +373,10 @@ public:
// Validate before responding - don't blindly trust everyone
bool bValid = false;
bool bMatchedHost = false;
CAutoOpUser* pUser = NULL;
for (map<CString, CAutoOpUser*>::iterator it = m_msUsers.begin(); it != m_msUsers.end(); it++) {
CAutoOpUser* pUser = it->second;
pUser = it->second;
// First verify that the guy who challenged us matches a user's host
if (pUser->HostMatches(Nick.GetHostMask())) {
@@ -417,7 +413,7 @@ public:
return false;
}
CString sResponse = m_sKey + "::" + sChallenge;
CString sResponse = pUser->GetUserKey() + "::" + sChallenge;
PutIRC("NOTICE " + Nick.GetNick() + " :!ZNCAO RESPONSE " + sResponse.MD5());
return false;
}
@@ -489,7 +485,6 @@ public:
}
private:
map<CString, CAutoOpUser*> m_msUsers;
CString m_sKey;
MCString m_msQueue;
};