mirror of
https://github.com/znc/znc.git
synced 2026-08-07 01:13:25 +02:00
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:
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user