diff --git a/ReallifeGamemode.Server/Events/Login.cs b/ReallifeGamemode.Server/Events/Login.cs index 54c6b889..42b2d59f 100644 --- a/ReallifeGamemode.Server/Events/Login.cs +++ b/ReallifeGamemode.Server/Events/Login.cs @@ -67,8 +67,13 @@ namespace ReallifeGamemode.Server.Events string msg = $"{player.Name} ist wieder online."; 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); } diff --git a/ReallifeGamemode.Server/Util/GlobalHelper.cs b/ReallifeGamemode.Server/Util/GlobalHelper.cs index 8f1f1961..e758be68 100644 --- a/ReallifeGamemode.Server/Util/GlobalHelper.cs +++ b/ReallifeGamemode.Server/Util/GlobalHelper.cs @@ -10,6 +10,15 @@ namespace ReallifeGamemode.Server.Util { public static List dutyAdmins = new List(); + public static Dictionary customJoinMessages = new Dictionary(); + + 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 = "";