From 02fcb3067fc7c4e18faa0437d3d8ae88386dbac7 Mon Sep 17 00:00:00 2001 From: Luke Date: Sun, 2 May 2021 16:22:53 +0000 Subject: [PATCH] change /ga --- ReallifeGamemode.Server/Commands/FactionCommands.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ReallifeGamemode.Server/Commands/FactionCommands.cs b/ReallifeGamemode.Server/Commands/FactionCommands.cs index 7faa4dd4..9206d261 100644 --- a/ReallifeGamemode.Server/Commands/FactionCommands.cs +++ b/ReallifeGamemode.Server/Commands/FactionCommands.cs @@ -82,15 +82,15 @@ namespace ReallifeGamemode.Server.Commands message = Regex.Replace(message, "(~[a-zA-Z]~)|(!{(.*)})", ""); - string rank = string.Empty; + string factionName = string.Empty; if (f?.GangOwned == true) { - rank = user.FactionRank.RankName; + factionName = user.Faction.Name; } else { - rank = "[ADMIN]"; + factionName = "[ADMIN]"; } var logEntry = new GangChatLogEntry() @@ -102,7 +102,7 @@ namespace ReallifeGamemode.Server.Commands dbContext.GangChatLogs.Add(logEntry); dbContext.SaveChanges(); - string broadcastMessage = "!{FF0000}** " + rank + " " + player.Name + ": " + message + " **"; + string broadcastMessage = "!{CC3333}** [" + factionName + "] " + player.Name + ": " + message + " **"; using (var context = new DatabaseContext()) { ChatService.BroadcastFaction(broadcastMessage, context.Factions.ToList().FindAll(c => c.GangOwned), true, (admin) => admin.HasData("togga"));