> For the complete documentation index, see [llms.txt](https://mole-resource.gitbook.io/mole-resource-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mole-resource.gitbook.io/mole-resource-docs/scripts/hanoi-tower/admin.md).

# Admin

## Server Console Commands

These commands work **only from the server console** (txAdmin console or terminal) — they cannot be run by players in-game.

***

### `hanoiboards`

Lists every board currently known to the server.

```
hanoiboards
```

Example output:

```
#3 | pos: -1465.2, -546.5, 72.7 | krążki: 7 | instancja: świat | gra: wolna
#5 | pos: 210.4, -880.1, 30.5   | krążki: 5 | instancja: 12    | gra: gracz 2
#-1 | pos: -1465.3, -546.5, 72.7 | krążki: 7 | instancja: świat | gra: wolna
Łącznie: 3 plansz
```

* **Negative IDs** (`#-1`, `#-2`…) are server-owned boards from `Config.Boards`
* **instancja** shows the housing instance, or `świat` (world) for open-world boards
* **gra** shows whether someone is currently playing

***

### `hanoidelete <id> [playerId]`

Removes a board from the world and the database. Useful for cleaning up **orphaned boards** — e.g. a board placed inside a home whose housing instance no longer exists.

```
hanoidelete 5        # board removed, item is lost
hanoidelete 5 2      # board removed, item goes to player with server ID 2
```

Restrictions:

* Fails if someone is currently playing on the board
* Cannot delete server-owned boards (`Config.Boards`) — remove the config entry and restart instead

***

## Debug Commands (players)

Two in-game commands exist for testing. **Remove or restrict them before going live** — they are meant for development only.

<table><thead><tr><th width="220">Command</th><th>Action</th></tr></thead><tbody><tr><td><code>/hanoiitem</code></td><td>Gives the player one board item (no permission check!)</td></tr><tr><td><code>/hanoiresync</code></td><td>Re-requests the full board list from the server — rebuilds all local board objects</td></tr></tbody></table>

{% hint style="danger" %}
`/hanoiitem` has **no permission check** — any player can give themselves free items. Delete the command from `client.lua` and its `debugGiveItem` handler from `server.lua` on production servers, or wrap it in your admin permission system.
{% endhint %}

***

## Server-Owned Boards

Managed entirely through `Config.Boards` — see [Configuration](/mole-resource-docs/scripts/hanoi-tower/configuration-file.md). Quick recap:

* Defined by coordinates in the config, created automatically at resource start
* Negative IDs, memory-only (never in the database), fresh layout after every restart
* Cannot be picked up by players
* To remove one: delete its entry from `Config.Boards` and restart the resource
