diff options
| author | Adam <Adam@anope.org> | 2016-01-23 10:53:32 -0500 |
|---|---|---|
| committer | Adam <Adam@anope.org> | 2016-01-23 10:53:32 -0500 |
| commit | 38fcf15d6283865f603793dd1afc1fbe5035a6a6 (patch) | |
| tree | 430558a634a39309888e7d0133868b3350b209e9 /include | |
| parent | 75dd784538504b53d5155a96b88aaac6188f950d (diff) | |
Put maxlogins logic a few other important places
Diffstat (limited to 'include')
| -rw-r--r-- | include/modules/sasl.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/modules/sasl.h b/include/modules/sasl.h index eca31d4af..d9756949f 100644 --- a/include/modules/sasl.h +++ b/include/modules/sasl.h @@ -89,6 +89,10 @@ namespace SASL if (!na || na->nc->HasExt("NS_SUSPENDED")) return OnFail(); + unsigned int maxlogins = Config->GetModule("ns_identify")->Get<unsigned int>("maxlogins"); + if (maxlogins && na->nc->users.size() >= maxlogins) + return OnFail(); + Session *s = sasl->GetSession(uid); if (s) { |
