<commit_before>#!/bin/bash
# LinuxGSM alert_email.sh function
# Author: <NAME>
# Website: https://gameservermanagers.com
# Description: Sends email alert.

local commandname="ALERT"
local commandaction="Alert"
local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"

fn_details_gameserver(){
	#
	# Quake Live Server Details
	# =====================================
	# Server name:      ql-server
	# Server IP:        172.16.31.10:27960
	# RCON password:    <PASSWORD>
	# Server password:  <PASSWORD>
	# Maxplayers:		16
	# Status:           OFFLINE

	{
		echo -e ""
		echo -e "${gamename} Server Details"
		echo -e "================================="
		# Server name
		echo -e "Server name: ${servername}"

		# Server ip
		echo -e "Server IP: ${ip}:${port}"

		# Server password
		if [ -n "${serverpassword}" ]; then
			echo -e "Server password: ********"
		fi

		# RCON password
		if [ -n "${rconpassword}" ]; then
			echo -e "RCON password: ********"
		fi

		# Admin password
		if [ -n "${adminpassword}" ]; then
			echo -e "Admin password: ********"
		fi

		# Stats password (Quake Live)
		if [ -n "${statspassword}" ]; then
			echo -e "Stats password: ********"
		fi

		# Maxplayers
		if [ -n "${maxplayers}" ]; then
			echo -e "Maxplayers: ${maxplayers}"
		fi

		# Game mode
		if [ -n "${gamemode}" ]; then
			echo -e "Game mode: ${gamemode}"
		fi

		# Game world
		if [ -n "${gameworld}" ]; then
			echo -e "Game world: ${gameworld}"
		fi

		# Tick rate
		if [ -n "${tickrate}" ]; then
			echo -e "Tick rate: ${tickrate}"
		fi

		# TeamSpeak dbplugin
		if [ -n "${dbplugin}" ]; then
			echo -e "dbplugin: ${dbplugin}"
		fi

		# Online status
		if [ "${status}" == "0" ]; then
			echo -e "Status: OFFLINE"
		else
			echo -e "Status: ONLINE"
		fi
	} | sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g"| tee -a "${emaillog}" > /dev/null 2>&1
}

fn_print_dots "Sending Email alert: ${email}"
sleep 0.5
fn_script_log_info "Sending Email alert: ${email}"
info_distro.sh
info_config.sh
info_glibc.sh
info_messages.sh<commit_msg>removed fn_details_gameserver<commit_after>#!/bin/bash
# LinuxGSM alert_email.sh function
# Author: <NAME>
# Website: https://gameservermanagers.com
# Description: Sends email alert.

local commandname="ALERT"
local commandaction="Alert"
local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"

fn_print_dots "Sending Email alert: ${email}"
sleep 0.5
fn_script_log_info "Sending Email alert: ${email}"
info_distro.sh
info_config.sh
info_glibc.sh
info_messages.sh
{'fraction_non_alphanumeric': 0.19643564356435644, 'fraction_numerical': 0.013465346534653465, 'mean_word_length': 3.7039106145251397, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '790822', 'n_tokens_mistral': 1008, 'n_tokens_neox': 907, 'n_words': 245}