From 5b0716c8ee9312068005e0753b50c6721f343688 Mon Sep 17 00:00:00 2001 From: Lucas Nicodemus Date: Mon, 20 Jun 2011 00:26:58 -0600 Subject: [PATCH] Added whitelist command. --- TShockAPI/Commands.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/TShockAPI/Commands.cs b/TShockAPI/Commands.cs index 9192f6d8..4baa8f1f 100755 --- a/TShockAPI/Commands.cs +++ b/TShockAPI/Commands.cs @@ -852,6 +852,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:");