Compare commits

..

No commits in common. "677f23ea8d3e3fdba5da176b2ad15ba3708af304" and "74aae19a82f1e04b47ea29bf2fde74381a8f36eb" have entirely different histories.

2 changed files with 4 additions and 19 deletions

View File

@ -1,15 +0,0 @@
import { recursiveScan } from "./utils"
export async function main(ns: NS){
switch (ns.args[0]) {
case "getServers":
getServers(ns);
break;
default:
ns.tprint("Invalid program name");
break;
}
}
function getServers(ns: NS) {
ns.tprint(recursiveScan(ns));
}

View File

@ -97,11 +97,11 @@ export function performFunctionIfCapable(ns: NS, server: string, func: CallableF
} }
if (ns.getServerNumPortsRequired(server) < ns.getServer(server).openPortCount) { if (ns.getServerNumPortsRequired(server) < ns.getServer(server).openPortCount) {
ns.print(`Not enough ports, trying to root ${server}`) ns.print(`Not enough ports, trying to root ${server}`)
}
if (rootServer(ns, server) < ns.getServerNumPortsRequired(server)) { if (rootServer(ns, server) < ns.getServerNumPortsRequired(server)) {
ns.print(`Need more port opening programs to root ${server}`) ns.print(`Need more port opening programs to root ${server}`)
return false return false
} }
}
if (!ns.hasRootAccess(server)) { if (!ns.hasRootAccess(server)) {
ns.print(`Failed to root ${server}`) ns.print(`Failed to root ${server}`)
return false return false