Added /displaylogs. Toggles log output to player who executed the command.

This commit is contained in:
Deathmax 2011-06-24 21:32:04 +08:00
parent 1e66e1a256
commit 679a28af0a
3 changed files with 9 additions and 1 deletions

View file

@ -144,6 +144,7 @@ namespace TShockAPI
ChatCommands.Add(new Command("me", "", ThirdPerson));
ChatCommands.Add(new Command("p", "", PartyChat));
ChatCommands.Add(new Command("rules", "", Rules));
ChatCommands.Add(new Command("displaylogs", "logs", Rules));
if (ConfigurationManager.DistributationAgent != "terraria-online")
{
ChatCommands.Add(new Command("kill", "kill", Kill));
@ -429,6 +430,12 @@ namespace TShockAPI
}
}
public static void DisplayLogs(CommandArgs args)
{
args.Player.DisplayLogs = (!args.Player.DisplayLogs);
args.Player.SendMessage("You now " + (args.Player.DisplayLogs ? "receive" : "stopped receiving") + " logs");
}
#endregion Player Management Commands
#region Server Maintenence Commands