Initial commit for player keys
This commit is contained in:
@@ -19,11 +19,9 @@ namespace reallife_gamemode.Server.Extensions
|
||||
{
|
||||
public static User GetUser(this Client client, DatabaseContext context = null)
|
||||
{
|
||||
<<<<<<< HEAD
|
||||
|
||||
using (DatabaseContext dbContext = new DatabaseContext())
|
||||
=======
|
||||
if(context == null)
|
||||
>>>>>>> feature/faction-system
|
||||
{
|
||||
using (context = new DatabaseContext())
|
||||
{
|
||||
@@ -92,7 +90,7 @@ namespace reallife_gamemode.Server.Extensions
|
||||
{
|
||||
using (var unbanUser = new DatabaseContext())
|
||||
{
|
||||
var targetUser = unbanUser.Bans.FirstOrDefault(u => u.Id == target.GetUser().BanId);
|
||||
var targetUser = unbanUser.Bans.FirstOrDefault(u => u.Id == target.GetUser(unbanUser).BanId);
|
||||
unbanUser.Bans.Remove(targetUser);
|
||||
unbanUser.SaveChanges();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user