mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user