mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-14 09:05:19 +02:00
Add on_auth_fail
callback (#7039)
Called when a client fails to supply the correct password for the account it's attempting to login as.
This commit is contained in:
@@ -1735,10 +1735,12 @@ void Server::handleCommand_SrpBytesM(NetworkPacket* pkt)
|
||||
return;
|
||||
}
|
||||
|
||||
std::string ip = getPeerAddress(pkt->getPeerId()).serializeString();
|
||||
actionstream << "Server: User " << client->getName()
|
||||
<< " at " << getPeerAddress(pkt->getPeerId()).serializeString()
|
||||
<< " at " << ip
|
||||
<< " supplied wrong password (auth mechanism: SRP)."
|
||||
<< std::endl;
|
||||
m_script->on_auth_failure(client->getName(), ip);
|
||||
DenyAccess(pkt->getPeerId(), SERVER_ACCESSDENIED_WRONG_PASSWORD);
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user