public static void Autoload() { if (!File.Exists("text/cmdautoload.txt")) { File.Create("text/cmdautoload.txt"); return; } string[] autocmds = File.ReadAllLines("text/cmdautoload.txt"); foreach (string cmd in autocmds) { if (cmd == "") { continue; } string error = Scripting.Load("Cmd" + cmd.ToLower()); if (error != null) { Server.s.Log(error); error = null; continue; } Server.s.Log("AUTOLOAD: Loaded " + cmd.ToLower() + ".dll"); } //ScriptingVB.Autoload(); }
public override void Use(Player p, string message) { if (message == "") { Help(p); return; } if (Command.all.Contains(message.Split(' ')[0])) { Player.SendMessage(p, "That command is already loaded!"); return; } message = "Cmd" + message.Split(' ')[0];; string error = Scripting.Load(message); if (error != null) { Player.SendMessage(p, error); return; } GrpCommands.fillRanks(); Player.SendMessage(p, "Command was successfully loaded."); }
public override void Use(Player p, string message) { if (Command.all.Contains(message.Split(' ')[0])) { Player.SendMessage(p, "That command is already loaded!"); return; } string[] param = message.Split(' '); string name = "Cmd" + param[0]; if (param.Length == 1) { string error = Scripting.Load(name); if (error != null) { Player.SendMessage(p, error); return; } GrpCommands.fillRanks(); Player.SendMessage(p, "Command was successfully loaded."); return; } if (param[1] == "vb") { string error = ScriptingVB.Load(name); if (error != null) { Player.SendMessage(p, error); return; } GrpCommands.fillRanks(); Player.SendMessage(p, "Command was successfully loaded."); return; } }