Plugin: Restrict - SignatureBeef/Terraria-s-Dedicated-Server-Mod GitHub Wiki
NOTE: Not all information on this page may be correct. TODO: Verify the correctness of information here. It was taken as an almost direct copy/paste from the old TDSM page for it.
Contents
Description |
Features |
Command Syntax |
Configuration |
Registering users manually
Removing Users |
Toggle Operator Status |
In-Game Registration
Description
Restrict is a general plugin for character name registration and guest privilege restriction.
Features
- A user registration system allowing users to submit registration requests in-game, that are approved by ops or from the console.
- Password authentication of registered users upon connection using the server password prompt. (But passwords don't need to be unique.)
- Automatic opping for registered operator users.
- Restricting guests' ability to destroy/place tiles, open chests, use explosives or liquids
- Restricting guests' ability to close/open doors
- Fully configurable without restarting the server
Command Syntax
All console/op commands use the same tokenizer, which splits argument on space-boundaries. To include multiple words as a single argument, surround them with double quotes like this:
"foo bar"
or escape the space with a slash:
foo\ bar
Literal quotes and slashes need to be escaped:
\" for a quote
\\ for a slash
The player /reg and /pass commands don't use this and need no escaping.
Configuration
Set the server name that is used for hashing passwords, don't change it after users have been added, because it'll invalidate old passwords.
ro --server-id servername
ro -s servername
Decide whether to allow guests in or not.
ro --allow-guests true|false
ro -g true|false
If guests are allowed in, whether to allow them to alter tiles and use explosives.
ro --restrict-guests true|false
ro -r true|false
Their ability to open doors can also be restricted.
ro --restrict-guests-doors true|false
ro -d true|false
To check the current configuration, simply:
ro
To reload the user database from disk:
ro --reload-users
ro -L
Registering users manually
Also works for changing passwords.
By specifying the plaintext password:
ru username -p password
Or by giving the SHA256 hash of the string username:servername:password, this allows registration to be done securely over forums or other public channels.
ru username hash
A SHA256 hash is a string of 64 hex digits. If you're on a unix machine, it can be obtained with the following command:
echo -n "username:servername:password" | sha256sum
Otherwise you may find hash calculators online, like this one: http://www.fileformat.info/tool/hash.htm
Removing Users
To unregister:
ur name
Toggle Operator Status
These commands with add or remove the operator status on an existing user.
ru -o name
ru name
In-Game Registration
Guests have a chat command available, that allows them to submit a request for registration.
/reg password
Registered users may change their passwords with:
/pass password
Online ops are notified of new requests. Pending requests can be listed with:
rr
To grant or deny a request, reference it by its number.
rr grant #
rr -g #
rr deny #
rr -d #
To register all requests
rr -all -g