Merge branch 'master' of git://github.com/TShock/TShock
This commit is contained in:
commit
2811a68002
2 changed files with 25 additions and 11 deletions
|
|
@ -138,6 +138,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("whitelist", "maintenance", Whitelist));
|
||||
if (ConfigurationManager.DistributationAgent != "terraria-online")
|
||||
{
|
||||
ChatCommands.Add(new Command("kill", "kill", Kill));
|
||||
|
|
@ -176,7 +177,6 @@ namespace TShockAPI
|
|||
|
||||
if (cmd == null)
|
||||
{
|
||||
player.SendMessage("That command does not exist, try /help", Color.Red);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -853,6 +853,17 @@ namespace TShockAPI
|
|||
|
||||
#region General Commands
|
||||
|
||||
public static void Whitelist(CommandArgs args)
|
||||
{
|
||||
if (args.Parameters.Count == 1)
|
||||
{
|
||||
TextWriter tw = new StreamWriter(FileTools.WhitelistPath, true);
|
||||
tw.WriteLine(args.Parameters[0]);
|
||||
tw.Close();
|
||||
args.Player.SendMessage("Added " + args.Parameters[0] + " to the whitelist.");
|
||||
}
|
||||
}
|
||||
|
||||
private static void Help(CommandArgs args)
|
||||
{
|
||||
args.Player.SendMessage("TShock Commands:");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue