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<results.len();i+=1) {
if (first) {
first = false;
resultsString = "";
}
else resultsString += ", ";
local result = results[i]
//local resultType = type(result)
/*if resultType == "string" then resultsString = resultsString..(("%q"):format(result):gsub("[\a\b\f\t\v\n]", {["\a"]="\\a", ["\b"]="\\b", ["\f"]="\\f", ["\t"]="\\t", ["\v"]="\\v"}):gsub("\\\n", "\\n"))
else *//*resultsString += tostring(result) end
}
if (!resultsString) return "Command executed!";
return "Command results: " + resultsString;*/
}
{"text":"text","html5":"html","css":"css","javascript":"javascript","php":"php","python":"python","ruby":"ruby","lua":"lua","bash":"sh","erlang":"erlang","go":"golang","c":"c_cpp","cpp":"c_cpp","diff":"diff","latex":"latex","sql":"sql","xml":"xml","0":"text","abap":"abap","actionscript":"actionscript","actionscript3":"actionscript","ada":"ada","apache":"apache_conf","applescript":"applescript","asm":"assembly_x86","autohotkey":"autohotkey","closure":"closure","cobol":"cobol","coffeescript":"coffee","cpp-winapi":"c_cpp","c_loadrunner":"c_cpp","c_mac":"c_cpp","c_winapi":"c_cpp","csharp":"csharp","d":"d","dart":"dart","dot":"dot","eiffel":"eiffel","fortran":"fortran","groovy":"groovy","haskell":"haskell","haxe":"haxe","ini":"ini","io":"io","java":"java","java5":"java","make":"makefile","matlab":"matlab","mysql":"mysql","objc":"objectivec","ocaml":"ocaml","pascal":"pascal","perl":"perl","perl6":"perl","postgresql":"pgsql","powershell":"powershell","prolog":"prolog","properties":"properties","rails":"ruby","rust":"rust","scala":"scala","scheme":"scheme","smarty":"smarty","tcl":"tcl","vala":"vala","vb":"vbscript","verilog":"verilog","vhdl":"vhdl","yaml":"yaml"}