CLI
TincanServer Command-Line Interface (CLI) Guide
Tincan Server offers a command-line interface for real-time administrative management. This guide details each available command, including technical specifications, parameters, and usage examples.
General Usage
To execute a command, type it into the Tincan Server console. For help on a specific command, use:
[command] help
Example:
ban help
^ This would display the help info for the ban command.
Screenshot of the help command:
Commands Overview
- User Administrative Commands
- `ban`
- `unban`
- `allow`
- `disallow`
- `setpublic`
- `setprivate`
- `showall`
- Server Layout and Schema Commands
- `mkroom`
- `rmroom`
- Encryption Commands
- `encryption`
- Other Commands
- `endall`
- `help`
Command Details
ban
Bans a user from the server, preventing them from connecting.
Usage:
ban [username]
Parameters:
- `username`: The username of the user to ban.
Example:
ban jimbo1234
Notes:
- If the user is currently connected, they will be disconnected. - Banned users attempting to connect will receive a banned notification.
unban
Removes a user from the ban list, allowing them to connect.
Usage:
unban [username]
Parameters:
- `username`: The username of the user to unban.
Example:
unban jimbo1234
allow
Adds a user to the whitelist, permitting them to connect when the server is in private mode.
Usage:
allow [username]
Parameters:
- `username`: The username of the user to allow.
Example:
allow jimbosfriend22
disallow
Removes a user from the whitelist, preventing them from connecting when the server is in private mode. This does not ban them from joining in public mode.
Usage:
disallow [username]
Parameters:
- `username`: The username of the user to disallow.
Example:
disallow jimbosfriend22
Notes:
- No parameters are required. - In public mode, the whitelist is ignored.
setprivate
Sets the server mode to private, restricting connections to whitelisted users.
Usage:
setprivate
Notes:
- No parameters are required. - Users not on the whitelist cannot connect when in private mode.
showall
Displays lists of users based on the specified category.
Usage:
showall [category]
Parameters:
- `category`: The list to display. Options are `banned`, `whitelisted`, `active`, or `keys`.
Example:
showall banned
Categories:
- `banned`: Shows all banned users.
- `whitelisted`: Shows all whitelisted users.
- `active`: Shows all currently connected users, by username.
- `keys`: Shows all loaded encryption keys.
mkroom
Creates a new chat or voice room.
Usage:
mkroom [roomName] [voice|chat]
Parameters:
- `roomName`: The name of the room to create.
- `voice|chat`: Specify `voice` for a voice room or `chat` for a chat room.
Example:
mkroom "squad talk" voice
Notes:
- Optional: Set a custom room description when prompted. - Room names with spaces should be enclosed in quotes.
rmroom
Removes an existing room.
Usage:
rmroom [roomname]
Parameters:
- `roomName`: The name of the room to remove.
Example:
rmroom "squad talk"
Notes:
- Room names with spaces should be enclosed in quotes.
encryption
Manages server encryption settings and keys.
Usage:
encryption [subcommand] [options]
- `Subcommands`
- `genkey`: Generates a new AES encryption key.
- `set`: Sets encryption settings.
- `test`: Tests encryption with a provided message.
- `help`: Displays help for the encryption command.
- `Encryption settings`
- `encryptstored [true|false]`: Encrypt stored messages using the current AES key.
- `showdecrypted [true|false]`: Display decrypted messages in the live preview.
- `aeskey [keyname|filepath]`: Sets the active AES key by name or file path.
Example:
- Generate a new key:
encryption genkey
- Set to encrypt stored messages:
encryption set encryptstored true
- Set to display decrypted messages:
encryption set showdecrypted true
- Set the active AES key:
encryption set showdecrypted true
- Test encryption with a message:
encryption test "This is a test message."
Notes:
- Use `encryption help` for detailed information.
endall
Disconnects all connected users and stops the server. This is essentially a kill switch for the server.
Usage:
endall
help
Displays a list of available commands or help for a specific command.
Usage:
[command] help
Notes:
- Using `help` alone lists all commands with brief descriptions. - `[command] help` provides detailed usage for that command.
Additional Tips 💡
- Parameter Format: When providing parameters that contain spaces, enclose them in quotes.
- Error Messages: The server console will display error messages in red for invalid commands or usage.
- Command Feedback: Successful operations will provide confirmation messages.