re-enable the lua command in public servers

This commit is contained in:
Evil Factory
2022-05-30 12:43:32 -03:00
parent 6922900bf1
commit c9ad6efb54

View File

@@ -1243,12 +1243,6 @@ namespace Barotrauma
commands.Add(new Command("lua", "lua: runs a string", (string[] args) =>
{
if (GameMain.Server.ServerSettings.IsPublic)
{
DebugConsole.ThrowError("The lua command has been disabled in public servers.");
return;
}
try
{
GameMain.LuaCs.Lua.DoString(string.Join(" ", args));
@@ -1260,12 +1254,6 @@ namespace Barotrauma
}));
commands.Add(new Command("cs", "cs: runs a string", (string[] args) =>
{
if (GameMain.Server.ServerSettings.IsPublic)
{
DebugConsole.ThrowError("The cs command has been disabled in public servers.");
return;
}
if (LuaCsSetup.GetPackage("CsForBarotrauma", false, true) == null) { return; }
GameMain.LuaCs.CsScript.Run(string.Join(" ", args));