added custom join messages
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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 = "";
|
||||
|
||||
Reference in New Issue
Block a user