Merge pull request #827 from Rhefew/feature/ip-connection-limit

feat(plugins): implement customizable maximum concurrent connections

(cherry picked from commit 0e30df9ae22a265c3486dea1eba259567631eb87)
This commit is contained in:
sven-n
2026-07-15 22:34:54 +02:00
committed by Acentech Dev
parent 77df5d1145
commit ed32ebdfd3
7 changed files with 318 additions and 3 deletions

View File

@@ -189,7 +189,9 @@ public class LoginAction
private async ValueTask HandleAlreadyConnectedAsync(Player player, string username)
{
await player.InvokeViewPlugInAsync<IShowLoginResultPlugIn>(p => p.ShowLoginResultAsync(LoginResult.AccountAlreadyConnected)).ConfigureAwait(false);
var result = player.LoginResultOverride ?? LoginResult.AccountAlreadyConnected;
player.LoginResultOverride = null;
await player.InvokeViewPlugInAsync<IShowLoginResultPlugIn>(p => p.ShowLoginResultAsync(result)).ConfigureAwait(false);
if (player.GameContext is IGameServerContext gameServerContext)
{
await gameServerContext.EventPublisher.PlayerAlreadyLoggedInAsync(gameServerContext.Id, username).ConfigureAwait(false);