From 30a6b6c4a3cb0be04f855bca65ff73c95750dc56 Mon Sep 17 00:00:00 2001 From: hydrant Date: Sun, 11 Apr 2021 15:33:20 +0200 Subject: [PATCH] tog connect --- ReallifeGamemode.Server/Commands/AdminCommands.cs | 13 ++++++++++++- ReallifeGamemode.Server/Events/Connect.cs | 2 +- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/ReallifeGamemode.Server/Commands/AdminCommands.cs b/ReallifeGamemode.Server/Commands/AdminCommands.cs index 17eb64a8..f210b420 100644 --- a/ReallifeGamemode.Server/Commands/AdminCommands.cs +++ b/ReallifeGamemode.Server/Commands/AdminCommands.cs @@ -232,7 +232,7 @@ namespace ReallifeGamemode.Server.Commands #region Support - [Command("tog", "~m~Benutzung: ~s~/tog [Typ = ~g~IP~s~, ~g~deathlogs~s~, ~g~LC~s~]", GreedyArg = true)] + [Command("tog", "~m~Benutzung: ~s~/tog [Typ = ~g~IP~s~, ~g~deathlogs~s~, ~g~LC~s~, ~g~Connect~s~]", GreedyArg = true)] public void CmdTog(Player player, string typ, string option1 = null, string option2 = null) { if (!player.GetUser()?.IsAdmin(AdminLevel.SUPPORTER) ?? true) @@ -280,6 +280,17 @@ namespace ReallifeGamemode.Server.Commands player.SetData("toglc", true); player.SendNotification("~g~[Info]~w~ Leaderchat wird nun angezeigt."); } + case "connect": + if (player.HasData("togconnect")) + { + player.ResetData("togconnect"); + player.SendNotification("~g~[Info]~w~ Connect-Logs werden nun ausgeblendet."); + } + else + { + player.SetData("togconnect", true); + player.SendNotification("~g~[Info]~w~ Connect-Logs werden nun angezeigt."); + } break; } } diff --git a/ReallifeGamemode.Server/Events/Connect.cs b/ReallifeGamemode.Server/Events/Connect.cs index 083b1542..bfb5dd3e 100644 --- a/ReallifeGamemode.Server/Events/Connect.cs +++ b/ReallifeGamemode.Server/Events/Connect.cs @@ -81,7 +81,7 @@ namespace ReallifeGamemode.Server.Events player.TriggerEvent("SERVER:Login_ShowBrowser", registered, disableLightMode); string msg = "~m~*** " + player.Name + " [" + player.SocialClubName + "] [ID: " + player.Handle.Value + "] (" + player.Address + ")"; - if (player.HasData("togip")) + if(player.HasData("togconnect")) { ChatService.SendMessage(player, msg); }