API: Make ns.cloud.purchaseServer() and ns.cloud.deleteServer() use hostname as provided (#2560)

This commit is contained in:
catloversg
2026-03-09 03:57:13 +07:00
committed by GitHub
parent e329082a48
commit 342dea77fa
4 changed files with 13 additions and 6 deletions
+1 -1
View File
@@ -40,7 +40,7 @@ export enum ServerOwnershipType {
* does not have a duplicate hostname/ip.
*/
export function safelyCreateUniqueServer(params: StandardServerConstructorParams): Server {
let hostname: string = params.hostname.replace(/ /g, `-`);
let hostname = params.hostname;
if (params.ip != null && ipExists(params.ip)) {
params.ip = createUniqueRandomIp();