From e88a5d46e164935802f1aa69a87d9f3b6652a436 Mon Sep 17 00:00:00 2001 From: hydrant Date: Thu, 12 Sep 2019 22:49:15 +0200 Subject: [PATCH] fix balbos dreck --- ReallifeGamemode.Server/Events/Login.cs | 6 ++---- ReallifeGamemode.Server/Util/GlobalHelper.cs | 16 +++++++--------- 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/ReallifeGamemode.Server/Events/Login.cs b/ReallifeGamemode.Server/Events/Login.cs index 42b2d59f..075ce6f7 100644 --- a/ReallifeGamemode.Server/Events/Login.cs +++ b/ReallifeGamemode.Server/Events/Login.cs @@ -68,11 +68,9 @@ namespace ReallifeGamemode.Server.Events ChatService.BroadcastGroup(msg, user.Group); } - GlobalHelper.FillCustomJoinMessages(); - - if (GlobalHelper.customJoinMessages.ContainsKey(player.SocialClubName)) + if (GlobalHelper.CustomJoinMessages.ContainsKey(player.SocialClubName)) { - ChatService.BroadcastAdmin(GlobalHelper.customJoinMessages[player.SocialClubName], AdminLevel.TEAM); + 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 e758be68..e7f8338b 100644 --- a/ReallifeGamemode.Server/Util/GlobalHelper.cs +++ b/ReallifeGamemode.Server/Util/GlobalHelper.cs @@ -8,16 +8,14 @@ namespace ReallifeGamemode.Server.Util { public static class GlobalHelper { - public static List dutyAdmins = new List(); + 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 Dictionary CustomJoinMessages = new Dictionary + { + { "murcel1337", "Miesester Projektleiter ist da! (aviatge)" }, + { ".MichaPlays.", "Der Echte Ballas Leader ist online (MichaPlays)" }, + { "balboistderbeste", "Hurra! Hurra! Der Balbo ist jetzt da!" } + }; public static string AdminLevelToString(AdminLevel lvl) {