This script automatically sends notifications to specific players based on their roles during a match. The script checks the game state periodically and sends a message at the defined time.
ToDo: Execute the following commands after downloading:
- Copy the
.env.dist
file to.env
and enter your values. - Run the command
pip install python-dotenv
. - Copy
mic-master.service.dist
to/etc/systemd/system/mic-master.service
- Activate and start the service with
sudo systemctl enable mic-master.service
andsudo systemctl start mic-master.service
.
- Python 3.8 or above
pip
(Python package installer)
- Clone the repository:
git clone https://github.com/hackletloose/hall-mic-master/hall-mic-master.git cd hall-mic-master
- Install the required dependencies:
pip install -r requirements.txt
- Create a
.env
file in the root directory and add the following variables:API_TOKEN=your-api-token API_BASE_URL=your-api-base-url # http://rcon.example.com:8010 SLEEPTIMER=2 # Time between API queries (in minutes) TARGET_TIME=10 # Time after start of match to send the message (in minutes) START_TIME=90 # Duration of a warfare match (in minutes) MESSAGE_CONTENT="VOICECHECK!!!\n-------------\nJeder Offizier meldet sich JETZT im Offiziersfunk.\n\nEiner redet nicht?\nSchreib in den Chat:\n!admin Spieler XYZ redet nicht"
- Run the script:
python mic-master.py
The script will monitor the game state and send notifications based on the configuration.
SLEEPTIMER
: The interval (in minutes) between each API query.TARGET_TIME
: The time after the match starts when the message should be sent.START_TIME
: The total length of a match (in minutes).MESSAGE_CONTENT
: The content of the message that will be sent to the targeted roles.
The script will output relevant information and errors to the console to help you monitor its progress.
This project is licensed under the MIT License. See the LICENSE
file for more details.