tog connect

This commit is contained in:
hydrant
2021-04-11 15:33:20 +02:00
parent d27b205242
commit 30a6b6c4a3
2 changed files with 13 additions and 2 deletions

View File

@@ -232,7 +232,7 @@ namespace ReallifeGamemode.Server.Commands
#region Support #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) public void CmdTog(Player player, string typ, string option1 = null, string option2 = null)
{ {
if (!player.GetUser()?.IsAdmin(AdminLevel.SUPPORTER) ?? true) if (!player.GetUser()?.IsAdmin(AdminLevel.SUPPORTER) ?? true)
@@ -280,6 +280,17 @@ namespace ReallifeGamemode.Server.Commands
player.SetData("toglc", true); player.SetData("toglc", true);
player.SendNotification("~g~[Info]~w~ Leaderchat wird nun angezeigt."); 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; break;
} }
} }

View File

@@ -81,7 +81,7 @@ namespace ReallifeGamemode.Server.Events
player.TriggerEvent("SERVER:Login_ShowBrowser", registered, disableLightMode); player.TriggerEvent("SERVER:Login_ShowBrowser", registered, disableLightMode);
string msg = "~m~*** " + player.Name + " [" + player.SocialClubName + "] [ID: " + player.Handle.Value + "] (" + player.Address + ")"; 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); ChatService.SendMessage(player, msg);
} }