diff --git a/MCGalaxy/Commands/Scripting/CmdCmdCreate.cs b/MCGalaxy/Commands/Scripting/CmdCmdCreate.cs
index 679cb168c..7c008cb2d 100644
--- a/MCGalaxy/Commands/Scripting/CmdCmdCreate.cs
+++ b/MCGalaxy/Commands/Scripting/CmdCmdCreate.cs
@@ -24,7 +24,7 @@ namespace MCGalaxy.Commands {
public override string shortcut { get { return ""; } }
public override string type { get { return CommandTypes.Other; } }
public override bool museumUsable { get { return true; } }
- public override LevelPermission defaultRank { get { return LevelPermission.Admin; } }
+ public override LevelPermission defaultRank { get { return LevelPermission.Nobody; } }
public CmdCmdCreate() { }
public override void Use(Player p, string message) {
diff --git a/MCGalaxy/Commands/Scripting/CmdCompile.cs b/MCGalaxy/Commands/Scripting/CmdCompile.cs
index e57736c43..47a03b18e 100644
--- a/MCGalaxy/Commands/Scripting/CmdCompile.cs
+++ b/MCGalaxy/Commands/Scripting/CmdCompile.cs
@@ -24,7 +24,7 @@ namespace MCGalaxy.Commands {
public override string shortcut { get { return ""; } }
public override string type { get { return CommandTypes.Other; } }
public override bool museumUsable { get { return true; } }
- public override LevelPermission defaultRank { get { return LevelPermission.Admin; } }
+ public override LevelPermission defaultRank { get { return LevelPermission.Nobody; } }
public CmdCompile() { }
public override void Use(Player p, string message) {
diff --git a/MCGalaxy/Commands/Scripting/CmdCompload.cs b/MCGalaxy/Commands/Scripting/CmdCompload.cs
index 8f9a00098..9a9e2a84f 100644
--- a/MCGalaxy/Commands/Scripting/CmdCompload.cs
+++ b/MCGalaxy/Commands/Scripting/CmdCompload.cs
@@ -22,7 +22,7 @@ namespace MCGalaxy.Commands
public override string name { get { return "compload"; } }
public override string shortcut { get { return "cml"; } }
public override string type { get { return CommandTypes.Other; } }
- public override LevelPermission defaultRank { get { return LevelPermission.Admin; } }
+ public override LevelPermission defaultRank { get { return LevelPermission.Nobody; } }
public override bool museumUsable { get { return true; } }
public override void Use(Player p, string message) {
diff --git a/MCGalaxy/Scripting/Scripting.cs b/MCGalaxy/Scripting/Scripting.cs
index e8ad54e4a..4428a6c38 100644
--- a/MCGalaxy/Scripting/Scripting.cs
+++ b/MCGalaxy/Scripting/Scripting.cs
@@ -137,11 +137,11 @@ namespace MCGalaxy {
if (!File.Exists(AutoloadFile)) { File.Create(AutoloadFile); return; }
string[] list = File.ReadAllLines(AutoloadFile);
- foreach (string cmd in list) {
- if (cmd == "") continue;
- string error = Scripting.Load("Cmd" + cmd.ToLower());
+ 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.ToLower() + ".dll");
+ Server.s.Log("AUTOLOAD: Loaded Cmd" + cmdName + ".dll");
}
}
@@ -149,8 +149,7 @@ namespace MCGalaxy {
/// Name of the command to be loaded (make sure it's prefixed by Cmd before bringing it in here or you'll have problems).
/// Error string on failure, null on success.
public static string Load(string command) {
- if (command.Length < 3 || command.Substring(0, 3).ToLower() != "cmd")
- return "Invalid command name specified.";
+ if (!command.CaselessStarts("cmd")) return "Invalid command name specified.";
try {
byte[] data = File.ReadAllBytes(DllDir + command + ".dll");
Assembly lib = Assembly.Load(data); // TODO: Assembly.LoadFile instead?