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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user