diff options
author | Adam <Adam@anope.org> | 2016-10-01 10:57:13 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2016-10-01 10:57:13 -0400 |
commit | a32eafb933aedad9874f435abd9823b2937970e4 (patch) | |
tree | 0f36f28b596f782f7a76ebcf2f9ab9d4f2d5b6b0 /modules/sasl.cpp | |
parent | 3936c6fe95e3a682018d0a196349a1043ee32daf (diff) |
Put maxlogins logic a few other important places
Diffstat (limited to 'modules/sasl.cpp')
-rw-r--r-- | modules/sasl.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/sasl.cpp b/modules/sasl.cpp index a5edbaf32..459c1ff18 100644 --- a/modules/sasl.cpp +++ b/modules/sasl.cpp @@ -278,6 +278,10 @@ void IdentifyRequestListener::OnSuccess(NickServ::IdentifyRequest *req) if (!na || na->GetAccount()->HasFieldS("NS_SUSPENDED")) return OnFail(req); + unsigned int maxlogins = Config->GetModule("ns_identify")->Get<unsigned int>("maxlogins"); + if (maxlogins && na->GetAccount()->users.size() >= maxlogins) + return OnFail(req); + Session *s = service->GetSession(uid); if (s) { |