Merge branch 'master' of git://github.com/TShock/TShock
This commit is contained in:
commit
b2271f980e
3 changed files with 9 additions and 1 deletions
|
|
@ -144,6 +144,7 @@ namespace TShockAPI
|
||||||
ChatCommands.Add(new Command("me", "", ThirdPerson));
|
ChatCommands.Add(new Command("me", "", ThirdPerson));
|
||||||
ChatCommands.Add(new Command("p", "", PartyChat));
|
ChatCommands.Add(new Command("p", "", PartyChat));
|
||||||
ChatCommands.Add(new Command("rules", "", Rules));
|
ChatCommands.Add(new Command("rules", "", Rules));
|
||||||
|
ChatCommands.Add(new Command("displaylogs", "logs", Rules));
|
||||||
if (ConfigurationManager.DistributationAgent != "terraria-online")
|
if (ConfigurationManager.DistributationAgent != "terraria-online")
|
||||||
{
|
{
|
||||||
ChatCommands.Add(new Command("kill", "kill", Kill));
|
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
|
#endregion Player Management Commands
|
||||||
|
|
||||||
#region Server Maintenence Commands
|
#region Server Maintenence Commands
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,7 @@ namespace TShockAPI
|
||||||
public Rectangle TempArea = new Rectangle();
|
public Rectangle TempArea = new Rectangle();
|
||||||
public DateTime LastExplosive { get; set; }
|
public DateTime LastExplosive { get; set; }
|
||||||
public bool InitSpawn = false;
|
public bool InitSpawn = false;
|
||||||
|
public bool DisplayLogs = true;
|
||||||
|
|
||||||
public bool RealPlayer
|
public bool RealPlayer
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -132,7 +132,7 @@ namespace TShockAPI
|
||||||
TSPlayer.Server.SendMessage(log, color);
|
TSPlayer.Server.SendMessage(log, color);
|
||||||
foreach (TSPlayer player in TShock.Players)
|
foreach (TSPlayer player in TShock.Players)
|
||||||
{
|
{
|
||||||
if (player != null && player.Active && player.Group.HasPermission("logs"))
|
if (player != null && player.Active && player.Group.HasPermission("logs") && player.DisplayLogs)
|
||||||
player.SendMessage(log, color);
|
player.SendMessage(log, color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue