API: Add warning when installing backdoor on backdoored server with Singularity API (#2458)

This commit is contained in:
catloversg
2026-01-29 03:10:13 +07:00
committed by GitHub
parent d7c1c7be72
commit 366c44d5c2

View File

@@ -529,6 +529,14 @@ export function NetscriptSingularity(): InternalAPI<ISingularity> {
throw helpers.errorMessage(ctx, canHack.msg || "");
}
if (server.backdoorInstalled) {
helpers.log(
ctx,
() =>
"You have already installed a backdoor on this server. You can check if the server has a backdoor installed " +
"with ns.getServer().backdoorInstalled.",
);
}
helpers.log(
ctx,
() => `Installing backdoor on '${server.hostname}' in ${convertTimeMsToTimeElapsedString(installTime, true)}`,