autoop: Add a define for the challenge length

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@973 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
psychon
2008-03-01 09:44:09 +00:00
parent 262c7e01ed
commit 7572c8e6a6

View File

@@ -11,6 +11,8 @@
class CAutoOpMod;
#define AUTOOP_CHALLENGE_LENGTH 32
class CAutoOpTimer : public CTimer {
public:
@@ -431,7 +433,7 @@ public:
return false;
}
if (sChallenge.length() != 32) {
if (sChallenge.length() != AUTOOP_CHALLENGE_LENGTH) {
PutModule("WARNING! [" + Nick.GetHostMask() + "] sent an invalid challenge.");
return false;
}
@@ -487,7 +489,7 @@ public:
// Now issue challenges for the new users in the queue
for (MCString::iterator it = m_msQueue.begin(); it != m_msQueue.end(); it++) {
it->second = CString::RandomString(32);
it->second = CString::RandomString(AUTOOP_CHALLENGE_LENGTH);
PutIRC("NOTICE " + it->first + " :!ZNCAO CHALLENGE " + it->second);
}
}