From c11fe571604cf760d67e1e84ce73c302129f3e88 Mon Sep 17 00:00:00 2001 From: CroniX Date: Sun, 21 Jun 2020 00:30:08 +0200 Subject: [PATCH] Add gang chat /ga --- .../Commands/FactionCommands.cs | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/ReallifeGamemode.Server/Commands/FactionCommands.cs b/ReallifeGamemode.Server/Commands/FactionCommands.cs index 4a393aa2..c05429b8 100644 --- a/ReallifeGamemode.Server/Commands/FactionCommands.cs +++ b/ReallifeGamemode.Server/Commands/FactionCommands.cs @@ -39,6 +39,28 @@ namespace ReallifeGamemode.Server.Commands ChatService.BroadcastFaction(broadcastMessage, f); } + [Command("ga", "~m~Benutzung: ~s~/ga [Nachricht]", GreedyArg = true)] + public void CmdFactionGA(Player player, string message) + { + Faction f = player.GetUser()?.Faction; + if (f == null || f.StateOwned) + { + ChatService.NotAuthorized(player); + return; + } + if (player.GetUser().Faction.Name == "Ballas" || player.GetUser().Faction.Name == "Grove") + { + message = Regex.Replace(message, "(~[a-zA-Z]~)|(!{(.*)})", ""); + + string broadcastMessage = "!{FF0000}** " + player.GetUser().GetFactionRank().RankName + " " + player.Name + ": " + message + " )) **"; + ChatService.BroadcastFaction(broadcastMessage, f); + } + else + { + return; + } + } + [Command("r", "~m~Benutzung: ~s~/r [Nachricht]", GreedyArg = true)] public void CmdFactionR(Player player, string message) {