diff --git a/README.md b/README.md index 4a2fd02..d22458c 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,107 @@ -# DayZ-rcon-python +# DayZ RCON Client CLI +This Python script provides a Command Line Interface (CLI) for DayZ server owners to manage their servers using RCON (Remote Console) commands. The script reads server credentials from a `credentials.json` file and offers various features such as listing players, sending messages, locking/unlocking the server, kicking, and banning players. + +## Features and Usage + +### Initial Setup + +1. **Credentials File**: + - The script checks if `credentials.json` exists. If not, it creates an example file that needs to be filled in with the server's actual details. + - Example credentials in `credentials.json`: + ```json + { + "SERVER_ADDRESS": "YOUR-SERVER-ADDRESS", + "SERVER_PORT": 2303, + "RCON_PASSWORD": "RCON_PASSWORD" + } + ``` +### Main Menu Options + +1. List players +2. Messaging +3. Locking +4. Kicking +5. Banning +6. Exit + +### Detailed Features + +1. **List Players**: + - Lists all the players currently connected to the server. + - Usage: Select option `1` from the main menu. + +2. **Messaging**: + - Sub-menu for messaging options: + ``` + 1. Send Global Message + 2. Send Direct Message + 3. Back + ``` + - **Send Global Message**: + - Sends a message to all players. + - Usage: Select option `2` -> `1`, then enter the message. + - **Send Direct Message**: + - Sends a message to a specific player. + - Usage: Select option `2` -> `2`, list players, enter the player number and the message. + +3. **Locking**: + - Sub-menu for locking options: + ``` + 1. Lock Server + 2. Unlock Server + 3. Back + ``` + - **Lock Server**: + - Locks the server, preventing new players from joining. + - Usage: Select option `3` -> `1`. + - **Unlock Server**: + - Unlocks the server, allowing new players to join. + - Usage: Select option `3` -> `2`. + +4. **Kicking**: + - Sub-menu for kicking options: + ``` + 1. Kick Single Player + 2. Kick All Players + 3. Back + ``` + - **Kick Single Player**: + - Kicks a specific player from the server. + - Usage: Select option `4` -> `1`, list players, enter the player number and reason. + - **Kick All Players** (currently unoperational): + - Attempts to kick all players from the server. + - Usage: Select option `4` -> `2`. + +5. **Banning**: + - Sub-menu for banning options: + ``` + 1. Show Banlist + 2. Ban Player + 3. Ban Player by SteamID + 4. Unban Player + 5. Back + ``` + - **Show Banlist**: + - Displays the list of banned players. + - Usage: Select option `5` -> `1`. + - **Ban Player**: + - Bans a specific player from the server. + - Usage: Select option `5` -> `2`, list players, enter the player number, ban time, and reason. + - **Ban Player by SteamID**: + - Bans a player by their SteamID. + - Usage: Select option `5` -> `3`, enter the SteamID, ban time, and reason. + - **Unban Player**: + - Removes a ban for a specific player. + - Usage: Select option `5` -> `4`, show banlist, enter the ban ID. + +6. **Exit**: + - Exits the CLI. + - Usage: Select option `6`. + +### Roadmap + +Future improvements planned for this CLI include: + +- Saving player connection data into a database. +- Monitoring server activity and logging data for analytics.