mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-17 14:59:16 +02:00
NETSCRIPT: Add functionality and support to fully allow Players to use IP addresses in place of hostnames (#1990)
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user