fix #247, add allow guests config setting.

This commit is contained in:
SaltySnail
2024-06-10 22:06:09 +02:00
parent 2fcb53530a
commit 5dab48af92
4 changed files with 14 additions and 0 deletions
+6
View File
@@ -389,6 +389,12 @@ std::shared_ptr<TClient> TNetwork::Authentication(TConnection&& RawConnection) {
return false;
});
beammp_debugf("\t NotAllowedWithReason: {} \t AllowGuests: {} \t IsGuest: {}", NotAllowedWithReason, Application::Settings.AllowGuests, Client->IsGuest());
if (!NotAllowedWithReason && !Application::Settings.AllowGuests && Client->IsGuest()) { //!NotAllowedWithReason because this message has the lowest priority
NotAllowedWithReason = true;
Reason = "No guests are allowed on this server! To join, sign up at; forum.beammp.com.";
}
if (NotAllowed) {
ClientKick(*Client, "you are not allowed on the server!");
return {};