login logout logs
This commit is contained in:
@@ -13,6 +13,7 @@ using ReallifeGamemode.Database.Entities;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using ReallifeGamemode.Server.Inventory.Interfaces;
|
||||
using ReallifeGamemode.Database.Entities.Logs;
|
||||
|
||||
/**
|
||||
* @overview Life of German Reallife - Event Login (Login.cs)
|
||||
@@ -56,6 +57,20 @@ namespace ReallifeGamemode.Server.Events
|
||||
return;
|
||||
}
|
||||
|
||||
var logEntry = new LoginLogoutLogEntry()
|
||||
{
|
||||
IpAddress = player.Address,
|
||||
User = user,
|
||||
PlayerId = player.Handle.Value,
|
||||
SocialClubName = player.SocialClubName,
|
||||
Username = player.Name,
|
||||
LoginLogout = true,
|
||||
Time = DateTime.Now
|
||||
};
|
||||
|
||||
dbContext.LoginLogoutLogs.Add(logEntry);
|
||||
dbContext.SaveChanges();
|
||||
|
||||
player.SetData("dbId", user.Id);
|
||||
player.Name = username;
|
||||
player.TriggerEvent("SERVER:Login_Success");
|
||||
|
||||
Reference in New Issue
Block a user