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(); }
/// <summary> Automatically loads all .dll commands specified in the autoload file. </summary> public static void Autoload() { if (!File.Exists(AutoloadFile)) { File.Create(AutoloadFile); return; } string[] list = File.ReadAllLines(AutoloadFile); foreach (string cmdName in list) { if (cmdName == "") { continue; } string error = Scripting.Load("Cmd" + cmdName); if (error != null) { Server.s.Log(error); continue; } Server.s.Log("AUTOLOAD: Loaded Cmd" + cmdName + ".dll"); } }
public static string Load(string command) { return(Scripting.Load(command)); }