Browse Source

player info test

pull/3051/head
Daniel Gibbs 5 years ago
parent
commit
12ef0311c5
  1. 9
      lgsm/functions/alert.sh
  2. 9
      lgsm/functions/alert_rocketchat.sh

9
lgsm/functions/alert.sh

@ -78,6 +78,15 @@ fn_alert_config(){
alertbody="${selfname} has received a new _default.cfg. Check file for changes."
}
if [ "${querymode}" == "2" ]||[ "${querymode}" == "3" ]; then
for queryip in "${queryips[@]}"; do
query_gamedig.sh
if [ "${querystatus}" == "0" ]; then
break
fi
done
fi
if [ "${alert}" == "permissions" ]; then
fn_alert_permissions
elif [ "${alert}" == "restart" ]; then

9
lgsm/functions/alert_rocketchat.sh

@ -14,12 +14,9 @@ fi
json=$(cat <<EOF
{
"alias": "LinuxGSM",
"text": "*${alertemoji} ${alertsubject} ${alertemoji}* + \n ${alertbody}",
"text": "*${alertemoji} ${alertsubject} ${alertemoji}* \n *${servername}* \n ${alertbody}",
"attachments": [
{
"title": "${servername}",
"text": "Hostname: ${HOSTNAME}",
"color": "#36a64f",
"fields": [
{
"short": true,
@ -33,8 +30,8 @@ json=$(cat <<EOF
},
{
"short": true,
"title": "Server Name:",
"value": "${servername}"
"title": "Players:",
"value": "${gdplayers}/${gdmaxplayers}"
}
]
}

Loading…
Cancel
Save