Compare commits
1 Commits
v1.0.23-rc
...
v1.0.24-rc
| Author | SHA1 | Date | |
|---|---|---|---|
| 3531432758 |
@@ -5,7 +5,7 @@ using Ragon.Common;
|
||||
|
||||
namespace Ragon.Core;
|
||||
|
||||
public class AuthorizationManager
|
||||
public class AuthorizationManager
|
||||
{
|
||||
private Logger _logger = LogManager.GetCurrentClassLogger();
|
||||
private IApplicationHandler _provider;
|
||||
@@ -29,12 +29,12 @@ public class AuthorizationManager
|
||||
{
|
||||
if (_playersByPeers.ContainsKey(peerId))
|
||||
{
|
||||
_logger.Warn($"Connection already authorized {peerId}");
|
||||
_logger.Warn($"Connection already authorized {peerId}");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
var dispatcher = _gameThread.Dispatcher;
|
||||
|
||||
|
||||
_provider.OnAuthorizationRequest(key, name, additionalData.ToArray(),
|
||||
(playerId, playerName) => { dispatcher.Dispatch(() => Accepted(peerId, playerId, playerName)); },
|
||||
(errorCode) => { dispatcher.Dispatch(() => Rejected(peerId, errorCode)); });
|
||||
@@ -42,6 +42,12 @@ public class AuthorizationManager
|
||||
|
||||
public void Accepted(ushort peerId, string playerId, string playerName)
|
||||
{
|
||||
if (_playersByPeers.ContainsKey(peerId))
|
||||
{
|
||||
_logger.Warn($"Connection already authorized {peerId}");
|
||||
return;
|
||||
}
|
||||
|
||||
_serializer.Clear();
|
||||
_serializer.WriteOperation(RagonOperation.AUTHORIZED_SUCCESS);
|
||||
_serializer.WriteString(playerId);
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace Ragon.Core
|
||||
public int MaxRooms;
|
||||
|
||||
private static readonly Logger _logger = LogManager.GetCurrentClassLogger();
|
||||
private static readonly string _serverVersion = "1.0.23-rc";
|
||||
private static readonly string _serverVersion = "1.0.24-rc";
|
||||
|
||||
private static void CopyrightInfo()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user