示例#1
0
 void Reload(CommandArgs e)
 {
     string path = Path.Combine(TShock.SavePath, "antispamconfig.json");
     if (File.Exists(path))
         Config = Config.Read(path);
     Config.Write(path);
     e.Player.SendSuccessMessage("Reloaded antispam config.");
 }
示例#2
0
        void OnInitialize(EventArgs e)
        {
            Commands.ChatCommands.Add(new Command("antispam.reload", Reload, "asreload"));

            string path = Path.Combine(TShock.SavePath, "antispamconfig.json");
            if (File.Exists(path))
                Config = Config.Read(path);
            Config.Write(path);
        }