mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-07-27 23:48:39 +00:00
403 user at login instead of logging out at /announce
This commit is contained in:
parent
0c8ff50176
commit
b84bf02373
4 changed files with 11 additions and 36 deletions
|
@ -3,6 +3,7 @@ using LBPUnion.ProjectLighthouse.Configuration;
|
|||
using LBPUnion.ProjectLighthouse.Database;
|
||||
using LBPUnion.ProjectLighthouse.Extensions;
|
||||
using LBPUnion.ProjectLighthouse.Helpers;
|
||||
using LBPUnion.ProjectLighthouse.Servers.GameServer.Helpers;
|
||||
using LBPUnion.ProjectLighthouse.Logging;
|
||||
using LBPUnion.ProjectLighthouse.Tickets;
|
||||
using LBPUnion.ProjectLighthouse.Types.Entities.Profile;
|
||||
|
@ -66,6 +67,11 @@ public class LoginController : ControllerBase
|
|||
|
||||
UserEntity? user;
|
||||
|
||||
if (!PatchworkHelper.UserHasValidPatchworkUserAgent(this.Request.Headers.UserAgent.ToString()))
|
||||
{
|
||||
return this.Forbid();
|
||||
}
|
||||
|
||||
switch (npTicket.Platform)
|
||||
{
|
||||
case Platform.RPCS3:
|
||||
|
@ -214,6 +220,8 @@ public class LoginController : ControllerBase
|
|||
|
||||
Logger.Success($"Successfully logged in user {user.Username} as {token.GameVersion} client", LogArea.Login);
|
||||
|
||||
user.LastLogin = TimeHelper.TimestampMillis;
|
||||
|
||||
await database.SaveChangesAsync();
|
||||
|
||||
// Create a new room on LBP2/3/Vita
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue