Add Getter/Setter for ConnectDelay, ServerThrottle and AnonIPLimit

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2228 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
psychon
2010-12-31 09:14:03 +00:00
parent eb263869b0
commit 0456e3f0f2
2 changed files with 13 additions and 0 deletions
+7
View File
@@ -2071,6 +2071,13 @@ private:
size_t m_uiPosNextUser;
};
void CZNC::SetConnectDelay(unsigned int i) {
if (m_uiConnectDelay != i && m_pConnectUserTimer != NULL) {
m_pConnectUserTimer->Start(i);
}
m_uiConnectDelay = i;
}
void CZNC::EnableConnectUser() {
if (m_pConnectUserTimer != NULL)
return;
+6
View File
@@ -84,6 +84,9 @@ public:
void SetISpoofFile(const CString& s) { m_sISpoofFile = s; }
void SetISpoofFormat(const CString& s) { m_sISpoofFormat = (s.empty()) ? "global { reply \"%\" }" : s; }
void SetMaxBufferSize(unsigned int i) { m_uiMaxBufferSize = i; }
void SetAnonIPLimit(unsigned int i) { m_uiAnonIPLimit = i; }
void SetServerThrottle(unsigned int i) { m_sConnectThrottle.SetTTL(i*1000); }
void SetConnectDelay(unsigned int i);
// !Setters
// Getters
@@ -109,6 +112,9 @@ public:
const vector<CListener*>& GetListeners() const { return m_vpListeners; }
time_t TimeStarted() const { return m_TimeStarted; }
unsigned int GetMaxBufferSize() const { return m_uiMaxBufferSize; }
unsigned int GetAnonIPLimit() const { return m_uiAnonIPLimit; }
unsigned int GetServerThrottle() const { return m_sConnectThrottle.GetTTL() / 1000; }
unsigned int GetConnectDelay() const { return m_uiConnectDelay; }
// !Getters
// Static allocator