NETSCRIPT: Add functionality and support to fully allow Players to use IP addresses in place of hostnames (#1990)

This commit is contained in:
Naga
2025-04-10 21:41:37 -04:00
committed by GitHub
parent d28a06e764
commit 0aaa28054a
84 changed files with 610 additions and 400 deletions

View File

@@ -4,18 +4,25 @@
## Singularity.getCurrentServer() method
Get the current server.
Get the current server. Returns the hostname by default.
**Signature:**
```typescript
getCurrentServer(): string;
getCurrentServer(returnOpts?: HostReturnOptions): string;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| returnOpts | [HostReturnOptions](./bitburner.hostreturnoptions.md) | _(Optional)_ Optional. Controls whether the function returns an IP. |
**Returns:**
string
Name of the current server.
Hostname or IP address of the current server.
## Remarks