mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-16 06:18:42 +02:00
API: Add warning when installing backdoor on backdoored server with Singularity API (#2458)
This commit is contained in:
@@ -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)}`,
|
||||
|
||||
Reference in New Issue
Block a user