diff options
author | Adam <Adam@anope.org> | 2017-06-05 18:44:48 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2017-06-05 18:44:48 -0400 |
commit | feed624cdc507fdeeefbc4e14c93bfc354f9f1dc (patch) | |
tree | df905ee55f33f7b03f3cd7cf650e28d1e007f8a6 /modules/webcpanel/pages/index.h | |
parent | 1a6f42b9944ecb5055a398a34d6f3f952fd36acd (diff) |
webcpanel: rate limit login attempts
Diffstat (limited to 'modules/webcpanel/pages/index.h')
-rw-r--r-- | modules/webcpanel/pages/index.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/modules/webcpanel/pages/index.h b/modules/webcpanel/pages/index.h index 76e3d12a1..771cbf8fc 100644 --- a/modules/webcpanel/pages/index.h +++ b/modules/webcpanel/pages/index.h @@ -12,8 +12,13 @@ namespace WebCPanel class Index : public WebPanelPage { + static const int FLUSH_TIME = 60; + + Anope::hash_map<time_t> last_login_attempt; + time_t last_clear; + public: - Index(const Anope::string &u) : WebPanelPage(u) { } + Index(const Anope::string &u) : WebPanelPage(u), last_clear(0) { } bool OnRequest(HTTPProvider *, const Anope::string &, HTTPClient *, HTTPMessage &, HTTPReply &) anope_override; }; |