function runStringIRC(commandstring) { local errMsg = null; try { local script = compilestring.pcall(this, "return " + commandstring); local result = script.pcall(this); if (result == null) return "Command executed!"; //if (typeof result == "string") result = "\"" + result + "\""; return "Command result: " + result + " [" + (typeof result) + "]"; } catch(e) { errMsg = e; } try { local script = compilestring.pcall(this, commandstring); local result = script.pcall(this); if (result == null) return "Command executed!"; //if (typeof result == "string") result = "\"" + result + "\""; return "Command result: " + result + " [" + (typeof result) + "]"; } catch(e) { if (errMsg != null) return "Error: " + errMsg; return "Error: " + e; } /*if (results[0]) return "Error: " + results[2]; local resultsString = null, first = true; for(local i=1;i