1
0
mirror of https://github.com/anope/anope.git synced 2026-07-08 12:23:13 +02:00

SASL: Also disallow suspended nicks to login using EXTERNAL mechanism. Improve the log message for failed logins.

This commit is contained in:
Robby-
2014-03-22 21:14:02 +01:00
parent f1bec3999d
commit 45878bf182
2 changed files with 9 additions and 2 deletions
+8 -1
View File
@@ -110,7 +110,14 @@ namespace SASL
delete s;
}
Log(Config->GetClient("NickServ")) << "A user failed to identify for account " << this->GetAccount() << " using SASL";
Anope::string accountstatus;
NickAlias *na = NickAlias::Find(GetAccount());
if (!na)
accountstatus = "nonexistent ";
else if (na->nc->HasExt("NS_SUSPENDED"))
accountstatus = "suspended ";
Log(Config->GetClient("NickServ")) << "A user failed to identify for " << accountstatus << "account " << this->GetAccount() << " using SASL";
}
};
}
+1 -1
View File
@@ -93,7 +93,7 @@ class External : public Mechanism
}
NickCore *nc = certs->FindAccountFromCert(mysess->cert);
if (!nc)
if (!nc || nc->HasExt("NS_SUSPENDED"))
{
sasl->Fail(sess);
delete sess;