mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-23 01:32:55 +02:00
BUGFIX: Block hacking-related actions on player-owned servers (#1585)
This commit is contained in:
@@ -559,14 +559,14 @@ export function NetscriptSingularity(): InternalAPI<ISingularity> {
|
||||
helpers.checkSingularityAccess(ctx);
|
||||
const baseserver = Player.getCurrentServer();
|
||||
if (!(baseserver instanceof Server)) {
|
||||
helpers.log(ctx, () => "cannot backdoor this kind of server");
|
||||
helpers.log(ctx, () => "Cannot backdoor this kind of server");
|
||||
return Promise.resolve();
|
||||
}
|
||||
const server = baseserver;
|
||||
const installTime = (calculateHackingTime(server, Player) / 4) * 1000;
|
||||
|
||||
// No root access or skill level too low
|
||||
const canHack = netscriptCanHack(server);
|
||||
const canHack = netscriptCanHack(server, "backdoor");
|
||||
if (!canHack.res) {
|
||||
throw helpers.errorMessage(ctx, canHack.msg || "");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user