added custom join messages

This commit is contained in:
2019-09-12 22:45:00 +02:00
parent 6babfa1e2f
commit 42084b2f4f
2 changed files with 16 additions and 2 deletions

View File

@@ -68,7 +68,12 @@ namespace ReallifeGamemode.Server.Events
ChatService.BroadcastGroup(msg, user.Group);
}
if (user.IsAdmin(AdminLevel.TEAM))
GlobalHelper.FillCustomJoinMessages();
if (GlobalHelper.customJoinMessages.ContainsKey(player.SocialClubName))
{
ChatService.BroadcastAdmin(GlobalHelper.customJoinMessages[player.SocialClubName], 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);
}

View File

@@ -10,6 +10,15 @@ namespace ReallifeGamemode.Server.Util
{
public static List<Client> dutyAdmins = new List<Client>();
public static Dictionary<string, string> customJoinMessages = new Dictionary<string, string>();
public static void FillCustomJoinMessages()
{
customJoinMessages.Add("murcel1337", "Miesester Projektleiter ist da! (aviatge)");
customJoinMessages.Add(".MichaPlays.", "Der Echte Ballas Leader ist online (MichaPlays)");
customJoinMessages.Add("balboistderbeste", "Hurra! Hurra! Der Balbo ist jetzt da!");
}
public static string AdminLevelToString(AdminLevel lvl)
{
string ret = "";