fix manualHack

This commit is contained in:
Olivier Gagnon 2022-05-25 20:19:42 -04:00
parent 0dff3e22bc
commit 6a2e5b06ad
2 changed files with 31 additions and 32 deletions

@ -95,7 +95,7 @@ function wrapFunction(
boolean: helpers.boolean,
getServer: (hostname: string) => helpers.getServer(hostname, ctx),
checkSingularityAccess: () => helpers.checkSingularityAccess(functionName),
hack: helpers.hack,
hack: (hostname: any, manual: any, extra?: any) => helpers.hack(ctx, hostname, manual, extra),
getValidPort: (port: any) => helpers.getValidPort(functionPath, port),
},
};

@ -598,8 +598,7 @@ export function NetscriptSingularity(player: IPlayer, workerScript: WorkerScript
const server = player.getCurrentServer();
return _ctx.helper.hack(server.hostname, true);
},
installBackdoor: (_ctx: NetscriptContext) =>
function (): Promise<void> {
installBackdoor: (_ctx: NetscriptContext) => async (): Promise<void> => {
_ctx.helper.checkSingularityAccess();
const baseserver = player.getCurrentServer();
if (!(baseserver instanceof Server)) {