2024-05-09 10:50:59 +03:00
|
|
|
using Ragon.Protocol;
|
|
|
|
|
using Ragon.Server.IO;
|
|
|
|
|
using Ragon.Server.Lobby;
|
2024-05-19 08:54:49 +03:00
|
|
|
using Ragon.Server.Logging;
|
2024-05-09 10:50:59 +03:00
|
|
|
|
|
|
|
|
namespace Ragon.Server.Handler
|
|
|
|
|
{
|
|
|
|
|
public class PlayerUserDataOperation : BaseOperation
|
|
|
|
|
{
|
2024-05-19 08:54:49 +03:00
|
|
|
private readonly IRagonLogger _logger = LoggerManager.GetLogger(nameof(PlayerUserDataOperation));
|
2024-05-09 10:50:59 +03:00
|
|
|
private readonly int _userDataLimit;
|
2024-05-19 08:54:49 +03:00
|
|
|
|
2024-05-09 10:50:59 +03:00
|
|
|
public PlayerUserDataOperation(
|
2024-09-28 20:11:56 +03:00
|
|
|
RagonStream reader,
|
|
|
|
|
RagonStream writer,
|
2024-05-09 10:50:59 +03:00
|
|
|
int userDataLimit
|
|
|
|
|
) : base(reader, writer)
|
|
|
|
|
{
|
|
|
|
|
_userDataLimit = userDataLimit;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override void Handle(RagonContext context, NetworkChannel channel)
|
|
|
|
|
{
|
|
|
|
|
if (context.ConnectionStatus == ConnectionStatus.Unauthorized)
|
|
|
|
|
{
|
2024-05-19 08:54:49 +03:00
|
|
|
_logger.Warning($"Player {context.Connection.Id} not authorized for this request");
|
2024-05-09 10:50:59 +03:00
|
|
|
return;
|
|
|
|
|
}
|
2024-05-19 08:54:49 +03:00
|
|
|
|
2024-05-12 10:57:46 +03:00
|
|
|
context.UserData.Read(Reader);
|
2024-05-09 10:50:59 +03:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|