# ReHLDS commands (/docs/rehlds/commands)

<Callout>
An unofficial reference maintained by Hostsrc. Built from the ReHLDS source and README at commit `550f2d6`; descriptions adapted from the README (MIT, the ReHLDS Contributors, see [Credits](/docs/rehlds/credits)). The official project is [ReHLDS on GitHub](https://github.com/rehlds/ReHLDS).
</Callout>

The console commands ReHLDS adds on top of the original HLDS. Type a command on the server console, or send it over rcon: `rcon rescount`. New to these words? The [glossary](/docs/glossary) explains them.

## `rescount` [#rescount]

Shows how many files of each type the current map has precached, next to the engine's limit for each.

**Usage:** `rescount`. **Since:** ReHLDS 3.7.0.694 or earlier.

**Technical details:** Prints a table on the server console with the number of precached models, sounds, generic files, events and decals, and the limits 510, 511, 4096, 255 and 511, then the total. Precached files are the ones the server registers when a map loads and players must have. If nothing is precached it prints `No precached resources.` Use it when a map or plugin set gets close to a precache limit.

From the ReHLDS README: "Prints the total count of precached resources in the server console."

## `reslist` [#reslist]

Lists every precached file of one type: sounds, models, decals, generic files or events.

**Usage:** `reslist <sound | model | decal | generic | event>`. **Since:** ReHLDS 3.7.0.694 or earlier.

**Technical details:** Run it with one of `sound`, `model`, `decal`, `generic` or `event`. Without one of these words it prints how to use it. For each file it prints a line number, the resource index, the file name, the size in KB, the first 8 characters of its MD5 hash and its flags, `CHECKFILE` and `FATALIFMISSING`, or `-` for none. The last line gives the total for that type.

From the ReHLDS README: "Separately prints the details of the precached resources for sounds, models, decals, generic and events in server console. Useful for managing resources and dealing with the goldsource precache limits."

## `rcon_adduser` [#rcon_adduser]

Adds an IP address or range to the RCON allow list. Once the list has an entry, RCON only works from addresses on it.

**Usage:** `rcon_adduser <ipaddress/CIDR>`. **Since:** ReHLDS 3.14.0.856.

**Technical details:** Give one address, such as `203.0.113.7`, or a range in CIDR form, such as `203.0.113.0/24`. Trailing zeros also make a range: `203.0.113.0` and `203.0.113` both mean the same /24 range. While the list is empty, anyone with the right `rcon_password` can use RCON. Once it has an entry, a request with the right password from an address that isn't on the list gets that address banned with `addip` for `sv_rcon_banpenalty` minutes, which with the default 0 is a permanent ban. Add your own addresses before you rely on it. The list holds up to 128 entries and lives in memory only, so put the commands in `server.cfg` to keep them after a restart.

From the ReHLDS README: "Add a new IP address or CIDR range to RCON user list (This command adds a new IP address to the RCON user list. The specified IP or CIDR range is granted privileged access to server console. Without any Rcon users, access is allowed to anyone with a valid password)."

## `rcon_deluser` [#rcon_deluser]

Removes an IP address or range from the RCON allow list.

**Usage:** `rcon_deluser <ipaddress> {removeAll}`. **Since:** ReHLDS 3.14.0.856.

**Technical details:** Give the address or range exactly as it was added. Add a second word, such as `removeAll`, to remove every entry inside the address or range you give. The server prints `Rcon user IP removed.`, or that it couldn't find the entry. When the last entry goes, RCON works again from any address with the right password.

From the ReHLDS README: "Remove an IP address or CIDR range from RCON user list."

## `rcon_users` [#rcon_users]

Lists the IP addresses and ranges on the RCON allow list.

**Usage:** `rcon_users`. **Since:** ReHLDS 3.14.0.856.

**Technical details:** Without an argument it lists only the entries that can be shown without a `/` range suffix, such as `203.0.113.7` or `203.0.113.0`. Add an address or range to list only the entries inside it, or any other word, such as `rcon_users all`, to list every entry, including ranges such as `10.0.0.0/20`. If the list is empty it prints `Rcon user IP list: empty`.

From the ReHLDS README: "List all IP addresses and CIDR ranges in RCON user list."
