fix bugs
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using GTANetworkAPI;
|
using GTANetworkAPI;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using ReallifeGamemode.Server.Extensions;
|
||||||
using ReallifeGamemode.Server.Managers;
|
using ReallifeGamemode.Server.Managers;
|
||||||
using ReallifeGamemode.Server.Models;
|
using ReallifeGamemode.Server.Models;
|
||||||
using ReallifeGamemode.Server.Services;
|
using ReallifeGamemode.Server.Services;
|
||||||
@@ -70,10 +71,10 @@ namespace ReallifeGamemode.Server.Events
|
|||||||
|
|
||||||
if (GlobalHelper.CustomJoinMessages.ContainsKey(player.SocialClubName))
|
if (GlobalHelper.CustomJoinMessages.ContainsKey(player.SocialClubName))
|
||||||
{
|
{
|
||||||
ChatService.BroadcastAdmin("!{#FFFF00}*** " + GlobalHelper.CustomJoinMessages[player.SocialClubName] + " (" + GlobalHelper.AdminLevelToString(user.AdminLevel) + ") [ID: " + player.Handle.Value + "]", AdminLevel.TEAM);
|
ChatService.BroadcastAdmin("!{#FFFF00}*** " + GlobalHelper.CustomJoinMessages[player.SocialClubName] + " (" + user.AdminLevel.GetName() + ") [ID: " + player.Handle.Value + "]", AdminLevel.TEAM);
|
||||||
} else if (user.IsAdmin(AdminLevel.TEAM))
|
} else if (user.IsAdmin(AdminLevel.TEAM))
|
||||||
{
|
{
|
||||||
ChatService.BroadcastAdmin("!{#FFFF00}*** " + user.Name +"(ID: " + player.Handle.Value + ")" + " hat sich als " + GlobalHelper.AdminLevelToString(user.AdminLevel) + " eingeloggt!", AdminLevel.TEAM);
|
ChatService.BroadcastAdmin("!{#FFFF00}*** " + user.Name +"(ID: " + player.Handle.Value + ")" + " hat sich als " + user.AdminLevel.GetName() + " eingeloggt!", AdminLevel.TEAM);
|
||||||
}
|
}
|
||||||
|
|
||||||
var userItems = dbContext.UserItems.Where(u => u.UserId == user.Id).ToList();
|
var userItems = dbContext.UserItems.Where(u => u.UserId == user.Id).ToList();
|
||||||
|
|||||||
@@ -18,40 +18,5 @@ namespace ReallifeGamemode.Server.Util
|
|||||||
{ "Roachkook", "Niemand, nicht einmal deine Mutter möchte so etwas sehen. (Siga)" },
|
{ "Roachkook", "Niemand, nicht einmal deine Mutter möchte so etwas sehen. (Siga)" },
|
||||||
{ "Paaqo1337", "Picasso is back!" }
|
{ "Paaqo1337", "Picasso is back!" }
|
||||||
};
|
};
|
||||||
|
|
||||||
public static string AdminLevelToString(AdminLevel lvl)
|
|
||||||
{
|
|
||||||
string ret = "";
|
|
||||||
|
|
||||||
if (lvl == AdminLevel.TEAM)
|
|
||||||
{
|
|
||||||
ret = "Teammitglied";
|
|
||||||
}
|
|
||||||
else if (lvl == AdminLevel.SUPPORTER)
|
|
||||||
{
|
|
||||||
ret = "Supporter";
|
|
||||||
}
|
|
||||||
else if (lvl == AdminLevel.ADMIN)
|
|
||||||
{
|
|
||||||
ret = "Admin 1";
|
|
||||||
}
|
|
||||||
else if (lvl == AdminLevel.ADMIN2)
|
|
||||||
{
|
|
||||||
ret = "Admin 2";
|
|
||||||
}
|
|
||||||
else if (lvl == AdminLevel.ADMIN3)
|
|
||||||
{
|
|
||||||
ret = "Admin 3";
|
|
||||||
}
|
|
||||||
else if (lvl == AdminLevel.HEADADMIN)
|
|
||||||
{
|
|
||||||
ret = "Admin 1337";
|
|
||||||
}
|
|
||||||
else if (lvl == AdminLevel.PROJEKTLEITUNG)
|
|
||||||
{
|
|
||||||
ret = "Admin 1338";
|
|
||||||
}
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user