src/Client: send failed logins to NOTICE instead of PRIVMSG

When connecting to many ZNC networks at once, one failed login causes numerous query windows from *status to pop up. These can be annoying to close depending on the client.
This commit is contained in:
James Lu
2017-12-13 20:21:21 -05:00
parent fd83bb3473
commit f5fc51a63b

View File

@@ -368,10 +368,9 @@ void CAuthBase::RefuseLogin(const CString& sReason) {
// login. Use sReason because there are other reasons than "wrong
// password" for a login to be rejected (e.g. fail2ban).
if (pUser) {
pUser->PutStatus("A client from [" + GetRemoteIP() +
"] attempted "
"to login as you, but was rejected [" +
sReason + "].");
pUser->PutStatusNotice("A client from [" + GetRemoteIP() + "] attempted "
"to login as you, but was rejected [" +
sReason + "].");
}
GLOBALMODULECALL(OnFailedLogin(GetUsername(), GetRemoteIP()), NOTHING);