From 05430e32b2e58cfc77a9b9deb24750480b906953 Mon Sep 17 00:00:00 2001 From: Luis Martin Schick Date: Sun, 28 Feb 2021 00:42:07 +0100 Subject: [PATCH 01/11] Changed Node version from Current to 14.x --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 108b494f..7b739a95 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ SquadJS relies on being able to access the Squad server log directory in order t #### Prerequisites * Git - * [Node.js](https://nodejs.org/en/) (Current) - [Download](https://nodejs.org/en/) + * [Node.js](https://nodejs.org/en/) (14.x) - [Download](https://nodejs.org/en/) * [Yarn](https://yarnpkg.com/) (Version 1.22.0+) - [Download](https://classic.yarnpkg.com/en/docs/install) * Some plugins may have additional requirements. From 82586a970a2f4ec36e6ae2f374478f0a993d89bc Mon Sep 17 00:00:00 2001 From: got2bhockey Date: Sat, 27 Feb 2021 19:03:10 -0500 Subject: [PATCH 02/11] Ported Grafana dashboard to v2 format --- squad-server/plugins/db-log.js | 2 +- .../templates/SquadJS-Dashboard-v2.json | 3448 +++++++++++++++++ 2 files changed, 3449 insertions(+), 1 deletion(-) create mode 100644 squad-server/templates/SquadJS-Dashboard-v2.json diff --git a/squad-server/plugins/db-log.js b/squad-server/plugins/db-log.js index a0cd72b7..f665b966 100644 --- a/squad-server/plugins/db-log.js +++ b/squad-server/plugins/db-log.js @@ -14,7 +14,7 @@ export default class DBLog extends BasePlugin { '' ); } diff --git a/squad-server/templates/SquadJS-Dashboard-v2.json b/squad-server/templates/SquadJS-Dashboard-v2.json new file mode 100644 index 00000000..5ac32f03 --- /dev/null +++ b/squad-server/templates/SquadJS-Dashboard-v2.json @@ -0,0 +1,3448 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 2, + "id": 7, + "iteration": 1614468639214, + "links": [], + "panels": [ + { + "columnAliases": [], + "columnFiltersEnabled": false, + "columnWidthHints": [], + "columns": [], + "compactRowsEnabled": false, + "datasource": "MySQL", + "datatablePagingType": "simple_numbers", + "datatableTheme": "basic_theme", + "description": "This panel does not sort top scores. ", + "emptyData": false, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "fontSize": "100%", + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 0 + }, + "hoverEnabled": true, + "id": 35, + "infoEnabled": true, + "lengthChangeEnabled": true, + "orderColumnEnabled": true, + "pagingTypes": [ + { + "text": "Page number buttons only", + "value": "numbers" + }, + { + "text": "'Previous' and 'Next' buttons only", + "value": "simple" + }, + { + "text": "'Previous' and 'Next' buttons, plus page numbers", + "value": "simple_numbers" + }, + { + "text": "'First', 'Previous', 'Next' and 'Last' buttons", + "value": "full" + }, + { + "text": "'First', 'Previous', 'Next' and 'Last' buttons, plus page numbers", + "value": "full_numbers" + }, + { + "text": "'First' and 'Last' buttons, plus page numbers", + "value": "first_last_numbers" + } + ], + "panelHeight": null, + "pluginVersion": "7.1.1", + "rowNumbersEnabled": false, + "rowsPerPage": 5, + "scroll": false, + "scrollHeight": "default", + "searchEnabled": true, + "showCellBorders": false, + "showHeader": true, + "showRowBorders": true, + "sort": { + "col": 0, + "desc": true + }, + "sortByColumns": [ + { + "columnData": "Kills", + "sortMethod": "desc" + } + ], + "sortByColumnsData": [ + [ + 3, + "desc" + ] + ], + "stripedRowsEnabled": true, + "styles": [ + { + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "date" + }, + { + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "decimals": 2, + "pattern": "/.*/", + "splitPattern": "/ /", + "thresholds": [], + "type": "string", + "unit": "short" + } + ], + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\r\n m.attacker AS \"Steam ID\",\r\n m.attackerName AS \"Name\",\r\n `Wounds`,\r\n `Kills`,\r\n `Deaths`,\r\n `Kills`/`Deaths` AS `K/D`,\r\n `Revives`\r\nFROM `DBLog_Wounds` m\r\nLEFT JOIN (\r\n SELECT\r\n attacker,\r\n COUNT(*) AS `Wounds`\r\n FROM `DBLog_Wounds`\r\n WHERE\r\n $__timeFilter(time) AND\r\n server = $SERVER_ID\r\n GROUP BY attacker\r\n) w ON w.attacker = m.attacker\r\nLEFT JOIN (\r\n SELECT\r\n attacker,\r\n COUNT(*) AS `Kills`\r\n FROM `DBLog_Deaths`\r\n WHERE\r\n $__timeFilter(time) AND\r\n server = $SERVER_ID\r\n GROUP BY attacker\r\n) k ON k.attacker = m.attacker\r\nLEFT JOIN (\r\n SELECT\r\n victim,\r\n COUNT(*) AS `Deaths`\r\n FROM `DBLog_Deaths`\r\n WHERE\r\n $__timeFilter(time) AND\r\n server = $SERVER_ID\r\n GROUP BY victim\r\n) d ON d.victim = m.attacker\r\nLEFT JOIN (\r\n SELECT\r\n reviver,\r\n COUNT(*) AS `Revives`\r\n FROM `DBLog_Revives`\r\n WHERE\r\n $__timeFilter(time) AND\r\n server = $SERVER_ID\r\n GROUP BY reviver\r\n) r ON r.reviver = m.attacker\r\n WHERE\r\n $__timeFilter(time) AND\r\n server = $SERVER_ID \r\nGROUP BY m.attacker\r\nHAVING `K/D` IS NOT NULL;", + "refId": "A", + "select": [ + [ + { + "params": [ + "id" + ], + "type": "column" + } + ] + ], + "table": "DBLog_TickRates", + "timeColumn": "time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "themeOptions": { + "dark": "./styles/dark.scss", + "light": "./styles/light.scss" + }, + "themes": [ + { + "disabled": false, + "text": "Basic", + "value": "basic_theme" + }, + { + "disabled": true, + "text": "Bootstrap", + "value": "bootstrap_theme" + }, + { + "disabled": true, + "text": "Foundation", + "value": "foundation_theme" + }, + { + "disabled": true, + "text": "ThemeRoller", + "value": "themeroller_theme" + } + ], + "timeFrom": null, + "timeShift": null, + "title": " Only for search in the top scores - This panel does not sort top scores. ", + "transform": "table", + "type": "briangann-datatable-panel" + }, + { + "columns": [], + "datasource": "MySQL", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "fontSize": "100%", + "gridPos": { + "h": 14, + "w": 24, + "x": 0, + "y": 9 + }, + "id": 32, + "pageSize": null, + "showHeader": true, + "sort": { + "col": 3, + "desc": true + }, + "styles": [], + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\r\n m.attacker AS \"Steam ID\",\r\n m.attackerName AS \"Name\",\r\n `Wounds`,\r\n `Kills`,\r\n `Deaths`,\r\n `Kills`/`Deaths` AS `K/D`,\r\n `Revives`\r\nFROM `DBLog_Wounds` m\r\nLEFT JOIN (\r\n SELECT\r\n attacker,\r\n COUNT(*) AS `Wounds`\r\n FROM `DBLog_Wounds`\r\n WHERE\r\n $__timeFilter(time) AND\r\n server = $SERVER_ID\r\n GROUP BY attacker\r\n) w ON w.attacker = m.attacker\r\nLEFT JOIN (\r\n SELECT\r\n attacker,\r\n COUNT(*) AS `Kills`\r\n FROM `DBLog_Deaths`\r\n WHERE\r\n $__timeFilter(time) AND\r\n server = $SERVER_ID\r\n GROUP BY attacker\r\n) k ON k.attacker = m.attacker\r\nLEFT JOIN (\r\n SELECT\r\n victim,\r\n COUNT(*) AS `Deaths`\r\n FROM `DBLog_Deaths`\r\n WHERE\r\n $__timeFilter(time) AND\r\n server = $SERVER_ID\r\n GROUP BY victim\r\n) d ON d.victim = m.attacker\r\nLEFT JOIN (\r\n SELECT\r\n reviver,\r\n COUNT(*) AS `Revives`\r\n FROM `DBLog_Revives`\r\n WHERE\r\n $__timeFilter(time) AND\r\n server = $SERVER_ID\r\n GROUP BY reviver\r\n) r ON r.reviver = m.attacker\r\n WHERE\r\n $__timeFilter(time) AND\r\n server = $SERVER_ID \r\nGROUP BY m.attacker\r\nHAVING `K/D` IS NOT NULL;", + "refId": "B", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Top Scorers", + "transform": "table", + "type": "table-old" + }, + { + "datasource": "MySQL", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": {}, + "displayName": "", + "mappings": [], + "max": 60, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-red", + "value": null + }, + { + "color": "yellow", + "value": 15 + }, + { + "color": "dark-green", + "value": 20 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 0, + "y": 23 + }, + "id": 16, + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "7.1.4", + "targets": [ + { + "format": "time_series", + "group": [], + "groupBy": [], + "measurement": "tick_rate", + "metricColumn": "none", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT LAST(\"tick_rate\") FROM \"DBLog_TickRates\" WHERE server = '$SERVER_ID'", + "rawQuery": true, + "rawSql": "SELECT\n time AS \"time\",\n tickRate\nFROM DBLog_TickRates\nWHERE\n $__timeFilter(time) AND\n server = \"$SERVER_ID\"\nORDER BY time DESC", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tick_rate" + ], + "type": "column" + } + ] + ], + "table": "DBLog_TickRates", + "tags": [], + "timeColumn": "time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + }, + { + "datatype": "int", + "name": "", + "params": [ + "server", + "=", + "$SERVER" + ], + "type": "expression" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Current Tick Rate", + "type": "gauge" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "MySQL", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 18, + "x": 6, + "y": 23 + }, + "hiddenSeries": false, + "id": 2, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pluginVersion": "7.1.4", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "format": "time_series", + "group": [ + { + "params": [ + "$__interval", + "none" + ], + "type": "time" + } + ], + "groupBy": [ + { + "params": [ + "5m" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tick_rate", + "metricColumn": "none", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT \n mean(\"tick_rate\") \nFROM \"DBLog_TickRates\" \nWHERE \n $timeFilter AND\n server = '$SERVER_ID'\nGROUP BY time($INTERVAL) fill(null)", + "rawQuery": true, + "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n avg(tickRate) AS \"tick_rate\"\nFROM DBLog_TickRates\nWHERE\n $__timeFilter(time) AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(time,$__interval)", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tick_rate" + ], + "type": "column" + }, + { + "params": [ + "avg" + ], + "type": "aggregate" + }, + { + "params": [ + "tick_rate" + ], + "type": "alias" + } + ] + ], + "table": "DBLog_TickRates", + "tags": [], + "timeColumn": "time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": [ + { + "colorMode": "custom", + "fill": false, + "fillColor": "rgba(50, 116, 217, 0.2)", + "line": true, + "lineColor": "#F2495C", + "op": "lt", + "value": 15, + "yaxis": "left" + }, + { + "colorMode": "custom", + "fill": false, + "fillColor": "rgba(50, 116, 217, 0.2)", + "line": true, + "lineColor": "#FADE2A", + "op": "lt", + "value": 20, + "yaxis": "left" + } + ], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Tick Rate", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": "60", + "min": "0", + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "datasource": "MySQL", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": {}, + "displayName": "", + "mappings": [], + "max": 80, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "orange", + "value": null + }, + { + "color": "green", + "value": 50 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 0, + "y": 31 + }, + "id": 27, + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "7.1.4", + "targets": [ + { + "format": "time_series", + "group": [ + { + "params": [ + "$__interval", + "none" + ], + "type": "time" + } + ], + "groupBy": [], + "measurement": "tick_rate", + "metricColumn": "none", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT LAST(\"player_count\") FROM \"DBLog_PlayerCounts\" WHERE server = '$SERVER_ID'", + "rawQuery": true, + "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n players AS \"Player Count\"\nFROM DBLog_PlayerCounts\nWHERE\n $__timeFilter(time) AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(time,$__interval) DESC\nLIMIT 1", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "player_count" + ], + "type": "column" + }, + { + "params": [ + "Player Count" + ], + "type": "alias" + } + ] + ], + "table": "DBLog_PlayerCounts", + "tags": [], + "timeColumn": "time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Current Player Count", + "type": "gauge" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "MySQL", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 18, + "x": 6, + "y": 31 + }, + "hiddenSeries": false, + "id": 28, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pluginVersion": "7.1.4", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "format": "time_series", + "group": [ + { + "params": [ + "$__interval", + "none" + ], + "type": "time" + } + ], + "groupBy": [ + { + "params": [ + "5m" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tick_rate", + "metricColumn": "none", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT \n MEAN(\"player_count\") \nFROM \"DBLog_PlayerCounts\" \nWHERE \n $timeFilter AND\n server = '$SERVER_ID'\nGROUP BY time($INTERVAL) fill(null)", + "rawQuery": true, + "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n avg(players) AS \"player_count\"\nFROM DBLog_PlayerCounts\nWHERE\n $__timeFilter(time) AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(time,$__interval)", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "player_count" + ], + "type": "column" + }, + { + "params": [ + "avg" + ], + "type": "aggregate" + }, + { + "params": [ + "player_count" + ], + "type": "alias" + } + ] + ], + "table": "DBLog_PlayerCounts", + "tags": [], + "timeColumn": "time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": [ + { + "colorMode": "custom", + "fill": false, + "fillColor": "rgba(50, 116, 217, 0.2)", + "line": true, + "lineColor": "#FF9830", + "op": "lt", + "value": 50, + "yaxis": "left" + } + ], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Player Count", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": "80", + "min": "0", + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "MySQL", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 0, + "y": 39 + }, + "id": 12, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": " Wounds", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": true, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "time_series", + "group": [ + { + "params": [ + "$__interval", + "none" + ], + "type": "time" + } + ], + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "metricColumn": "none", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT COUNT(\"victimName\") \nFROM DBLog_Wounds\nWHERE \n $timeFilter AND\n server = '$SERVER_ID'", + "rawQuery": true, + "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n count(id) AS \"id\"\nFROM DBLog_Wounds\nWHERE\n $__timeFilter(time) AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(time,$__interval)", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "id" + ], + "type": "column" + }, + { + "params": [ + "count" + ], + "type": "aggregate" + }, + { + "params": [ + "id" + ], + "type": "alias" + } + ] + ], + "table": "DBLog_Wounds", + "tags": [], + "timeColumn": "time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Wounded in Time Period", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "avg" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "MySQL", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 6, + "y": 39 + }, + "id": 13, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": " Deaths", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": true, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "time_series", + "group": [ + { + "params": [ + "$__interval", + "none" + ], + "type": "time" + } + ], + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "metricColumn": "none", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT \n count(\"victimName\") \nFROM \"DBLog_Deaths\"\nWHERE \n $timeFilter AND\n server = '$SERVER_ID'", + "rawQuery": true, + "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n count(id) AS \"id\"\nFROM DBLog_Deaths\nWHERE\n $__timeFilter(time) AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(time,$__interval)", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "id" + ], + "type": "column" + }, + { + "params": [ + "count" + ], + "type": "aggregate" + }, + { + "params": [ + "id" + ], + "type": "alias" + } + ] + ], + "table": "DBLog_Deaths", + "tags": [], + "timeColumn": "time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Deaths in Time Period", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "avg" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "MySQL", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 12, + "y": 39 + }, + "id": 10, + "interval": "", + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": " TKs", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": true, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "time_series", + "group": [ + { + "params": [ + "$__interval", + "none" + ], + "type": "time" + } + ], + "groupBy": [], + "measurement": "player_wound", + "metricColumn": "none", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT \n count(\"victimName\") \nFROM \"DBLog_Wounds\"\nWHERE \n teamkill = true AND\n $timeFilter AND\n server = '$SERVER_ID'", + "rawQuery": true, + "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n count(id) AS \"id\"\nFROM DBLog_Wounds\nWHERE\n $__timeFilter(time) AND\n teamkill = '1' AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(time,$__interval)", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "id" + ], + "type": "column" + }, + { + "params": [ + "count" + ], + "type": "aggregate" + }, + { + "params": [ + "id" + ], + "type": "alias" + } + ] + ], + "table": "DBLog_Wounds", + "tags": [], + "timeColumn": "time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + }, + { + "datatype": "tinyint", + "name": "", + "params": [ + "teamkill", + "=", + "'1'" + ], + "type": "expression" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "TKs in Time Period", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "MySQL", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 18, + "y": 39 + }, + "id": 14, + "interval": "", + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": " Revives", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": true, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "time_series", + "group": [ + { + "params": [ + "$__interval", + "none" + ], + "type": "time" + } + ], + "groupBy": [], + "measurement": "revive", + "metricColumn": "none", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT count(\"victimName\") FROM \"DBLog_Revives\" WHERE $timeFilter AND server = '$SERVER_ID'", + "rawQuery": true, + "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n count(id) AS \"id\"\nFROM DBLog_Revives\nWHERE\n $__timeFilter(time) AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(time,$__interval)", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "id" + ], + "type": "column" + }, + { + "params": [ + "count" + ], + "type": "aggregate" + }, + { + "params": [ + "id" + ], + "type": "alias" + } + ] + ], + "table": "DBLog_Revives", + "tags": [], + "timeColumn": "time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Revives in Time Period", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "columns": [], + "datasource": "MySQL", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "fontSize": "100%", + "gridPos": { + "h": 13, + "w": 24, + "x": 0, + "y": 43 + }, + "id": 4, + "pageSize": null, + "showHeader": true, + "sort": { + "col": 0, + "desc": true + }, + "styles": [ + { + "alias": "", + "align": "auto", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "Time", + "thresholds": [], + "type": "date", + "unit": "short" + } + ], + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n a.time AS \"Time\",\n a.attacker AS \"Attacker\",\n a.attackerName AS \"Attacker Name\",\n a.weapon AS \"Weapon\",\n a.victim AS \"Victim\",\n a.victimName AS \"Victim Name\",\n Total AS \"Total in Time Frame\"\nFROM DBLog_Wounds a\nJOIN\n (\n SELECT\n attacker,\n COUNT(*) AS \"Total\"\n FROM DBLog_Wounds\n WHERE \n $__timeFilter(time) AND\n server = $SERVER_ID AND\n teamkill = true\n GROUP BY attacker\n ) AS b\n ON a.attacker = b.attacker\nWHERE \n $__timeFilter(time) AND\n server = $SERVER_ID AND\n teamkill = true AND\n server = $SERVER_ID\nORDER BY time DESC\nLIMIT 30;", + "refId": "B", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Recent Teamkills", + "transform": "table", + "type": "table-old" + }, + { + "aliasColors": {}, + "breakPoint": "50%", + "cacheTimeout": null, + "combine": { + "label": "Others", + "threshold": 0 + }, + "datasource": "MySQL", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "fontSize": "80%", + "format": "short", + "gridPos": { + "h": 9, + "w": 6, + "x": 0, + "y": 56 + }, + "id": 20, + "interval": null, + "legend": { + "percentage": true, + "show": true, + "values": true + }, + "legendType": "Under graph", + "links": [], + "maxDataPoints": 3, + "nullPointMode": "connected", + "pieType": "pie", + "strokeWidth": 1, + "targets": [ + { + "alias": "Non-Teamkills", + "format": "time_series", + "group": [ + { + "params": [ + "$__interval", + "none" + ], + "type": "time" + } + ], + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "metricColumn": "none", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT \n COUNT(\"victimName\") \nFROM \"DBLog_Wounds\" \nWHERE \n $timeFilter AND\n server = '$SERVER_ID' AND\n teamkill = false", + "rawQuery": true, + "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n count(id) AS \"Non-Teamkill\"\nFROM DBLog_Wounds\nWHERE\n $__timeFilter(time) AND\n teamkill = 0 AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(time,$__interval)", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "id" + ], + "type": "column" + }, + { + "params": [ + "count" + ], + "type": "aggregate" + }, + { + "params": [ + "Non-Teamkill" + ], + "type": "alias" + } + ] + ], + "table": "DBLog_Wounds", + "tags": [], + "timeColumn": "time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + }, + { + "datatype": "tinyint", + "name": "", + "params": [ + "teamkill", + "=", + "0" + ], + "type": "expression" + } + ] + }, + { + "alias": "Teamkills", + "format": "time_series", + "group": [ + { + "params": [ + "$__interval", + "none" + ], + "type": "time" + } + ], + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "metricColumn": "none", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT \n COUNT(\"victimName\") \nFROM \"DBLog_Wounds\" \nWHERE \n $timeFilter AND\n server = '$SERVER_ID' AND\n teamkill = true", + "rawQuery": true, + "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n count(id) AS \"Teamkill\"\nFROM DBLog_Wounds\nWHERE\n $__timeFilter(time) AND\n teamkill = '1' AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(time,$__interval)", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "id" + ], + "type": "column" + }, + { + "params": [ + "count" + ], + "type": "aggregate" + }, + { + "params": [ + "Teamkill" + ], + "type": "alias" + } + ] + ], + "table": "DBLog_Wounds", + "tags": [], + "timeColumn": "time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + }, + { + "datatype": "tinyint", + "name": "", + "params": [ + "teamkill", + "=", + "'1'" + ], + "type": "expression" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Non-Teamkills vs Teamkills (Wounds)", + "type": "grafana-piechart-panel", + "valueName": "current" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "MySQL", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 18, + "x": 6, + "y": 56 + }, + "hiddenSeries": false, + "id": 29, + "interval": "2m", + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pluginVersion": "7.1.4", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "Players Wounded", + "format": "time_series", + "group": [ + { + "params": [ + "$__interval", + "none" + ], + "type": "time" + } + ], + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "0" + ], + "type": "fill" + } + ], + "measurement": "player_wound", + "metricColumn": "none", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT count(\"victimName\") FROM \"DBLog_Wounds\" WHERE $timeFilter AND server = '$SERVER_ID' GROUP BY time($INTERVAL) fill(0)", + "rawQuery": true, + "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n count(id) AS \"All\"\nFROM DBLog_Wounds\nWHERE\n $__timeFilter(time) AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(time,$__interval)", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "id" + ], + "type": "column" + }, + { + "params": [ + "count" + ], + "type": "aggregate" + }, + { + "params": [ + "All" + ], + "type": "alias" + } + ] + ], + "table": "DBLog_Wounds", + "tags": [], + "timeColumn": "time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + }, + { + "alias": "Players Wounded By Team 1", + "format": "time_series", + "group": [ + { + "params": [ + "$__interval", + "none" + ], + "type": "time" + } + ], + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "0" + ], + "type": "fill" + } + ], + "measurement": "player_die", + "metricColumn": "none", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT count(\"victimName\") FROM \"DBLog_Wounds\" WHERE $timeFilter AND server = '$SERVER_ID' AND attackerTeamID=1 GROUP BY time($INTERVAL) fill(0)", + "rawQuery": true, + "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n count(id) AS \"Team 1\"\nFROM DBLog_Wounds\nWHERE\n $__timeFilter(time) AND\n attackerTeamID = 1 AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(time,$__interval)", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "id" + ], + "type": "column" + }, + { + "params": [ + "count" + ], + "type": "aggregate" + }, + { + "params": [ + "Team 1" + ], + "type": "alias" + } + ] + ], + "table": "DBLog_Wounds", + "tags": [], + "timeColumn": "time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + }, + { + "datatype": "int", + "name": "", + "params": [ + "attackerTeamID", + "=", + "1" + ], + "type": "expression" + } + ] + }, + { + "alias": "Players Wounded By Team 2", + "format": "time_series", + "group": [ + { + "params": [ + "$__interval", + "none" + ], + "type": "time" + } + ], + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "0" + ], + "type": "fill" + } + ], + "measurement": "player_die", + "metricColumn": "none", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT count(\"victimName\") FROM \"DBLog_Wounds\" WHERE $timeFilter AND server = '$SERVER_ID' AND attackerTeamID=2 GROUP BY time($INTERVAL) fill(0)", + "rawQuery": true, + "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n count(id) AS \"Team 2\"\nFROM DBLog_Wounds\nWHERE\n $__timeFilter(time) AND\n attackerTeamID = 2 AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(time,$__interval)", + "refId": "C", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "id" + ], + "type": "column" + }, + { + "params": [ + "count" + ], + "type": "aggregate" + }, + { + "params": [ + "Team 2" + ], + "type": "alias" + } + ] + ], + "table": "DBLog_Wounds", + "tags": [], + "timeColumn": "time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + }, + { + "datatype": "int", + "name": "", + "params": [ + "attackerTeamID", + "=", + "2" + ], + "type": "expression" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Wounds Per Minutes", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "breakPoint": "50%", + "cacheTimeout": null, + "combine": { + "label": "Others", + "threshold": 0 + }, + "datasource": "MySQL", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "fontSize": "80%", + "format": "short", + "gridPos": { + "h": 9, + "w": 6, + "x": 0, + "y": 65 + }, + "id": 18, + "interval": null, + "legend": { + "header": "", + "percentage": true, + "show": true, + "sideWidth": null, + "values": true + }, + "legendType": "Under graph", + "links": [], + "maxDataPoints": 3, + "nullPointMode": "connected", + "pieType": "pie", + "strokeWidth": 1, + "targets": [ + { + "alias": "Deaths", + "format": "time_series", + "group": [ + { + "params": [ + "$__interval", + "none" + ], + "type": "time" + } + ], + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "player_die", + "metricColumn": "none", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT \n COUNT(\"victimName\") \nFROM \"DBLog_Deaths\" \nWHERE \n $timeFilter ", + "rawQuery": true, + "rawSql": "SELECT\n $__timeGroupAlias(woundTime,$__interval),\n count(id) AS \"Deaths\"\nFROM DBLog_Deaths\nWHERE\n $__timeFilter(woundTime) AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(woundTime,$__interval)", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "id" + ], + "type": "column" + }, + { + "params": [ + "count" + ], + "type": "aggregate" + }, + { + "params": [ + "Deaths" + ], + "type": "alias" + } + ] + ], + "table": "DBLog_Deaths", + "tags": [], + "timeColumn": "woundTime", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + }, + { + "alias": "Revives", + "format": "time_series", + "group": [ + { + "params": [ + "$__interval", + "none" + ], + "type": "time" + } + ], + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "metricColumn": "none", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT \n COUNT(\"victimName\") \nFROM \"DBLog_Revives\" \nWHERE \n $timeFilter ", + "rawQuery": true, + "rawSql": "SELECT\n $__timeGroupAlias(woundTime,$__interval),\n count(id) AS \"Revives\"\nFROM DBLog_Revives\nWHERE\n $__timeFilter(woundTime) AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(woundTime,$__interval)", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "id" + ], + "type": "column" + }, + { + "params": [ + "count" + ], + "type": "aggregate" + }, + { + "params": [ + "Revives" + ], + "type": "alias" + } + ] + ], + "table": "DBLog_Revives", + "tags": [], + "timeColumn": "woundTime", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Deaths vs Revives", + "type": "grafana-piechart-panel", + "valueName": "current" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "MySQL", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 18, + "x": 6, + "y": 65 + }, + "hiddenSeries": false, + "id": 6, + "interval": "2m", + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pluginVersion": "7.1.4", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "Players Killed", + "format": "time_series", + "group": [ + { + "params": [ + "$__interval", + "none" + ], + "type": "time" + } + ], + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "0" + ], + "type": "fill" + } + ], + "measurement": "player_wound", + "metricColumn": "none", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT count(\"victimName\") FROM \"DBLog_Deaths\" WHERE $timeFilter AND server = '$SERVER_ID' GROUP BY time($INTERVAL) fill(0)", + "rawQuery": true, + "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n count(id) AS \"All\"\nFROM DBLog_Deaths\nWHERE\n $__timeFilter(time) AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(time,$__interval)", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "id" + ], + "type": "column" + }, + { + "params": [ + "count" + ], + "type": "aggregate" + }, + { + "params": [ + "All" + ], + "type": "alias" + } + ] + ], + "table": "DBLog_Deaths", + "tags": [], + "timeColumn": "time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + }, + { + "alias": "Players Killed By Team 1", + "format": "time_series", + "group": [ + { + "params": [ + "$__interval", + "none" + ], + "type": "time" + } + ], + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "0" + ], + "type": "fill" + } + ], + "measurement": "player_die", + "metricColumn": "none", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT count(\"victimName\") FROM \"DBLog_Deaths\" WHERE $timeFilter AND server = '$SERVER_ID' AND attackerTeamID=1 GROUP BY time($INTERVAL) fill(0)", + "rawQuery": true, + "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n count(id) AS \"Team 1\"\nFROM DBLog_Deaths\nWHERE\n $__timeFilter(time) AND\n attackerTeamID = 1 AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(time,$__interval)", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "id" + ], + "type": "column" + }, + { + "params": [ + "count" + ], + "type": "aggregate" + }, + { + "params": [ + "Team 1" + ], + "type": "alias" + } + ] + ], + "table": "DBLog_Deaths", + "tags": [], + "timeColumn": "time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + }, + { + "datatype": "int", + "name": "", + "params": [ + "attackerTeamID", + "=", + "1" + ], + "type": "expression" + } + ] + }, + { + "alias": "Players Killed By Team 2", + "format": "time_series", + "group": [ + { + "params": [ + "$__interval", + "none" + ], + "type": "time" + } + ], + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "0" + ], + "type": "fill" + } + ], + "measurement": "player_die", + "metricColumn": "none", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT count(\"victimName\") FROM \"DBLog_Deaths\" WHERE $timeFilter AND server = '$SERVER_ID' AND attackerTeamID=2 GROUP BY time($INTERVAL) fill(0)", + "rawQuery": true, + "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n count(id) AS \"Team 2\"\nFROM DBLog_Deaths\nWHERE\n $__timeFilter(time) AND\n attackerTeamID = 2 AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(time,$__interval)", + "refId": "C", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "id" + ], + "type": "column" + }, + { + "params": [ + "count" + ], + "type": "aggregate" + }, + { + "params": [ + "Team 2" + ], + "type": "alias" + } + ] + ], + "table": "DBLog_Deaths", + "tags": [], + "timeColumn": "time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + }, + { + "datatype": "int", + "name": "", + "params": [ + "attackerTeamID", + "=", + "2" + ], + "type": "expression" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Kills Per Minutes", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "breakPoint": "50%", + "cacheTimeout": null, + "combine": { + "label": "Others", + "threshold": 0 + }, + "datasource": "MySQL", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "fontSize": "80%", + "format": "short", + "gridPos": { + "h": 9, + "w": 6, + "x": 0, + "y": 74 + }, + "id": 31, + "interval": null, + "legend": { + "percentage": true, + "show": true, + "values": true + }, + "legendType": "Under graph", + "links": [], + "maxDataPoints": 3, + "nullPointMode": "connected", + "pieType": "pie", + "strokeWidth": 1, + "targets": [ + { + "alias": "Team 1 Kills", + "format": "time_series", + "group": [ + { + "params": [ + "$__interval", + "none" + ], + "type": "time" + } + ], + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "metricColumn": "none", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT count(\"victimName\") FROM \"DBLog_Deaths\" WHERE $timeFilter AND server = '$SERVER_ID' AND attackerTeamID=1", + "rawQuery": true, + "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n count(id) AS \"Team 1\"\nFROM DBLog_Wounds\nWHERE\n $__timeFilter(time) AND\n attackerTeamID = 1 AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(time,$__interval)", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "id" + ], + "type": "column" + }, + { + "params": [ + "count" + ], + "type": "aggregate" + }, + { + "params": [ + "Team 1" + ], + "type": "alias" + } + ] + ], + "table": "DBLog_Wounds", + "tags": [], + "timeColumn": "time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + }, + { + "datatype": "int", + "name": "", + "params": [ + "attackerTeamID", + "=", + "1" + ], + "type": "expression" + } + ] + }, + { + "alias": "Team 2 Kills", + "format": "time_series", + "group": [ + { + "params": [ + "$__interval", + "none" + ], + "type": "time" + } + ], + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "metricColumn": "none", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT count(\"victimName\") FROM \"DBLog_Deaths\" WHERE $timeFilter AND server = '$SERVER_ID' AND attackerTeamID=2", + "rawQuery": true, + "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n count(id) AS \"Team 2\"\nFROM DBLog_Wounds\nWHERE\n $__timeFilter(time) AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(time,$__interval)", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "id" + ], + "type": "column" + }, + { + "params": [ + "count" + ], + "type": "aggregate" + }, + { + "params": [ + "Team 2" + ], + "type": "alias" + } + ] + ], + "table": "DBLog_Wounds", + "tags": [], + "timeColumn": "time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Team 1 vs Team 2", + "type": "grafana-piechart-panel", + "valueName": "current" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "MySQL", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 18, + "x": 6, + "y": 74 + }, + "hiddenSeries": false, + "id": 8, + "interval": "2m", + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pluginVersion": "7.1.4", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "Revives", + "format": "time_series", + "group": [ + { + "params": [ + "$__interval", + "none" + ], + "type": "time" + } + ], + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "0" + ], + "type": "fill" + } + ], + "measurement": "revive", + "metricColumn": "none", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT count(\"victimName\") FROM \"DBLog_Revives\" WHERE $timeFilter AND server = '$SERVER_ID' GROUP BY time($INTERVAL) fill(0)", + "rawQuery": true, + "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n count(id) AS \"All\"\nFROM DBLog_Revives\nWHERE\n $__timeFilter(time) AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(time,$__interval)", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "id" + ], + "type": "column" + }, + { + "params": [ + "count" + ], + "type": "aggregate" + }, + { + "params": [ + "All" + ], + "type": "alias" + } + ] + ], + "table": "DBLog_Revives", + "tags": [], + "timeColumn": "time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + }, + { + "alias": "Revives", + "format": "time_series", + "group": [ + { + "params": [ + "$__interval", + "none" + ], + "type": "time" + } + ], + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "0" + ], + "type": "fill" + } + ], + "measurement": "revive", + "metricColumn": "none", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT count(\"victimName\") FROM \"DBLog_Revives\" WHERE $timeFilter AND server = '$SERVER_ID' AND reviverTeamID = 1 GROUP BY time($INTERVAL) fill(0)", + "rawQuery": true, + "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n count(id) AS \"Team 1\"\nFROM DBLog_Revives\nWHERE\n $__timeFilter(time) AND\n victimTeamID = 1 AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(time,$__interval)", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "id" + ], + "type": "column" + }, + { + "params": [ + "count" + ], + "type": "aggregate" + }, + { + "params": [ + "Team 1" + ], + "type": "alias" + } + ] + ], + "table": "DBLog_Revives", + "tags": [], + "timeColumn": "time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + }, + { + "datatype": "int", + "name": "", + "params": [ + "victimTeamID", + "=", + "1" + ], + "type": "expression" + } + ] + }, + { + "alias": "Revives", + "format": "time_series", + "group": [ + { + "params": [ + "$__interval", + "none" + ], + "type": "time" + } + ], + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "0" + ], + "type": "fill" + } + ], + "measurement": "revive", + "metricColumn": "none", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT count(\"victimName\") FROM \"DBLog_Revives\" WHERE $timeFilter AND server = '$SERVER_ID' AND reviverTeamID = 2 GROUP BY time($INTERVAL) fill(0)", + "rawQuery": true, + "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n count(id) AS \"Team 2\"\nFROM DBLog_Revives\nWHERE\n $__timeFilter(time) AND\n victimTeamID = 2 AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(time,$__interval)", + "refId": "C", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "id" + ], + "type": "column" + }, + { + "params": [ + "count" + ], + "type": "aggregate" + }, + { + "params": [ + "Team 2" + ], + "type": "alias" + } + ] + ], + "table": "DBLog_Revives", + "tags": [], + "timeColumn": "time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + }, + { + "datatype": "int", + "name": "", + "params": [ + "victimTeamID", + "=", + "2" + ], + "type": "expression" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Revives Per Minutes", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "columns": [], + "datasource": "MySQL", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "fontSize": "100%", + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 83 + }, + "id": 22, + "pageSize": null, + "showHeader": true, + "sort": { + "col": 2, + "desc": true + }, + "styles": [ + { + "alias": "Time", + "align": "auto", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "date" + }, + { + "alias": "", + "align": "auto", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "decimals": 2, + "pattern": "/.*/", + "thresholds": [], + "type": "number", + "unit": "short" + } + ], + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n layerClassname as \"Layer\",\n startTime AS \"Start Time\",\n endTime AS \"End Time\"\nFROM `DBLog_Matches`\nWHERE \n (\n $__timeFilter(startTime) OR \n $__timeFilter(endTime) OR\n endTime IS NULL\n ) AND \n server = $SERVER_ID \nORDER BY startTime DESC;", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Matches", + "transform": "table", + "type": "table-old" + }, + { + "aliasColors": {}, + "breakPoint": "50%", + "cacheTimeout": null, + "combine": { + "label": "Others", + "threshold": 0 + }, + "datasource": "MySQL", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "fontSize": "80%", + "format": "short", + "gridPos": { + "h": 8, + "w": 6, + "x": 12, + "y": 83 + }, + "id": 25, + "interval": null, + "legend": { + "percentage": true, + "show": true, + "sort": "current", + "sortDesc": true, + "values": true + }, + "legendType": "Under graph", + "links": [], + "maxDataPoints": 3, + "nullPointMode": "connected", + "pieType": "pie", + "strokeWidth": 1, + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "layer", + "rawQuery": true, + "rawSql": "SELECT\n layerClassname AS metric,\n COUNT(*),\n startTime AS time\nFROM `DBLog_Matches`\nWHERE\n (\n $__timeFilter(startTime) OR \n $__timeFilter(endTime) OR\n endTime IS NULL\n ) AND \n server = $SERVER_ID \nGROUP BY layerClassname", + "refId": "A", + "select": [ + [ + { + "params": [ + "id" + ], + "type": "column" + } + ] + ], + "table": "game", + "timeColumn": "startTime", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Layers", + "type": "grafana-piechart-panel", + "valueName": "current" + }, + { + "aliasColors": {}, + "breakPoint": "50%", + "cacheTimeout": null, + "combine": { + "label": "Others", + "threshold": 0 + }, + "datasource": "MySQL", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "fontSize": "80%", + "format": "short", + "gridPos": { + "h": 8, + "w": 6, + "x": 18, + "y": 83 + }, + "id": 24, + "interval": null, + "legend": { + "percentage": true, + "show": true, + "values": true + }, + "legendType": "Under graph", + "links": [], + "maxDataPoints": 3, + "nullPointMode": "connected", + "pieType": "pie", + "strokeWidth": 1, + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "layer", + "rawQuery": true, + "rawSql": "SELECT\n mapClassname AS metric,\n COUNT(*),\n startTime AS time\nFROM `DBLog_Matches`\nWHERE\n (\n $__timeFilter(startTime) OR \n $__timeFilter(endTime) OR\n endTime IS NULL\n ) AND \n server = $SERVER_ID \nGROUP BY mapClassname", + "refId": "A", + "select": [ + [ + { + "params": [ + "id" + ], + "type": "column" + } + ] + ], + "table": "game", + "timeColumn": "startTime", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Maps", + "type": "grafana-piechart-panel", + "valueName": "current" + }, + { + "aliasColors": {}, + "breakPoint": "50%", + "cacheTimeout": null, + "combine": { + "label": "Others", + "threshold": "0.01" + }, + "datasource": "MySQL", + "fieldConfig": { + "defaults": { + "custom": { + "align": null + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "fontSize": "80%", + "format": "short", + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 91 + }, + "id": 33, + "interval": null, + "legend": { + "percentage": true, + "show": true, + "values": true + }, + "legendType": "Right side", + "links": [], + "maxDataPoints": 3, + "nullPointMode": "connected", + "pieType": "pie", + "pluginVersion": "7.1.0", + "strokeWidth": 1, + "targets": [ + { + "alias": "Non-Teamkills", + "format": "time_series", + "group": [ + { + "params": [ + "$__interval", + "none" + ], + "type": "time" + } + ], + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "metricColumn": "weapon", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT \n COUNT(\"victimName\") \nFROM \"DBLog_Wounds\" \nWHERE \n $timeFilter AND\n server = '$SERVER_ID' AND\n teamkill = false", + "rawQuery": true, + "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n weapon AS metric,\n count(id) AS \"Wounds\"\nFROM DBLog_Wounds\nWHERE\n $__timeFilter(time) AND\n server = \"$SERVER_ID\"\nGROUP BY 2\nORDER BY count(id) DESC", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "id" + ], + "type": "column" + }, + { + "params": [ + "count" + ], + "type": "aggregate" + }, + { + "params": [ + "Wounds" + ], + "type": "alias" + } + ] + ], + "table": "DBLog_Wounds", + "tags": [], + "timeColumn": "time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Weapons", + "type": "grafana-piechart-panel", + "valueName": "current" + } + ], + "refresh": false, + "schemaVersion": 26, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "allValue": null, + "current": { + "selected": true, + "text": "1", + "value": "1" + }, + "hide": 0, + "includeAll": false, + "label": "Server", + "multi": false, + "name": "SERVER_ID", + "options": [ + { + "selected": true, + "text": "1", + "value": "1" + }, + { + "selected": false, + "text": "2", + "value": "2" + } + ], + "query": "1,2", + "queryValue": "", + "skipUrlSync": false, + "type": "custom" + }, + { + "auto": false, + "auto_count": 30, + "auto_min": "10s", + "current": { + "selected": false, + "text": "1m", + "value": "1m" + }, + "hide": 0, + "label": "Interval", + "name": "INTERVAL", + "options": [ + { + "selected": true, + "text": "1m", + "value": "1m" + }, + { + "selected": false, + "text": "2m", + "value": "2m" + }, + { + "selected": false, + "text": "3m", + "value": "3m" + }, + { + "selected": false, + "text": "4m", + "value": "4m" + }, + { + "selected": false, + "text": "5m", + "value": "5m" + }, + { + "selected": false, + "text": "10m", + "value": "10m" + }, + { + "selected": false, + "text": "20m", + "value": "20m" + }, + { + "selected": false, + "text": "30m", + "value": "30m" + } + ], + "query": "1m,2m,3m,4m,5m,10m,20m,30m", + "refresh": 2, + "skipUrlSync": false, + "type": "interval" + } + ] + }, + "time": { + "from": "now-3h", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ] + }, + "timezone": "", + "title": "Server Overview", + "uid": "n7Xl7jEWx", + "version": 4 + } \ No newline at end of file From 2827fc11ab92ea0125e2cfb008b252a0c6e8cbf7 Mon Sep 17 00:00:00 2001 From: got2bhockey Date: Sun, 28 Feb 2021 00:04:16 +0000 Subject: [PATCH 03/11] ESLint & README Generation --- README.md | 454 ++++++++++++++++++++++++++-------------------------- config.json | 140 ++++++++-------- 2 files changed, 297 insertions(+), 297 deletions(-) diff --git a/README.md b/README.md index 108b494f..19c3ef44 100644 --- a/README.md +++ b/README.md @@ -268,27 +268,32 @@ The following is a list of plugins built into SquadJS, you can click their title Interested in creating your own plugin? [See more here](./squad-server/plugins/readme.md)
- DiscordSubsystemRestarter -

DiscordSubsystemRestarter

-

The DiscordSubSystemRestarter plugin allows you to manually restart SquadJS subsystems in case an issues arises with them.

  • !squadjs restartsubsystem rcon
  • !squadjs restartsubsystem logparser

+ DiscordRoundWinner +

DiscordRoundWinner

+

The DiscordRoundWinner plugin will send the round winner to a Discord channel.

Options

  • discordClient (Required)

    Description

    Discord connector name.

    Default
    discord
  • -
  • role (Required)

    +
  • channelID (Required)

    Description
    -

    ID of role required to run the sub system restart commands.

    +

    The ID of the channel to log admin broadcasts to.

    Default
  • Example
    -
    667741905228136459
+
667741905228136459
+
  • color

    +
    Description
    +

    The color of the embed.

    +
    Default
    +
    16761867
  • - DiscordChat -

    DiscordChat

    -

    The DiscordChat plugin will log in-game chat to a Discord channel.

    + DiscordAdminCamLogs +

    DiscordAdminCamLogs

    +

    The DiscordAdminCamLogs plugin will log in game admin camera usage to a Discord channel.

    Options

    • discordClient (Required)

      Description
      @@ -297,36 +302,21 @@ Interested in creating your own plugin? [See more here](./squad-server/plugins/r
      discord
    • channelID (Required)

      Description
      -

      The ID of the channel to log admin broadcasts to.

      +

      The ID of the channel to log admin camera usage to.

      Default
    • Example
      667741905228136459
      -
    • chatColors

      -
      Description
      -

      The color of the embed for each chat.

      -
      Default
      -
      {}
    • Example
      -
      {
      -  "ChatAll": 16761867
      -}
    • color

      Description

      The color of the embed.

      Default
      -
      16761867
    • -
    • ignoreChats

      -
      Description
      -

      A list of chat names to ignore.

      -
      Default
      -
      [
      -  "ChatSquad"
      -]
    +
    16761867
    - DiscordAdminBroadcast -

    DiscordAdminBroadcast

    -

    The DiscordAdminBroadcast plugin will send a copy of admin broadcasts made in game to a Discord channel.

    + DiscordDebug +

    DiscordDebug

    +

    The DiscordDebug plugin can be used to help debug SquadJS by dumping SquadJS events to a Discord channel.

    Options

    • discordClient (Required)

      Description
      @@ -335,21 +325,24 @@ Interested in creating your own plugin? [See more here](./squad-server/plugins/r
      discord
    • channelID (Required)

      Description
      -

      The ID of the channel to log admin broadcasts to.

      +

      The ID of the channel to log events to.

      Default
    • Example
      667741905228136459
      -
    • color

      +
    • events (Required)

      Description
      -

      The color of the embed.

      +

      A list of events to dump.

      Default
      -
      16761867
    +
    []
    Example
    +
    [
    +  "PLAYER_DIED"
    +]
    - DiscordAdminRequest -

    DiscordAdminRequest

    -

    The DiscordAdminRequest plugin will ping admins in a Discord channel when a player requests an admin via the !admin command in in-game chat.

    + DiscordChat +

    DiscordChat

    +

    The DiscordChat plugin will log in-game chat to a Discord channel.

    Options

    • discordClient (Required)

      Description
      @@ -362,45 +355,46 @@ Interested in creating your own plugin? [See more here](./squad-server/plugins/r
      Default
    • Example
      667741905228136459
      -
    • ignoreChats

      +
    • chatColors

      Description
      -

      A list of chat names to ignore.

      +

      The color of the embed for each chat.

      Default
      -
      []
    • Example
      -
      [
      -  "ChatSquad"
      -]
      -
    • ignorePhrases

      +
      {}
    • Example
      +
      {
      +  "ChatAll": 16761867
      +}
      +
    • color

      Description
      -

      A list of phrases to ignore.

      +

      The color of the embed.

      Default
      -
      []
    • Example
      -
      [
      -  "switch"
      -]
      -
    • command

      +
      16761867
    • +
    • ignoreChats

      Description
      -

      The command that calls an admin.

      +

      A list of chat names to ignore.

      Default
      -
      admin
    • -
    • pingGroups

      +
      [
      +  "ChatSquad"
      +]
    +
    + +
    + IntervalledBroadcasts +

    IntervalledBroadcasts

    +

    The IntervalledBroadcasts plugin allows you to set broadcasts, which will be broadcasted at preset intervals

    +

    Options

    +
    • broadcasts

      Description
      -

      A list of Discord role IDs to ping.

      +

      Messages to broadcast.

      Default
      []
    • Example
      [
      -  "500455137626554379"
      +  "This server is powered by SquadJS."
       ]
      -
    • pingDelay

      -
      Description
      -

      Cooldown for pings in milliseconds.

      -
      Default
      -
      60000
    • -
    • color

      +
    • interval

      Description
      -

      The color of the embed.

      +

      Frequency of the broadcasts in milliseconds.

      Default
      -
      16761867
    +
    300000
    @@ -437,102 +431,97 @@ Interested in creating your own plugin? [See more here](./squad-server/plugins/r
    - AutoKickUnassigned -

    AutoKickUnassigned

    -

    The AutoKickUnassigned plugin will automatically kick players that are not in a squad after a specified ammount of time.

    + DiscordAdminRequest +

    DiscordAdminRequest

    +

    The DiscordAdminRequest plugin will ping admins in a Discord channel when a player requests an admin via the !admin command in in-game chat.

    Options

    -
    • warningMessage

      +
      • discordClient (Required)

        Description
        -

        Message SquadJS will send to players warning them they will be kicked

        +

        Discord connector name.

        Default
        -
        Join a squad, you are are unassigned and will be kicked
      • -
      • kickMessage

        +
        discord
      • +
      • channelID (Required)

        Description
        -

        Message to send to players when they are kicked

        +

        The ID of the channel to log admin broadcasts to.

        Default
        -
        Unassigned - automatically removed
      • -
      • frequencyOfWarnings

        +
      • Example
        +
        667741905228136459
        +
      • ignoreChats

        Description
        -

        How often in Seconds should we warn the player about being unassigned?

        +

        A list of chat names to ignore.

        Default
        -
        30
      • -
      • unassignedTimer

        +
        []
      • Example
        +
        [
        +  "ChatSquad"
        +]
        +
      • ignorePhrases

        Description
        -

        How long in Seconds to wait before a unassigned player is kicked

        +

        A list of phrases to ignore.

        Default
        -
        360
      • -
      • playerThreshold

        +
        []
      • Example
        +
        [
        +  "switch"
        +]
        +
      • command

        Description
        -

        Player count required for AutoKick to start kicking players, set to -1 to disable

        +

        The command that calls an admin.

        Default
        -
        93
      • -
      • roundStartDelay

        +
        admin
      • +
      • pingGroups

        Description
        -

        Time delay in Seconds from start of the round before AutoKick starts kicking again

        +

        A list of Discord role IDs to ping.

        Default
        -
        900
      • -
      • ignoreAdmins

        +
        []
      • Example
        +
        [
        +  "500455137626554379"
        +]
        +
      • pingDelay

        Description
        -

        • true: Admins will NOT be kicked
        • false: Admins WILL be kicked

        +

        Cooldown for pings in milliseconds.

        Default
        -
        false
      • -
      • ignoreWhitelist

        +
        60000
      • +
      • color

        Description
        -

        • true: Reserve slot players will NOT be kicked
        • false: Reserve slot players WILL be kicked

        +

        The color of the embed.

        Default
        -
        false
      +
      16761867
    - DiscordDebug -

    DiscordDebug

    -

    The DiscordDebug plugin can be used to help debug SquadJS by dumping SquadJS events to a Discord channel.

    + ChatCommands +

    ChatCommands

    +

    The ChatCommands plugin can be configured to make chat commands that broadcast or warn the caller with present messages.

    Options

    -
    • discordClient (Required)

      -
      Description
      -

      Discord connector name.

      -
      Default
      -
      discord
    • -
    • channelID (Required)

      -
      Description
      -

      The ID of the channel to log events to.

      -
      Default
      -
    • Example
      -
      667741905228136459
      -
    • events (Required)

      +
      • commands

        Description
        -

        A list of events to dump.

        +

        An array of objects containing the following properties:

        • command - The command that initiates the message.
        • type - Either warn or broadcast.
        • response - The message to respond with.
        • ignoreChats - A list of chats to ignore the commands in. Use this to limit it to admins.

        Default
        -
        []
      • Example
        [
        -  "PLAYER_DIED"
        -]
      + { + "command": "squadjs", + "type": "warn", + "response": "This server is powered by SquadJS.", + "ignoreChats": [] + } +]
    - IntervalledBroadcasts -

    IntervalledBroadcasts

    -

    The IntervalledBroadcasts plugin allows you to set broadcasts, which will be broadcasted at preset intervals

    + AutoTKWarn +

    AutoTKWarn

    +

    The AutoTkWarn plugin will automatically warn players with a message when they teamkill.

    Options

    -
    • broadcasts

      -
      Description
      -

      Messages to broadcast.

      -
      Default
      -
      []
    • Example
      -
      [
      -  "This server is powered by SquadJS."
      -]
      -
    • interval

      +
      • message

        Description
        -

        Frequency of the broadcasts in milliseconds.

        +

        The message to warn players with.

        Default
        -
        300000
      +
      Please apologise for ALL TKs in ALL chat!
    - DiscordTeamkill -

    DiscordTeamkill

    -

    The DiscordTeamkill plugin logs teamkills and related information to a Discord channel for admins to review.

    + DiscordAdminBroadcast +

    DiscordAdminBroadcast

    +

    The DiscordAdminBroadcast plugin will send a copy of admin broadcasts made in game to a Discord channel.

    Options

    • discordClient (Required)

      Description
      @@ -541,20 +530,15 @@ Interested in creating your own plugin? [See more here](./squad-server/plugins/r
      discord
    • channelID (Required)

      Description
      -

      The ID of the channel to log teamkills to.

      +

      The ID of the channel to log admin broadcasts to.

      Default
    • Example
      667741905228136459
    • color

      Description
      -

      The color of the embeds.

      -
      Default
      -
      16761867
    • -
    • disableSCBL

      -
      Description
      -

      Disable Squad Community Ban List information.

      +

      The color of the embed.

      Default
      -
      false
    +
    16761867
    @@ -595,45 +579,9 @@ Interested in creating your own plugin? [See more here](./squad-server/plugins/r
    - AutoTKWarn -

    AutoTKWarn

    -

    The AutoTkWarn plugin will automatically warn players with a message when they teamkill.

    -

    Options

    -
    • message

      -
      Description
      -

      The message to warn players with.

      -
      Default
      -
      Please apologise for ALL TKs in ALL chat!
    -
    - -
    - DBLog -

    DBLog

    -

    The mysql-log plugin will log various server statistics and events to a database. This is great for server performance monitoring and/or player stat tracking. - -Grafana (NOT YET WORKING WITH V2): -

    • Grafana is a cool way of viewing server statistics stored in the database.
    • -
    • Install Grafana.
    • -
    • Add your database as a datasource named SquadJS.
    • -
    • Import the SquadJS Dashboard to get a preconfigured MySQL only Grafana dashboard.
    • -
    • Install any missing Grafana plugins.

    -

    Options

    -
    • database (Required)

      -
      Description
      -

      The Sequelize connector to log server information to.

      -
      Default
      -
      mysql
    • -
    • overrideServerID

      -
      Description
      -

      A overridden server ID.

      -
      Default
      -
      null
    -
    - -
    - DiscordRoundWinner -

    DiscordRoundWinner

    -

    The DiscordRoundWinner plugin will send the round winner to a Discord channel.

    + SCBLInfo +

    SCBLInfo

    +

    The SCBLInfo plugin alerts admins when a harmful player is detected joining their server based on data from the Squad Community Ban List.

    Options

    • discordClient (Required)

      Description
      @@ -642,57 +590,27 @@ Grafana (NOT YET WORKING WITH V2):
      discord
    • channelID (Required)

      Description
      -

      The ID of the channel to log admin broadcasts to.

      +

      The ID of the channel to alert admins through.

      Default
    • Example
      667741905228136459
      -
    • color

      -
      Description
      -

      The color of the embed.

      -
      Default
      -
      16761867
    -
    - -
    - ChatCommands -

    ChatCommands

    -

    The ChatCommands plugin can be configured to make chat commands that broadcast or warn the caller with present messages.

    -

    Options

    -
    • commands

      +
    • threshold

      Description
      -

      An array of objects containing the following properties:

      • command - The command that initiates the message.
      • type - Either warn or broadcast.
      • response - The message to respond with.
      • ignoreChats - A list of chats to ignore the commands in. Use this to limit it to admins.

      +

      Admins will be alerted when a player has this or more reputation points. For more information on reputation points, see the Squad Community Ban List's FAQ

      Default
      -
      [
      -  {
      -    "command": "squadjs",
      -    "type": "warn",
      -    "response": "This server is powered by SquadJS.",
      -    "ignoreChats": []
      -  }
      -]
    +
    6
    - DiscordAdminCamLogs -

    DiscordAdminCamLogs

    -

    The DiscordAdminCamLogs plugin will log in game admin camera usage to a Discord channel.

    + TeamRandomizer +

    TeamRandomizer

    +

    The TeamRandomizer can be used to randomize teams. It's great for destroying clan stacks or for social events. It can be run by typing, by default, !randomize into in-game admin chat

    Options

    -
    • discordClient (Required)

      -
      Description
      -

      Discord connector name.

      -
      Default
      -
      discord
    • -
    • channelID (Required)

      -
      Description
      -

      The ID of the channel to log admin camera usage to.

      -
      Default
      -
    • Example
      -
      667741905228136459
      -
    • color

      +
      • command

        Description
        -

        The color of the embed.

        +

        The command used to randomize the teams.

        Default
        -
        16761867
      +
      randomize
    @@ -731,38 +649,120 @@ Grafana (NOT YET WORKING WITH V2):
    - TeamRandomizer -

    TeamRandomizer

    -

    The TeamRandomizer can be used to randomize teams. It's great for destroying clan stacks or for social events. It can be run by typing, by default, !randomize into in-game admin chat

    + DiscordTeamkill +

    DiscordTeamkill

    +

    The DiscordTeamkill plugin logs teamkills and related information to a Discord channel for admins to review.

    Options

    -
    • command

      +
      • discordClient (Required)

        Description
        -

        The command used to randomize the teams.

        +

        Discord connector name.

        Default
        -
        randomize
      +
      discord
    • +
    • channelID (Required)

      +
      Description
      +

      The ID of the channel to log teamkills to.

      +
      Default
      +
    • Example
      +
      667741905228136459
      +
    • color

      +
      Description
      +

      The color of the embeds.

      +
      Default
      +
      16761867
    • +
    • disableSCBL

      +
      Description
      +

      Disable Squad Community Ban List information.

      +
      Default
      +
      false
    - SCBLInfo -

    SCBLInfo

    -

    The SCBLInfo plugin alerts admins when a harmful player is detected joining their server based on data from the Squad Community Ban List.

    + AutoKickUnassigned +

    AutoKickUnassigned

    +

    The AutoKickUnassigned plugin will automatically kick players that are not in a squad after a specified ammount of time.

    +

    Options

    +
    • warningMessage

      +
      Description
      +

      Message SquadJS will send to players warning them they will be kicked

      +
      Default
      +
      Join a squad, you are are unassigned and will be kicked
    • +
    • kickMessage

      +
      Description
      +

      Message to send to players when they are kicked

      +
      Default
      +
      Unassigned - automatically removed
    • +
    • frequencyOfWarnings

      +
      Description
      +

      How often in Seconds should we warn the player about being unassigned?

      +
      Default
      +
      30
    • +
    • unassignedTimer

      +
      Description
      +

      How long in Seconds to wait before a unassigned player is kicked

      +
      Default
      +
      360
    • +
    • playerThreshold

      +
      Description
      +

      Player count required for AutoKick to start kicking players, set to -1 to disable

      +
      Default
      +
      93
    • +
    • roundStartDelay

      +
      Description
      +

      Time delay in Seconds from start of the round before AutoKick starts kicking again

      +
      Default
      +
      900
    • +
    • ignoreAdmins

      +
      Description
      +

      • true: Admins will NOT be kicked
      • false: Admins WILL be kicked

      +
      Default
      +
      false
    • +
    • ignoreWhitelist

      +
      Description
      +

      • true: Reserve slot players will NOT be kicked
      • false: Reserve slot players WILL be kicked

      +
      Default
      +
      false
    +
    + +
    + DiscordSubsystemRestarter +

    DiscordSubsystemRestarter

    +

    The DiscordSubSystemRestarter plugin allows you to manually restart SquadJS subsystems in case an issues arises with them.

    • !squadjs restartsubsystem rcon
    • !squadjs restartsubsystem logparser

    Options

    • discordClient (Required)

      Description

      Discord connector name.

      Default
      discord
    • -
    • channelID (Required)

      +
    • role (Required)

      Description
      -

      The ID of the channel to alert admins through.

      +

      ID of role required to run the sub system restart commands.

      Default
    • Example
      -
      667741905228136459
      -
    • threshold

      +
      667741905228136459
    +
    + +
    + DBLog +

    DBLog

    +

    The mysql-log plugin will log various server statistics and events to a database. This is great for server performance monitoring and/or player stat tracking. + +Grafana (NOT YET WORKING WITH V2): +

    • Grafana is a cool way of viewing server statistics stored in the database.
    • +
    • Install Grafana.
    • +
    • Add your database as a datasource named SquadJS.
    • +
    • Import the SquadJS Dashboard to get a preconfigured MySQL only Grafana dashboard.
    • +
    • Install any missing Grafana plugins.

    +

    Options

    +
    • database (Required)

      Description
      -

      Admins will be alerted when a player has this or more reputation points. For more information on reputation points, see the Squad Community Ban List's FAQ

      +

      The Sequelize connector to log server information to.

      Default
      -
      6
    +
    mysql
    +
  • overrideServerID

    +
    Description
    +

    A overridden server ID.

    +
    Default
    +
    null

  • diff --git a/config.json b/config.json index 9043cc9b..a94ffcc0 100644 --- a/config.json +++ b/config.json @@ -33,10 +33,25 @@ }, "plugins": [ { - "plugin": "DiscordSubsystemRestarter", + "plugin": "DiscordRoundWinner", + "enabled": true, + "discordClient": "discord", + "channelID": "", + "color": 16761867 + }, + { + "plugin": "DiscordAdminCamLogs", "enabled": false, "discordClient": "discord", - "role": "" + "channelID": "", + "color": 16761867 + }, + { + "plugin": "DiscordDebug", + "enabled": false, + "discordClient": "discord", + "channelID": "", + "events": [] }, { "plugin": "DiscordChat", @@ -50,11 +65,18 @@ ] }, { - "plugin": "DiscordAdminBroadcast", + "plugin": "IntervalledBroadcasts", + "enabled": false, + "broadcasts": [], + "interval": 300000 + }, + { + "plugin": "DiscordServerStatus", "enabled": false, "discordClient": "discord", - "channelID": "", - "color": 16761867 + "messageIDs": [], + "updateInterval": 60000, + "disableStatus": false }, { "plugin": "DiscordAdminRequest", @@ -69,45 +91,28 @@ "color": 16761867 }, { - "plugin": "DiscordServerStatus", - "enabled": false, - "discordClient": "discord", - "messageIDs": [], - "updateInterval": 60000, - "disableStatus": false - }, - { - "plugin": "AutoKickUnassigned", + "plugin": "ChatCommands", "enabled": true, - "warningMessage": "Join a squad, you are are unassigned and will be kicked", - "kickMessage": "Unassigned - automatically removed", - "frequencyOfWarnings": 30, - "unassignedTimer": 360, - "playerThreshold": 93, - "roundStartDelay": 900, - "ignoreAdmins": false, - "ignoreWhitelist": false + "commands": [ + { + "command": "squadjs", + "type": "warn", + "response": "This server is powered by SquadJS.", + "ignoreChats": [] + } + ] }, { - "plugin": "DiscordDebug", - "enabled": false, - "discordClient": "discord", - "channelID": "", - "events": [] + "plugin": "AutoTKWarn", + "enabled": true, + "message": "Please apologise for ALL TKs in ALL chat!" }, { - "plugin": "IntervalledBroadcasts", + "plugin": "DiscordAdminBroadcast", "enabled": false, - "broadcasts": [], - "interval": 300000 - }, - { - "plugin": "DiscordTeamkill", - "enabled": true, "discordClient": "discord", "channelID": "", - "color": 16761867, - "disableSCBL": false + "color": 16761867 }, { "plugin": "SeedingMode", @@ -120,41 +125,16 @@ "liveMessage": "Live!" }, { - "plugin": "AutoTKWarn", - "enabled": true, - "message": "Please apologise for ALL TKs in ALL chat!" - }, - { - "plugin": "DBLog", - "enabled": false, - "database": "mysql", - "overrideServerID": null - }, - { - "plugin": "DiscordRoundWinner", + "plugin": "SCBLInfo", "enabled": true, "discordClient": "discord", "channelID": "", - "color": 16761867 + "threshold": 6 }, { - "plugin": "ChatCommands", + "plugin": "TeamRandomizer", "enabled": true, - "commands": [ - { - "command": "squadjs", - "type": "warn", - "response": "This server is powered by SquadJS.", - "ignoreChats": [] - } - ] - }, - { - "plugin": "DiscordAdminCamLogs", - "enabled": false, - "discordClient": "discord", - "channelID": "", - "color": 16761867 + "command": "randomize" }, { "plugin": "DiscordRcon", @@ -165,16 +145,36 @@ "prependAdminNameInBroadcast": false }, { - "plugin": "TeamRandomizer", + "plugin": "DiscordTeamkill", "enabled": true, - "command": "randomize" + "discordClient": "discord", + "channelID": "", + "color": 16761867, + "disableSCBL": false }, { - "plugin": "SCBLInfo", + "plugin": "AutoKickUnassigned", "enabled": true, + "warningMessage": "Join a squad, you are are unassigned and will be kicked", + "kickMessage": "Unassigned - automatically removed", + "frequencyOfWarnings": 30, + "unassignedTimer": 360, + "playerThreshold": 93, + "roundStartDelay": 900, + "ignoreAdmins": false, + "ignoreWhitelist": false + }, + { + "plugin": "DiscordSubsystemRestarter", + "enabled": false, "discordClient": "discord", - "channelID": "", - "threshold": 6 + "role": "" + }, + { + "plugin": "DBLog", + "enabled": false, + "database": "mysql", + "overrideServerID": null } ], "logger": { From 859168ae2cc161224bae173ea3d63054388b6b7c Mon Sep 17 00:00:00 2001 From: Thomas Smyth Date: Sun, 28 Feb 2021 00:27:50 +0000 Subject: [PATCH 04/11] ESLint & README Generation --- README.md | 456 ++++++++++++++++++++++++++-------------------------- config.json | 140 ++++++++-------- 2 files changed, 298 insertions(+), 298 deletions(-) diff --git a/README.md b/README.md index a471aa73..f6e38680 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ SquadJS relies on being able to access the Squad server log directory in order t #### Prerequisites * Git - * [Node.js](https://nodejs.org/en/) (14.x) - [Download](https://nodejs.org/en/) + * [Node.js](https://nodejs.org/en/) (Current) - [Download](https://nodejs.org/en/) * [Yarn](https://yarnpkg.com/) (Version 1.22.0+) - [Download](https://classic.yarnpkg.com/en/docs/install) * Some plugins may have additional requirements. @@ -268,32 +268,27 @@ The following is a list of plugins built into SquadJS, you can click their title Interested in creating your own plugin? [See more here](./squad-server/plugins/readme.md)
    - DiscordRoundWinner -

    DiscordRoundWinner

    -

    The DiscordRoundWinner plugin will send the round winner to a Discord channel.

    + DiscordSubsystemRestarter +

    DiscordSubsystemRestarter

    +

    The DiscordSubSystemRestarter plugin allows you to manually restart SquadJS subsystems in case an issues arises with them.

    • !squadjs restartsubsystem rcon
    • !squadjs restartsubsystem logparser

    Options

    • discordClient (Required)

      Description

      Discord connector name.

      Default
      discord
    • -
    • channelID (Required)

      +
    • role (Required)

      Description
      -

      The ID of the channel to log admin broadcasts to.

      +

      ID of role required to run the sub system restart commands.

      Default
    • Example
      -
      667741905228136459
      -
    • color

      -
      Description
      -

      The color of the embed.

      -
      Default
      -
      16761867
    +
    667741905228136459
    - DiscordAdminCamLogs -

    DiscordAdminCamLogs

    -

    The DiscordAdminCamLogs plugin will log in game admin camera usage to a Discord channel.

    + DiscordChat +

    DiscordChat

    +

    The DiscordChat plugin will log in-game chat to a Discord channel.

    Options

    • discordClient (Required)

      Description
      @@ -302,21 +297,36 @@ Interested in creating your own plugin? [See more here](./squad-server/plugins/r
      discord
    • channelID (Required)

      Description
      -

      The ID of the channel to log admin camera usage to.

      +

      The ID of the channel to log admin broadcasts to.

      Default
    • Example
      667741905228136459
      +
    • chatColors

      +
      Description
      +

      The color of the embed for each chat.

      +
      Default
      +
      {}
    • Example
      +
      {
      +  "ChatAll": 16761867
      +}
    • color

      Description

      The color of the embed.

      Default
      -
      16761867
    +
    16761867
    +
  • ignoreChats

    +
    Description
    +

    A list of chat names to ignore.

    +
    Default
    +
    [
    +  "ChatSquad"
    +]
  • - DiscordDebug -

    DiscordDebug

    -

    The DiscordDebug plugin can be used to help debug SquadJS by dumping SquadJS events to a Discord channel.

    + DiscordAdminBroadcast +

    DiscordAdminBroadcast

    +

    The DiscordAdminBroadcast plugin will send a copy of admin broadcasts made in game to a Discord channel.

    Options

    • discordClient (Required)

      Description
      @@ -325,24 +335,21 @@ Interested in creating your own plugin? [See more here](./squad-server/plugins/r
      discord
    • channelID (Required)

      Description
      -

      The ID of the channel to log events to.

      +

      The ID of the channel to log admin broadcasts to.

      Default
    • Example
      667741905228136459
      -
    • events (Required)

      +
    • color

      Description
      -

      A list of events to dump.

      +

      The color of the embed.

      Default
      -
      []
    • Example
      -
      [
      -  "PLAYER_DIED"
      -]
    +
    16761867
    - DiscordChat -

    DiscordChat

    -

    The DiscordChat plugin will log in-game chat to a Discord channel.

    + DiscordAdminRequest +

    DiscordAdminRequest

    +

    The DiscordAdminRequest plugin will ping admins in a Discord channel when a player requests an admin via the !admin command in in-game chat.

    Options

    • discordClient (Required)

      Description
      @@ -355,46 +362,45 @@ Interested in creating your own plugin? [See more here](./squad-server/plugins/r
      Default
    • Example
      667741905228136459
      -
    • chatColors

      -
      Description
      -

      The color of the embed for each chat.

      -
      Default
      -
      {}
    • Example
      -
      {
      -  "ChatAll": 16761867
      -}
      -
    • color

      -
      Description
      -

      The color of the embed.

      -
      Default
      -
      16761867
    • ignoreChats

      Description

      A list of chat names to ignore.

      Default
      +
      []
    • Example
      [
         "ChatSquad"
      -]
    -
    - -
    - IntervalledBroadcasts -

    IntervalledBroadcasts

    -

    The IntervalledBroadcasts plugin allows you to set broadcasts, which will be broadcasted at preset intervals

    -

    Options

    -
    • broadcasts

      +] +
    • ignorePhrases

      Description
      -

      Messages to broadcast.

      +

      A list of phrases to ignore.

      Default
      []
    • Example
      [
      -  "This server is powered by SquadJS."
      +  "switch"
       ]
      -
    • interval

      +
    • command

      Description
      -

      Frequency of the broadcasts in milliseconds.

      +

      The command that calls an admin.

      Default
      -
      300000
    +
    admin
    +
  • pingGroups

    +
    Description
    +

    A list of Discord role IDs to ping.

    +
    Default
    +
    []
  • Example
    +
    [
    +  "500455137626554379"
    +]
    +
  • pingDelay

    +
    Description
    +

    Cooldown for pings in milliseconds.

    +
    Default
    +
    60000
  • +
  • color

    +
    Description
    +

    The color of the embed.

    +
    Default
    +
    16761867
  • @@ -431,97 +437,102 @@ Interested in creating your own plugin? [See more here](./squad-server/plugins/r
    - DiscordAdminRequest -

    DiscordAdminRequest

    -

    The DiscordAdminRequest plugin will ping admins in a Discord channel when a player requests an admin via the !admin command in in-game chat.

    + AutoKickUnassigned +

    AutoKickUnassigned

    +

    The AutoKickUnassigned plugin will automatically kick players that are not in a squad after a specified ammount of time.

    Options

    -
    • discordClient (Required)

      +
      • warningMessage

        Description
        -

        Discord connector name.

        +

        Message SquadJS will send to players warning them they will be kicked

        Default
        -
        discord
      • -
      • channelID (Required)

        +
        Join a squad, you are are unassigned and will be kicked
      • +
      • kickMessage

        Description
        -

        The ID of the channel to log admin broadcasts to.

        +

        Message to send to players when they are kicked

        Default
        -
      • Example
        -
        667741905228136459
        -
      • ignoreChats

        +
        Unassigned - automatically removed
      • +
      • frequencyOfWarnings

        Description
        -

        A list of chat names to ignore.

        +

        How often in Seconds should we warn the player about being unassigned?

        Default
        -
        []
      • Example
        -
        [
        -  "ChatSquad"
        -]
        -
      • ignorePhrases

        +
        30
      • +
      • unassignedTimer

        Description
        -

        A list of phrases to ignore.

        +

        How long in Seconds to wait before a unassigned player is kicked

        Default
        -
        []
      • Example
        -
        [
        -  "switch"
        -]
        -
      • command

        +
        360
      • +
      • playerThreshold

        Description
        -

        The command that calls an admin.

        +

        Player count required for AutoKick to start kicking players, set to -1 to disable

        Default
        -
        admin
      • -
      • pingGroups

        +
        93
      • +
      • roundStartDelay

        Description
        -

        A list of Discord role IDs to ping.

        +

        Time delay in Seconds from start of the round before AutoKick starts kicking again

        Default
        -
        []
      • Example
        -
        [
        -  "500455137626554379"
        -]
        -
      • pingDelay

        +
        900
      • +
      • ignoreAdmins

        Description
        -

        Cooldown for pings in milliseconds.

        +

        • true: Admins will NOT be kicked
        • false: Admins WILL be kicked

        Default
        -
        60000
      • -
      • color

        +
        false
      • +
      • ignoreWhitelist

        Description
        -

        The color of the embed.

        +

        • true: Reserve slot players will NOT be kicked
        • false: Reserve slot players WILL be kicked

        Default
        -
        16761867
      +
      false
    - ChatCommands -

    ChatCommands

    -

    The ChatCommands plugin can be configured to make chat commands that broadcast or warn the caller with present messages.

    + DiscordDebug +

    DiscordDebug

    +

    The DiscordDebug plugin can be used to help debug SquadJS by dumping SquadJS events to a Discord channel.

    Options

    -
    • commands

      +
      • discordClient (Required)

        Description
        -

        An array of objects containing the following properties:

        • command - The command that initiates the message.
        • type - Either warn or broadcast.
        • response - The message to respond with.
        • ignoreChats - A list of chats to ignore the commands in. Use this to limit it to admins.

        +

        Discord connector name.

        +
        Default
        +
        discord
      • +
      • channelID (Required)

        +
        Description
        +

        The ID of the channel to log events to.

        +
        Default
        +
      • Example
        +
        667741905228136459
        +
      • events (Required)

        +
        Description
        +

        A list of events to dump.

        Default
        +
        []
      • Example
        [
        -  {
        -    "command": "squadjs",
        -    "type": "warn",
        -    "response": "This server is powered by SquadJS.",
        -    "ignoreChats": []
        -  }
        -]
      + "PLAYER_DIED" +]
    - AutoTKWarn -

    AutoTKWarn

    -

    The AutoTkWarn plugin will automatically warn players with a message when they teamkill.

    + IntervalledBroadcasts +

    IntervalledBroadcasts

    +

    The IntervalledBroadcasts plugin allows you to set broadcasts, which will be broadcasted at preset intervals

    Options

    -
    • message

      +
      • broadcasts

        Description
        -

        The message to warn players with.

        +

        Messages to broadcast.

        Default
        -
        Please apologise for ALL TKs in ALL chat!
      +
      []
    • Example
      +
      [
      +  "This server is powered by SquadJS."
      +]
      +
    • interval

      +
      Description
      +

      Frequency of the broadcasts in milliseconds.

      +
      Default
      +
      300000
    - DiscordAdminBroadcast -

    DiscordAdminBroadcast

    -

    The DiscordAdminBroadcast plugin will send a copy of admin broadcasts made in game to a Discord channel.

    + DiscordTeamkill +

    DiscordTeamkill

    +

    The DiscordTeamkill plugin logs teamkills and related information to a Discord channel for admins to review.

    Options

    • discordClient (Required)

      Description
      @@ -530,15 +541,20 @@ Interested in creating your own plugin? [See more here](./squad-server/plugins/r
      discord
    • channelID (Required)

      Description
      -

      The ID of the channel to log admin broadcasts to.

      +

      The ID of the channel to log teamkills to.

      Default
    • Example
      667741905228136459
    • color

      Description
      -

      The color of the embed.

      +

      The color of the embeds.

      Default
      -
      16761867
    +
    16761867
    +
  • disableSCBL

    +
    Description
    +

    Disable Squad Community Ban List information.

    +
    Default
    +
    false
  • @@ -579,9 +595,45 @@ Interested in creating your own plugin? [See more here](./squad-server/plugins/r
    - SCBLInfo -

    SCBLInfo

    -

    The SCBLInfo plugin alerts admins when a harmful player is detected joining their server based on data from the Squad Community Ban List.

    + AutoTKWarn +

    AutoTKWarn

    +

    The AutoTkWarn plugin will automatically warn players with a message when they teamkill.

    +

    Options

    +
    • message

      +
      Description
      +

      The message to warn players with.

      +
      Default
      +
      Please apologise for ALL TKs in ALL chat!
    +
    + +
    + DBLog +

    DBLog

    +

    The mysql-log plugin will log various server statistics and events to a database. This is great for server performance monitoring and/or player stat tracking. + +Grafana (NOT YET WORKING WITH V2): +

    • Grafana is a cool way of viewing server statistics stored in the database.
    • +
    • Install Grafana.
    • +
    • Add your database as a datasource named SquadJS.
    • +
    • Import the SquadJS Dashboard to get a preconfigured MySQL only Grafana dashboard.
    • +
    • Install any missing Grafana plugins.

    +

    Options

    +
    • database (Required)

      +
      Description
      +

      The Sequelize connector to log server information to.

      +
      Default
      +
      mysql
    • +
    • overrideServerID

      +
      Description
      +

      A overridden server ID.

      +
      Default
      +
      null
    +
    + +
    + DiscordRoundWinner +

    DiscordRoundWinner

    +

    The DiscordRoundWinner plugin will send the round winner to a Discord channel.

    Options

    • discordClient (Required)

      Description
      @@ -590,33 +642,40 @@ Interested in creating your own plugin? [See more here](./squad-server/plugins/r
      discord
    • channelID (Required)

      Description
      -

      The ID of the channel to alert admins through.

      +

      The ID of the channel to log admin broadcasts to.

      Default
    • Example
      667741905228136459
      -
    • threshold

      +
    • color

      Description
      -

      Admins will be alerted when a player has this or more reputation points. For more information on reputation points, see the Squad Community Ban List's FAQ

      +

      The color of the embed.

      Default
      -
      6
    +
    16761867
    - TeamRandomizer -

    TeamRandomizer

    -

    The TeamRandomizer can be used to randomize teams. It's great for destroying clan stacks or for social events. It can be run by typing, by default, !randomize into in-game admin chat

    + ChatCommands +

    ChatCommands

    +

    The ChatCommands plugin can be configured to make chat commands that broadcast or warn the caller with present messages.

    Options

    -
    • command

      +
      • commands

        Description
        -

        The command used to randomize the teams.

        +

        An array of objects containing the following properties:

        • command - The command that initiates the message.
        • type - Either warn or broadcast.
        • response - The message to respond with.
        • ignoreChats - A list of chats to ignore the commands in. Use this to limit it to admins.

        Default
        -
        randomize
      +
      [
      +  {
      +    "command": "squadjs",
      +    "type": "warn",
      +    "response": "This server is powered by SquadJS.",
      +    "ignoreChats": []
      +  }
      +]
    - DiscordRcon -

    DiscordRcon

    -

    The DiscordRcon plugin allows a specified Discord channel to be used as a RCON console to run RCON commands.

    + DiscordAdminCamLogs +

    DiscordAdminCamLogs

    +

    The DiscordAdminCamLogs plugin will log in game admin camera usage to a Discord channel.

    Options

    • discordClient (Required)

      Description
      @@ -625,33 +684,21 @@ Interested in creating your own plugin? [See more here](./squad-server/plugins/r
      discord
    • channelID (Required)

      Description
      -

      ID of channel to turn into RCON console.

      +

      The ID of the channel to log admin camera usage to.

      Default
    • Example
      667741905228136459
      -
    • permissions

      -
      Description
      -

      -
      Default
      -
      {}
    • Example
      -
      {
      -  "123456789123456789": [
      -    "AdminBroadcast",
      -    "AdminForceTeamChange",
      -    "AdminDemoteCommander"
      -  ]
      -}
      -
    • prependAdminNameInBroadcast

      +
    • color

      Description
      -

      Prepend admin names when making announcements.

      +

      The color of the embed.

      Default
      -
      false
    +
    16761867
    - DiscordTeamkill -

    DiscordTeamkill

    -

    The DiscordTeamkill plugin logs teamkills and related information to a Discord channel for admins to review.

    + DiscordRcon +

    DiscordRcon

    +

    The DiscordRcon plugin allows a specified Discord channel to be used as a RCON console to run RCON commands.

    Options

    • discordClient (Required)

      Description
      @@ -660,109 +707,62 @@ Interested in creating your own plugin? [See more here](./squad-server/plugins/r
      discord
    • channelID (Required)

      Description
      -

      The ID of the channel to log teamkills to.

      +

      ID of channel to turn into RCON console.

      Default
    • Example
      667741905228136459
      -
    • color

      +
    • permissions

      Description
      -

      The color of the embeds.

      +

      Default
      -
      16761867
    • -
    • disableSCBL

      +
      {}
    • Example
      +
      {
      +  "123456789123456789": [
      +    "AdminBroadcast",
      +    "AdminForceTeamChange",
      +    "AdminDemoteCommander"
      +  ]
      +}
      +
    • prependAdminNameInBroadcast

      Description
      -

      Disable Squad Community Ban List information.

      +

      Prepend admin names when making announcements.

      Default
      false
    - AutoKickUnassigned -

    AutoKickUnassigned

    -

    The AutoKickUnassigned plugin will automatically kick players that are not in a squad after a specified ammount of time.

    + TeamRandomizer +

    TeamRandomizer

    +

    The TeamRandomizer can be used to randomize teams. It's great for destroying clan stacks or for social events. It can be run by typing, by default, !randomize into in-game admin chat

    Options

    -
    • warningMessage

      -
      Description
      -

      Message SquadJS will send to players warning them they will be kicked

      -
      Default
      -
      Join a squad, you are are unassigned and will be kicked
    • -
    • kickMessage

      -
      Description
      -

      Message to send to players when they are kicked

      -
      Default
      -
      Unassigned - automatically removed
    • -
    • frequencyOfWarnings

      -
      Description
      -

      How often in Seconds should we warn the player about being unassigned?

      -
      Default
      -
      30
    • -
    • unassignedTimer

      -
      Description
      -

      How long in Seconds to wait before a unassigned player is kicked

      -
      Default
      -
      360
    • -
    • playerThreshold

      -
      Description
      -

      Player count required for AutoKick to start kicking players, set to -1 to disable

      -
      Default
      -
      93
    • -
    • roundStartDelay

      -
      Description
      -

      Time delay in Seconds from start of the round before AutoKick starts kicking again

      -
      Default
      -
      900
    • -
    • ignoreAdmins

      -
      Description
      -

      • true: Admins will NOT be kicked
      • false: Admins WILL be kicked

      -
      Default
      -
      false
    • -
    • ignoreWhitelist

      +
      • command

        Description
        -

        • true: Reserve slot players will NOT be kicked
        • false: Reserve slot players WILL be kicked

        +

        The command used to randomize the teams.

        Default
        -
        false
      +
      randomize
    - DiscordSubsystemRestarter -

    DiscordSubsystemRestarter

    -

    The DiscordSubSystemRestarter plugin allows you to manually restart SquadJS subsystems in case an issues arises with them.

    • !squadjs restartsubsystem rcon
    • !squadjs restartsubsystem logparser

    + SCBLInfo +

    SCBLInfo

    +

    The SCBLInfo plugin alerts admins when a harmful player is detected joining their server based on data from the Squad Community Ban List.

    Options

    • discordClient (Required)

      Description

      Discord connector name.

      Default
      discord
    • -
    • role (Required)

      +
    • channelID (Required)

      Description
      -

      ID of role required to run the sub system restart commands.

      +

      The ID of the channel to alert admins through.

      Default
    • Example
      -
      667741905228136459
    -
    - -
    - DBLog -

    DBLog

    -

    The mysql-log plugin will log various server statistics and events to a database. This is great for server performance monitoring and/or player stat tracking. - -Grafana (NOT YET WORKING WITH V2): -

    • Grafana is a cool way of viewing server statistics stored in the database.
    • -
    • Install Grafana.
    • -
    • Add your database as a datasource named SquadJS.
    • -
    • Import the SquadJS Dashboard to get a preconfigured MySQL only Grafana dashboard.
    • -
    • Install any missing Grafana plugins.

    -

    Options

    -
    • database (Required)

      -
      Description
      -

      The Sequelize connector to log server information to.

      -
      Default
      -
      mysql
    • -
    • overrideServerID

      +
      667741905228136459
      +
    • threshold

      Description
      -

      A overridden server ID.

      +

      Admins will be alerted when a player has this or more reputation points. For more information on reputation points, see the Squad Community Ban List's FAQ

      Default
      -
      null
    +
    6

    diff --git a/config.json b/config.json index a94ffcc0..9043cc9b 100644 --- a/config.json +++ b/config.json @@ -33,25 +33,10 @@ }, "plugins": [ { - "plugin": "DiscordRoundWinner", - "enabled": true, - "discordClient": "discord", - "channelID": "", - "color": 16761867 - }, - { - "plugin": "DiscordAdminCamLogs", - "enabled": false, - "discordClient": "discord", - "channelID": "", - "color": 16761867 - }, - { - "plugin": "DiscordDebug", + "plugin": "DiscordSubsystemRestarter", "enabled": false, "discordClient": "discord", - "channelID": "", - "events": [] + "role": "" }, { "plugin": "DiscordChat", @@ -65,18 +50,11 @@ ] }, { - "plugin": "IntervalledBroadcasts", - "enabled": false, - "broadcasts": [], - "interval": 300000 - }, - { - "plugin": "DiscordServerStatus", + "plugin": "DiscordAdminBroadcast", "enabled": false, "discordClient": "discord", - "messageIDs": [], - "updateInterval": 60000, - "disableStatus": false + "channelID": "", + "color": 16761867 }, { "plugin": "DiscordAdminRequest", @@ -91,28 +69,45 @@ "color": 16761867 }, { - "plugin": "ChatCommands", - "enabled": true, - "commands": [ - { - "command": "squadjs", - "type": "warn", - "response": "This server is powered by SquadJS.", - "ignoreChats": [] - } - ] + "plugin": "DiscordServerStatus", + "enabled": false, + "discordClient": "discord", + "messageIDs": [], + "updateInterval": 60000, + "disableStatus": false }, { - "plugin": "AutoTKWarn", + "plugin": "AutoKickUnassigned", "enabled": true, - "message": "Please apologise for ALL TKs in ALL chat!" + "warningMessage": "Join a squad, you are are unassigned and will be kicked", + "kickMessage": "Unassigned - automatically removed", + "frequencyOfWarnings": 30, + "unassignedTimer": 360, + "playerThreshold": 93, + "roundStartDelay": 900, + "ignoreAdmins": false, + "ignoreWhitelist": false }, { - "plugin": "DiscordAdminBroadcast", + "plugin": "DiscordDebug", "enabled": false, "discordClient": "discord", "channelID": "", - "color": 16761867 + "events": [] + }, + { + "plugin": "IntervalledBroadcasts", + "enabled": false, + "broadcasts": [], + "interval": 300000 + }, + { + "plugin": "DiscordTeamkill", + "enabled": true, + "discordClient": "discord", + "channelID": "", + "color": 16761867, + "disableSCBL": false }, { "plugin": "SeedingMode", @@ -125,56 +120,61 @@ "liveMessage": "Live!" }, { - "plugin": "SCBLInfo", + "plugin": "AutoTKWarn", + "enabled": true, + "message": "Please apologise for ALL TKs in ALL chat!" + }, + { + "plugin": "DBLog", + "enabled": false, + "database": "mysql", + "overrideServerID": null + }, + { + "plugin": "DiscordRoundWinner", "enabled": true, "discordClient": "discord", "channelID": "", - "threshold": 6 + "color": 16761867 }, { - "plugin": "TeamRandomizer", + "plugin": "ChatCommands", "enabled": true, - "command": "randomize" + "commands": [ + { + "command": "squadjs", + "type": "warn", + "response": "This server is powered by SquadJS.", + "ignoreChats": [] + } + ] }, { - "plugin": "DiscordRcon", + "plugin": "DiscordAdminCamLogs", "enabled": false, "discordClient": "discord", "channelID": "", - "permissions": {}, - "prependAdminNameInBroadcast": false + "color": 16761867 }, { - "plugin": "DiscordTeamkill", - "enabled": true, + "plugin": "DiscordRcon", + "enabled": false, "discordClient": "discord", "channelID": "", - "color": 16761867, - "disableSCBL": false + "permissions": {}, + "prependAdminNameInBroadcast": false }, { - "plugin": "AutoKickUnassigned", + "plugin": "TeamRandomizer", "enabled": true, - "warningMessage": "Join a squad, you are are unassigned and will be kicked", - "kickMessage": "Unassigned - automatically removed", - "frequencyOfWarnings": 30, - "unassignedTimer": 360, - "playerThreshold": 93, - "roundStartDelay": 900, - "ignoreAdmins": false, - "ignoreWhitelist": false + "command": "randomize" }, { - "plugin": "DiscordSubsystemRestarter", - "enabled": false, + "plugin": "SCBLInfo", + "enabled": true, "discordClient": "discord", - "role": "" - }, - { - "plugin": "DBLog", - "enabled": false, - "database": "mysql", - "overrideServerID": null + "channelID": "", + "threshold": 6 } ], "logger": { From 2bed028137714941f7184e899487f5157f286843 Mon Sep 17 00:00:00 2001 From: Thomas Smyth Date: Sun, 28 Feb 2021 00:34:22 +0000 Subject: [PATCH 05/11] SquadJS v2.0.4-beta1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 71e1a023..a41089e6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "SquadJS", - "version": "2.0.3", + "version": "2.0.4-beta1", "repository": "https://github.com/Thomas-Smyth/SquadJS.git", "author": "Thomas Smyth ", "license": "BSL-1.0", From 503b21e38e4757f33807d979ac1201904f89d80e Mon Sep 17 00:00:00 2001 From: Thomas Smyth Date: Sun, 28 Feb 2021 00:45:21 +0000 Subject: [PATCH 06/11] Add back DiscordPlaceholder plugin --- README.md | 483 ++++++++++---------- config.json | 158 ++++--- squad-server/plugins/discord-placeholder.js | 49 ++ 3 files changed, 381 insertions(+), 309 deletions(-) create mode 100644 squad-server/plugins/discord-placeholder.js diff --git a/README.md b/README.md index f6e38680..e1dd0ba0 100644 --- a/README.md +++ b/README.md @@ -268,27 +268,111 @@ The following is a list of plugins built into SquadJS, you can click their title Interested in creating your own plugin? [See more here](./squad-server/plugins/readme.md)
    - DiscordSubsystemRestarter -

    DiscordSubsystemRestarter

    -

    The DiscordSubSystemRestarter plugin allows you to manually restart SquadJS subsystems in case an issues arises with them.

    • !squadjs restartsubsystem rcon
    • !squadjs restartsubsystem logparser

    + AutoKickUnassigned +

    AutoKickUnassigned

    +

    The AutoKickUnassigned plugin will automatically kick players that are not in a squad after a specified ammount of time.

    Options

    -
    • discordClient (Required)

      +
      • warningMessage

        Description
        -

        Discord connector name.

        +

        Message SquadJS will send to players warning them they will be kicked

        Default
        -
        discord
      • -
      • role (Required)

        +
        Join a squad, you are are unassigned and will be kicked
      • +
      • kickMessage

        Description
        -

        ID of role required to run the sub system restart commands.

        +

        Message to send to players when they are kicked

        Default
        -
      • Example
        -
        667741905228136459
      +
      Unassigned - automatically removed
    • +
    • frequencyOfWarnings

      +
      Description
      +

      How often in Seconds should we warn the player about being unassigned?

      +
      Default
      +
      30
    • +
    • unassignedTimer

      +
      Description
      +

      How long in Seconds to wait before a unassigned player is kicked

      +
      Default
      +
      360
    • +
    • playerThreshold

      +
      Description
      +

      Player count required for AutoKick to start kicking players, set to -1 to disable

      +
      Default
      +
      93
    • +
    • roundStartDelay

      +
      Description
      +

      Time delay in Seconds from start of the round before AutoKick starts kicking again

      +
      Default
      +
      900
    • +
    • ignoreAdmins

      +
      Description
      +

      • true: Admins will NOT be kicked
      • false: Admins WILL be kicked

      +
      Default
      +
      false
    • +
    • ignoreWhitelist

      +
      Description
      +

      • true: Reserve slot players will NOT be kicked
      • false: Reserve slot players WILL be kicked

      +
      Default
      +
      false
    - DiscordChat -

    DiscordChat

    -

    The DiscordChat plugin will log in-game chat to a Discord channel.

    + AutoTKWarn +

    AutoTKWarn

    +

    The AutoTkWarn plugin will automatically warn players with a message when they teamkill.

    +

    Options

    +
    • message

      +
      Description
      +

      The message to warn players with.

      +
      Default
      +
      Please apologise for ALL TKs in ALL chat!
    +
    + +
    + ChatCommands +

    ChatCommands

    +

    The ChatCommands plugin can be configured to make chat commands that broadcast or warn the caller with present messages.

    +

    Options

    +
    • commands

      +
      Description
      +

      An array of objects containing the following properties:

      • command - The command that initiates the message.
      • type - Either warn or broadcast.
      • response - The message to respond with.
      • ignoreChats - A list of chats to ignore the commands in. Use this to limit it to admins.

      +
      Default
      +
      [
      +  {
      +    "command": "squadjs",
      +    "type": "warn",
      +    "response": "This server is powered by SquadJS.",
      +    "ignoreChats": []
      +  }
      +]
    +
    + +
    + DBLog +

    DBLog

    +

    The mysql-log plugin will log various server statistics and events to a database. This is great for server performance monitoring and/or player stat tracking. + +Grafana (NOT YET WORKING WITH V2): +

    • Grafana is a cool way of viewing server statistics stored in the database.
    • +
    • Install Grafana.
    • +
    • Add your database as a datasource named SquadJS.
    • +
    • Import the SquadJS Dashboard to get a preconfigured MySQL only Grafana dashboard.
    • +
    • Install any missing Grafana plugins.

    +

    Options

    +
    • database (Required)

      +
      Description
      +

      The Sequelize connector to log server information to.

      +
      Default
      +
      mysql
    • +
    • overrideServerID

      +
      Description
      +

      A overridden server ID.

      +
      Default
      +
      null
    +
    + +
    + DiscordAdminBroadcast +

    DiscordAdminBroadcast

    +

    The DiscordAdminBroadcast plugin will send a copy of admin broadcasts made in game to a Discord channel.

    Options

    • discordClient (Required)

      Description
      @@ -301,32 +385,17 @@ Interested in creating your own plugin? [See more here](./squad-server/plugins/r
      Default
    • Example
      667741905228136459
      -
    • chatColors

      -
      Description
      -

      The color of the embed for each chat.

      -
      Default
      -
      {}
    • Example
      -
      {
      -  "ChatAll": 16761867
      -}
    • color

      Description

      The color of the embed.

      Default
      -
      16761867
    • -
    • ignoreChats

      -
      Description
      -

      A list of chat names to ignore.

      -
      Default
      -
      [
      -  "ChatSquad"
      -]
    +
    16761867
    - DiscordAdminBroadcast -

    DiscordAdminBroadcast

    -

    The DiscordAdminBroadcast plugin will send a copy of admin broadcasts made in game to a Discord channel.

    + DiscordAdminCamLogs +

    DiscordAdminCamLogs

    +

    The DiscordAdminCamLogs plugin will log in game admin camera usage to a Discord channel.

    Options

    • discordClient (Required)

      Description
      @@ -335,7 +404,7 @@ Interested in creating your own plugin? [See more here](./squad-server/plugins/r
      discord
    • channelID (Required)

      Description
      -

      The ID of the channel to log admin broadcasts to.

      +

      The ID of the channel to log admin camera usage to.

      Default
    • Example
      667741905228136459
      @@ -404,83 +473,41 @@ Interested in creating your own plugin? [See more here](./squad-server/plugins/r
    - DiscordServerStatus -

    DiscordServerStatus

    -

    The DiscordServerStatus plugin updates a message in Discord with current server information, e.g. player count.

    + DiscordChat +

    DiscordChat

    +

    The DiscordChat plugin will log in-game chat to a Discord channel.

    Options

    • discordClient (Required)

      Description

      Discord connector name.

      Default
      discord
    • -
    • messageIDs (Required)

      -
      Description
      -

      ID of messages to update.

      -
      Default
      -
      []
    • Example
      -
      [
      -  {
      -    "channelID": "667741905228136459",
      -    "messageID": "766688383043895387"
      -  }
      -]
      -
    • updateInterval

      -
      Description
      -

      How frequently to update the status in Discord.

      -
      Default
      -
      60000
    • -
    • disableStatus

      -
      Description
      -

      Disable the bot status.

      -
      Default
      -
      false
    -
    - -
    - AutoKickUnassigned -

    AutoKickUnassigned

    -

    The AutoKickUnassigned plugin will automatically kick players that are not in a squad after a specified ammount of time.

    -

    Options

    -
    • warningMessage

      -
      Description
      -

      Message SquadJS will send to players warning them they will be kicked

      -
      Default
      -
      Join a squad, you are are unassigned and will be kicked
    • -
    • kickMessage

      -
      Description
      -

      Message to send to players when they are kicked

      -
      Default
      -
      Unassigned - automatically removed
    • -
    • frequencyOfWarnings

      -
      Description
      -

      How often in Seconds should we warn the player about being unassigned?

      -
      Default
      -
      30
    • -
    • unassignedTimer

      -
      Description
      -

      How long in Seconds to wait before a unassigned player is kicked

      -
      Default
      -
      360
    • -
    • playerThreshold

      +
    • channelID (Required)

      Description
      -

      Player count required for AutoKick to start kicking players, set to -1 to disable

      +

      The ID of the channel to log admin broadcasts to.

      Default
      -
      93
    • -
    • roundStartDelay

      +
    • Example
      +
      667741905228136459
      +
    • chatColors

      Description
      -

      Time delay in Seconds from start of the round before AutoKick starts kicking again

      +

      The color of the embed for each chat.

      Default
      -
      900
    • -
    • ignoreAdmins

      +
      {}
    • Example
      +
      {
      +  "ChatAll": 16761867
      +}
      +
    • color

      Description
      -

      • true: Admins will NOT be kicked
      • false: Admins WILL be kicked

      +

      The color of the embed.

      Default
      -
      false
    • -
    • ignoreWhitelist

      +
      16761867
    • +
    • ignoreChats

      Description
      -

      • true: Reserve slot players will NOT be kicked
      • false: Reserve slot players WILL be kicked

      +

      A list of chat names to ignore.

      Default
      -
      false
    +
    [
    +  "ChatSquad"
    +]
    @@ -510,29 +537,26 @@ Interested in creating your own plugin? [See more here](./squad-server/plugins/r
    - IntervalledBroadcasts -

    IntervalledBroadcasts

    -

    The IntervalledBroadcasts plugin allows you to set broadcasts, which will be broadcasted at preset intervals

    + DiscordPlaceholder +

    DiscordPlaceholder

    +

    The DiscordPlaceholder plugin allows you to make your bot create placeholder messages that can be used when configuring other plugins.

    Options

    -
    • broadcasts

      +
      • discordClient (Required)

        Description
        -

        Messages to broadcast.

        +

        Discord connector name.

        Default
        -
        []
      • Example
        -
        [
        -  "This server is powered by SquadJS."
        -]
        -
      • interval

        +
        discord
      • +
      • command

        Description
        -

        Frequency of the broadcasts in milliseconds.

        +

        Command to create Discord placeholder.

        Default
        -
        300000
      +
      !placeholder
    - DiscordTeamkill -

    DiscordTeamkill

    -

    The DiscordTeamkill plugin logs teamkills and related information to a Discord channel for admins to review.

    + DiscordRcon +

    DiscordRcon

    +

    The DiscordRcon plugin allows a specified Discord channel to be used as a RCON console to run RCON commands.

    Options

    • discordClient (Required)

      Description
      @@ -541,95 +565,29 @@ Interested in creating your own plugin? [See more here](./squad-server/plugins/r
      discord
    • channelID (Required)

      Description
      -

      The ID of the channel to log teamkills to.

      +

      ID of channel to turn into RCON console.

      Default
    • Example
      667741905228136459
      -
    • color

      +
    • permissions

      Description
      -

      The color of the embeds.

      +

      Default
      -
      16761867
    • -
    • disableSCBL

      +
      {}
    • Example
      +
      {
      +  "123456789123456789": [
      +    "AdminBroadcast",
      +    "AdminForceTeamChange",
      +    "AdminDemoteCommander"
      +  ]
      +}
      +
    • prependAdminNameInBroadcast

      Description
      -

      Disable Squad Community Ban List information.

      +

      Prepend admin names when making announcements.

      Default
      false
    -
    - SeedingMode -

    SeedingMode

    -

    The SeedingMode plugin broadcasts seeding rule messages to players at regular intervals when the server is below a specified player count. It can also be configured to display "Live" messages when the server goes live.

    -

    Options

    -
    • interval

      -
      Description
      -

      Frequency of seeding messages in milliseconds.

      -
      Default
      -
      150000
    • -
    • seedingThreshold

      -
      Description
      -

      Player count required for server not to be in seeding mode.

      -
      Default
      -
      50
    • -
    • seedingMessage

      -
      Description
      -

      Seeding message to display.

      -
      Default
      -
      Seeding Rules Active! Fight only over the middle flags! No FOB Hunting!
    • -
    • liveEnabled

      -
      Description
      -

      Enable "Live" messages for when the server goes live.

      -
      Default
      -
      true
    • -
    • liveThreshold

      -
      Description
      -

      Player count required for "Live" messages to not bee displayed.

      -
      Default
      -
      52
    • -
    • liveMessage

      -
      Description
      -

      "Live" message to display.

      -
      Default
      -
      Live!
    -
    - -
    - AutoTKWarn -

    AutoTKWarn

    -

    The AutoTkWarn plugin will automatically warn players with a message when they teamkill.

    -

    Options

    -
    • message

      -
      Description
      -

      The message to warn players with.

      -
      Default
      -
      Please apologise for ALL TKs in ALL chat!
    -
    - -
    - DBLog -

    DBLog

    -

    The mysql-log plugin will log various server statistics and events to a database. This is great for server performance monitoring and/or player stat tracking. - -Grafana (NOT YET WORKING WITH V2): -

    • Grafana is a cool way of viewing server statistics stored in the database.
    • -
    • Install Grafana.
    • -
    • Add your database as a datasource named SquadJS.
    • -
    • Import the SquadJS Dashboard to get a preconfigured MySQL only Grafana dashboard.
    • -
    • Install any missing Grafana plugins.

    -

    Options

    -
    • database (Required)

      -
      Description
      -

      The Sequelize connector to log server information to.

      -
      Default
      -
      mysql
    • -
    • overrideServerID

      -
      Description
      -

      A overridden server ID.

      -
      Default
      -
      null
    -
    -
    DiscordRoundWinner

    DiscordRoundWinner

    @@ -654,51 +612,60 @@ Grafana (NOT YET WORKING WITH V2):
    - ChatCommands -

    ChatCommands

    -

    The ChatCommands plugin can be configured to make chat commands that broadcast or warn the caller with present messages.

    + DiscordServerStatus +

    DiscordServerStatus

    +

    The DiscordServerStatus plugin updates a message in Discord with current server information, e.g. player count.

    Options

    -
    • commands

      +
      • discordClient (Required)

        Description
        -

        An array of objects containing the following properties:

        • command - The command that initiates the message.
        • type - Either warn or broadcast.
        • response - The message to respond with.
        • ignoreChats - A list of chats to ignore the commands in. Use this to limit it to admins.

        +

        Discord connector name.

        +
        Default
        +
        discord
      • +
      • messageIDs (Required)

        +
        Description
        +

        ID of messages to update.

        Default
        +
        []
      • Example
        [
           {
        -    "command": "squadjs",
        -    "type": "warn",
        -    "response": "This server is powered by SquadJS.",
        -    "ignoreChats": []
        +    "channelID": "667741905228136459",
        +    "messageID": "766688383043895387"
           }
        -]
      +] +
    • updateInterval

      +
      Description
      +

      How frequently to update the status in Discord.

      +
      Default
      +
      60000
    • +
    • disableStatus

      +
      Description
      +

      Disable the bot status.

      +
      Default
      +
      false
    - DiscordAdminCamLogs -

    DiscordAdminCamLogs

    -

    The DiscordAdminCamLogs plugin will log in game admin camera usage to a Discord channel.

    + DiscordSubsystemRestarter +

    DiscordSubsystemRestarter

    +

    The DiscordSubSystemRestarter plugin allows you to manually restart SquadJS subsystems in case an issues arises with them.

    • !squadjs restartsubsystem rcon
    • !squadjs restartsubsystem logparser

    Options

    • discordClient (Required)

      Description

      Discord connector name.

      Default
      discord
    • -
    • channelID (Required)

      +
    • role (Required)

      Description
      -

      The ID of the channel to log admin camera usage to.

      +

      ID of role required to run the sub system restart commands.

      Default
    • Example
      -
      667741905228136459
      -
    • color

      -
      Description
      -

      The color of the embed.

      -
      Default
      -
      16761867
    +
    667741905228136459
    - DiscordRcon -

    DiscordRcon

    -

    The DiscordRcon plugin allows a specified Discord channel to be used as a RCON console to run RCON commands.

    + DiscordTeamkill +

    DiscordTeamkill

    +

    The DiscordTeamkill plugin logs teamkills and related information to a Discord channel for admins to review.

    Options

    • discordClient (Required)

      Description
      @@ -707,39 +674,40 @@ Grafana (NOT YET WORKING WITH V2):
      discord
    • channelID (Required)

      Description
      -

      ID of channel to turn into RCON console.

      +

      The ID of the channel to log teamkills to.

      Default
    • Example
      667741905228136459
      -
    • permissions

      +
    • color

      Description
      -

      +

      The color of the embeds.

      Default
      -
      {}
    • Example
      -
      {
      -  "123456789123456789": [
      -    "AdminBroadcast",
      -    "AdminForceTeamChange",
      -    "AdminDemoteCommander"
      -  ]
      -}
      -
    • prependAdminNameInBroadcast

      +
      16761867
    • +
    • disableSCBL

      Description
      -

      Prepend admin names when making announcements.

      +

      Disable Squad Community Ban List information.

      Default
      false
    - TeamRandomizer -

    TeamRandomizer

    -

    The TeamRandomizer can be used to randomize teams. It's great for destroying clan stacks or for social events. It can be run by typing, by default, !randomize into in-game admin chat

    + IntervalledBroadcasts +

    IntervalledBroadcasts

    +

    The IntervalledBroadcasts plugin allows you to set broadcasts, which will be broadcasted at preset intervals

    Options

    -
    • command

      +
      • broadcasts

        Description
        -

        The command used to randomize the teams.

        +

        Messages to broadcast.

        Default
        -
        randomize
      +
      []
    • Example
      +
      [
      +  "This server is powered by SquadJS."
      +]
      +
    • interval

      +
      Description
      +

      Frequency of the broadcasts in milliseconds.

      +
      Default
      +
      300000
    @@ -765,6 +733,55 @@ Grafana (NOT YET WORKING WITH V2):
    6
    +
    + SeedingMode +

    SeedingMode

    +

    The SeedingMode plugin broadcasts seeding rule messages to players at regular intervals when the server is below a specified player count. It can also be configured to display "Live" messages when the server goes live.

    +

    Options

    +
    • interval

      +
      Description
      +

      Frequency of seeding messages in milliseconds.

      +
      Default
      +
      150000
    • +
    • seedingThreshold

      +
      Description
      +

      Player count required for server not to be in seeding mode.

      +
      Default
      +
      50
    • +
    • seedingMessage

      +
      Description
      +

      Seeding message to display.

      +
      Default
      +
      Seeding Rules Active! Fight only over the middle flags! No FOB Hunting!
    • +
    • liveEnabled

      +
      Description
      +

      Enable "Live" messages for when the server goes live.

      +
      Default
      +
      true
    • +
    • liveThreshold

      +
      Description
      +

      Player count required for "Live" messages to not bee displayed.

      +
      Default
      +
      52
    • +
    • liveMessage

      +
      Description
      +

      "Live" message to display.

      +
      Default
      +
      Live!
    +
    + +
    + TeamRandomizer +

    TeamRandomizer

    +

    The TeamRandomizer can be used to randomize teams. It's great for destroying clan stacks or for social events. It can be run by typing, by default, !randomize into in-game admin chat

    +

    Options

    +
    • command

      +
      Description
      +

      The command used to randomize the teams.

      +
      Default
      +
      randomize
    +
    +
    ## Statement on Accuracy diff --git a/config.json b/config.json index 9043cc9b..66e61653 100644 --- a/config.json +++ b/config.json @@ -33,22 +33,40 @@ }, "plugins": [ { - "plugin": "DiscordSubsystemRestarter", - "enabled": false, - "discordClient": "discord", - "role": "" + "plugin": "AutoKickUnassigned", + "enabled": true, + "warningMessage": "Join a squad, you are are unassigned and will be kicked", + "kickMessage": "Unassigned - automatically removed", + "frequencyOfWarnings": 30, + "unassignedTimer": 360, + "playerThreshold": 93, + "roundStartDelay": 900, + "ignoreAdmins": false, + "ignoreWhitelist": false }, { - "plugin": "DiscordChat", + "plugin": "AutoTKWarn", "enabled": true, - "discordClient": "discord", - "channelID": "", - "chatColors": {}, - "color": 16761867, - "ignoreChats": [ - "ChatSquad" + "message": "Please apologise for ALL TKs in ALL chat!" + }, + { + "plugin": "ChatCommands", + "enabled": true, + "commands": [ + { + "command": "squadjs", + "type": "warn", + "response": "This server is powered by SquadJS.", + "ignoreChats": [] + } ] }, + { + "plugin": "DBLog", + "enabled": false, + "database": "mysql", + "overrideServerID": null + }, { "plugin": "DiscordAdminBroadcast", "enabled": false, @@ -56,6 +74,13 @@ "channelID": "", "color": 16761867 }, + { + "plugin": "DiscordAdminCamLogs", + "enabled": false, + "discordClient": "discord", + "channelID": "", + "color": 16761867 + }, { "plugin": "DiscordAdminRequest", "enabled": true, @@ -69,24 +94,15 @@ "color": 16761867 }, { - "plugin": "DiscordServerStatus", - "enabled": false, - "discordClient": "discord", - "messageIDs": [], - "updateInterval": 60000, - "disableStatus": false - }, - { - "plugin": "AutoKickUnassigned", + "plugin": "DiscordChat", "enabled": true, - "warningMessage": "Join a squad, you are are unassigned and will be kicked", - "kickMessage": "Unassigned - automatically removed", - "frequencyOfWarnings": 30, - "unassignedTimer": 360, - "playerThreshold": 93, - "roundStartDelay": 900, - "ignoreAdmins": false, - "ignoreWhitelist": false + "discordClient": "discord", + "channelID": "", + "chatColors": {}, + "color": 16761867, + "ignoreChats": [ + "ChatSquad" + ] }, { "plugin": "DiscordDebug", @@ -96,39 +112,18 @@ "events": [] }, { - "plugin": "IntervalledBroadcasts", + "plugin": "DiscordPlaceholder", "enabled": false, - "broadcasts": [], - "interval": 300000 - }, - { - "plugin": "DiscordTeamkill", - "enabled": true, "discordClient": "discord", - "channelID": "", - "color": 16761867, - "disableSCBL": false - }, - { - "plugin": "SeedingMode", - "enabled": true, - "interval": 150000, - "seedingThreshold": 50, - "seedingMessage": "Seeding Rules Active! Fight only over the middle flags! No FOB Hunting!", - "liveEnabled": true, - "liveThreshold": 52, - "liveMessage": "Live!" - }, - { - "plugin": "AutoTKWarn", - "enabled": true, - "message": "Please apologise for ALL TKs in ALL chat!" + "command": "!placeholder" }, { - "plugin": "DBLog", + "plugin": "DiscordRcon", "enabled": false, - "database": "mysql", - "overrideServerID": null + "discordClient": "discord", + "channelID": "", + "permissions": {}, + "prependAdminNameInBroadcast": false }, { "plugin": "DiscordRoundWinner", @@ -138,36 +133,32 @@ "color": 16761867 }, { - "plugin": "ChatCommands", - "enabled": true, - "commands": [ - { - "command": "squadjs", - "type": "warn", - "response": "This server is powered by SquadJS.", - "ignoreChats": [] - } - ] + "plugin": "DiscordServerStatus", + "enabled": false, + "discordClient": "discord", + "messageIDs": [], + "updateInterval": 60000, + "disableStatus": false }, { - "plugin": "DiscordAdminCamLogs", + "plugin": "DiscordSubsystemRestarter", "enabled": false, "discordClient": "discord", - "channelID": "", - "color": 16761867 + "role": "" }, { - "plugin": "DiscordRcon", - "enabled": false, + "plugin": "DiscordTeamkill", + "enabled": true, "discordClient": "discord", "channelID": "", - "permissions": {}, - "prependAdminNameInBroadcast": false + "color": 16761867, + "disableSCBL": false }, { - "plugin": "TeamRandomizer", - "enabled": true, - "command": "randomize" + "plugin": "IntervalledBroadcasts", + "enabled": false, + "broadcasts": [], + "interval": 300000 }, { "plugin": "SCBLInfo", @@ -175,6 +166,21 @@ "discordClient": "discord", "channelID": "", "threshold": 6 + }, + { + "plugin": "SeedingMode", + "enabled": true, + "interval": 150000, + "seedingThreshold": 50, + "seedingMessage": "Seeding Rules Active! Fight only over the middle flags! No FOB Hunting!", + "liveEnabled": true, + "liveThreshold": 52, + "liveMessage": "Live!" + }, + { + "plugin": "TeamRandomizer", + "enabled": true, + "command": "randomize" } ], "logger": { diff --git a/squad-server/plugins/discord-placeholder.js b/squad-server/plugins/discord-placeholder.js new file mode 100644 index 00000000..0890aea2 --- /dev/null +++ b/squad-server/plugins/discord-placeholder.js @@ -0,0 +1,49 @@ +import BasePlugin from './base-plugin.js'; + +export default class DiscordPlaceholder extends BasePlugin { + static get description() { + return ( + 'The DiscordPlaceholder plugin allows you to make your bot create placeholder messages that ' + + 'can be used when configuring other plugins.' + ); + } + + static get defaultEnabled() { + return true; + } + + static get optionsSpecification() { + return { + discordClient: { + required: true, + description: 'Discord connector name.', + connector: 'discord', + default: 'discord' + }, + command: { + required: false, + description: 'Command to create Discord placeholder.', + default: '!placeholder' + } + }; + } + + constructor(server, options, connectors) { + super(server, options, connectors); + + this.onMessage = this.onMessage.bind(this); + } + + async mount() { + this.options.discordClient.on('message', this.onMessage); + } + + async unmount() { + this.options.discordClient.removeEventListener('message', this.onMessage); + } + + async onMessage(message) { + if (message.author.bot) return; + await message.channel.send('Placeholder.'); + } +} From e4328ad4e24f73e995197697978db2654b89ac3b Mon Sep 17 00:00:00 2001 From: Thomas Smyth Date: Sun, 28 Feb 2021 00:46:18 +0000 Subject: [PATCH 07/11] ESLint & README Generation --- README.md | 484 ++++++++++++++++++++++++++-------------------------- config.json | 158 ++++++++--------- 2 files changed, 321 insertions(+), 321 deletions(-) diff --git a/README.md b/README.md index e1dd0ba0..3c55f6e8 100644 --- a/README.md +++ b/README.md @@ -268,111 +268,44 @@ The following is a list of plugins built into SquadJS, you can click their title Interested in creating your own plugin? [See more here](./squad-server/plugins/readme.md)
    - AutoKickUnassigned -

    AutoKickUnassigned

    -

    The AutoKickUnassigned plugin will automatically kick players that are not in a squad after a specified ammount of time.

    -

    Options

    -
    • warningMessage

      -
      Description
      -

      Message SquadJS will send to players warning them they will be kicked

      -
      Default
      -
      Join a squad, you are are unassigned and will be kicked
    • -
    • kickMessage

      -
      Description
      -

      Message to send to players when they are kicked

      -
      Default
      -
      Unassigned - automatically removed
    • -
    • frequencyOfWarnings

      -
      Description
      -

      How often in Seconds should we warn the player about being unassigned?

      -
      Default
      -
      30
    • -
    • unassignedTimer

      -
      Description
      -

      How long in Seconds to wait before a unassigned player is kicked

      -
      Default
      -
      360
    • -
    • playerThreshold

      -
      Description
      -

      Player count required for AutoKick to start kicking players, set to -1 to disable

      -
      Default
      -
      93
    • -
    • roundStartDelay

      -
      Description
      -

      Time delay in Seconds from start of the round before AutoKick starts kicking again

      -
      Default
      -
      900
    • -
    • ignoreAdmins

      -
      Description
      -

      • true: Admins will NOT be kicked
      • false: Admins WILL be kicked

      -
      Default
      -
      false
    • -
    • ignoreWhitelist

      -
      Description
      -

      • true: Reserve slot players will NOT be kicked
      • false: Reserve slot players WILL be kicked

      -
      Default
      -
      false
    -
    - -
    - AutoTKWarn -

    AutoTKWarn

    -

    The AutoTkWarn plugin will automatically warn players with a message when they teamkill.

    + DiscordPlaceholder +

    DiscordPlaceholder

    +

    The DiscordPlaceholder plugin allows you to make your bot create placeholder messages that can be used when configuring other plugins.

    Options

    -
    • message

      +
      • discordClient (Required)

        Description
        -

        The message to warn players with.

        +

        Discord connector name.

        Default
        -
        Please apologise for ALL TKs in ALL chat!
      -
    - -
    - ChatCommands -

    ChatCommands

    -

    The ChatCommands plugin can be configured to make chat commands that broadcast or warn the caller with present messages.

    -

    Options

    -
    • commands

      +
      discord
    • +
    • command

      Description
      -

      An array of objects containing the following properties:

      • command - The command that initiates the message.
      • type - Either warn or broadcast.
      • response - The message to respond with.
      • ignoreChats - A list of chats to ignore the commands in. Use this to limit it to admins.

      +

      Command to create Discord placeholder.

      Default
      -
      [
      -  {
      -    "command": "squadjs",
      -    "type": "warn",
      -    "response": "This server is powered by SquadJS.",
      -    "ignoreChats": []
      -  }
      -]
    +
    !placeholder
    - DBLog -

    DBLog

    -

    The mysql-log plugin will log various server statistics and events to a database. This is great for server performance monitoring and/or player stat tracking. - -Grafana (NOT YET WORKING WITH V2): -

    • Grafana is a cool way of viewing server statistics stored in the database.
    • -
    • Install Grafana.
    • -
    • Add your database as a datasource named SquadJS.
    • -
    • Import the SquadJS Dashboard to get a preconfigured MySQL only Grafana dashboard.
    • -
    • Install any missing Grafana plugins.

    + DiscordSubsystemRestarter +

    DiscordSubsystemRestarter

    +

    The DiscordSubSystemRestarter plugin allows you to manually restart SquadJS subsystems in case an issues arises with them.

    • !squadjs restartsubsystem rcon
    • !squadjs restartsubsystem logparser

    Options

    -
    • database (Required)

      +
      • discordClient (Required)

        Description
        -

        The Sequelize connector to log server information to.

        +

        Discord connector name.

        Default
        -
        mysql
      • -
      • overrideServerID

        +
        discord
      • +
      • role (Required)

        Description
        -

        A overridden server ID.

        +

        ID of role required to run the sub system restart commands.

        Default
        -
        null
      +
    • Example
      +
      667741905228136459
    - DiscordAdminBroadcast -

    DiscordAdminBroadcast

    -

    The DiscordAdminBroadcast plugin will send a copy of admin broadcasts made in game to a Discord channel.

    + DiscordChat +

    DiscordChat

    +

    The DiscordChat plugin will log in-game chat to a Discord channel.

    Options

    • discordClient (Required)

      Description
      @@ -385,17 +318,32 @@ Grafana (NOT YET WORKING WITH V2):
      Default
    • Example
      667741905228136459
      +
    • chatColors

      +
      Description
      +

      The color of the embed for each chat.

      +
      Default
      +
      {}
    • Example
      +
      {
      +  "ChatAll": 16761867
      +}
    • color

      Description

      The color of the embed.

      Default
      -
      16761867
    +
    16761867
    +
  • ignoreChats

    +
    Description
    +

    A list of chat names to ignore.

    +
    Default
    +
    [
    +  "ChatSquad"
    +]
  • - DiscordAdminCamLogs -

    DiscordAdminCamLogs

    -

    The DiscordAdminCamLogs plugin will log in game admin camera usage to a Discord channel.

    + DiscordAdminBroadcast +

    DiscordAdminBroadcast

    +

    The DiscordAdminBroadcast plugin will send a copy of admin broadcasts made in game to a Discord channel.

    Options

    • discordClient (Required)

      Description
      @@ -404,7 +352,7 @@ Grafana (NOT YET WORKING WITH V2):
      discord
    • channelID (Required)

      Description
      -

      The ID of the channel to log admin camera usage to.

      +

      The ID of the channel to log admin broadcasts to.

      Default
    • Example
      667741905228136459
      @@ -473,41 +421,83 @@ Grafana (NOT YET WORKING WITH V2):
    - DiscordChat -

    DiscordChat

    -

    The DiscordChat plugin will log in-game chat to a Discord channel.

    + DiscordServerStatus +

    DiscordServerStatus

    +

    The DiscordServerStatus plugin updates a message in Discord with current server information, e.g. player count.

    Options

    • discordClient (Required)

      Description

      Discord connector name.

      Default
      discord
    • -
    • channelID (Required)

      +
    • messageIDs (Required)

      Description
      -

      The ID of the channel to log admin broadcasts to.

      +

      ID of messages to update.

      Default
      -
    • Example
      -
      667741905228136459
      -
    • chatColors

      +
      []
    • Example
      +
      [
      +  {
      +    "channelID": "667741905228136459",
      +    "messageID": "766688383043895387"
      +  }
      +]
      +
    • updateInterval

      Description
      -

      The color of the embed for each chat.

      +

      How frequently to update the status in Discord.

      Default
      -
      {}
    • Example
      -
      {
      -  "ChatAll": 16761867
      -}
      -
    • color

      +
      60000
    • +
    • disableStatus

      Description
      -

      The color of the embed.

      +

      Disable the bot status.

      Default
      -
      16761867
    • -
    • ignoreChats

      +
      false
    +
    + +
    + AutoKickUnassigned +

    AutoKickUnassigned

    +

    The AutoKickUnassigned plugin will automatically kick players that are not in a squad after a specified ammount of time.

    +

    Options

    +
    • warningMessage

      Description
      -

      A list of chat names to ignore.

      +

      Message SquadJS will send to players warning them they will be kicked

      Default
      -
      [
      -  "ChatSquad"
      -]
    +
    Join a squad, you are are unassigned and will be kicked
    +
  • kickMessage

    +
    Description
    +

    Message to send to players when they are kicked

    +
    Default
    +
    Unassigned - automatically removed
  • +
  • frequencyOfWarnings

    +
    Description
    +

    How often in Seconds should we warn the player about being unassigned?

    +
    Default
    +
    30
  • +
  • unassignedTimer

    +
    Description
    +

    How long in Seconds to wait before a unassigned player is kicked

    +
    Default
    +
    360
  • +
  • playerThreshold

    +
    Description
    +

    Player count required for AutoKick to start kicking players, set to -1 to disable

    +
    Default
    +
    93
  • +
  • roundStartDelay

    +
    Description
    +

    Time delay in Seconds from start of the round before AutoKick starts kicking again

    +
    Default
    +
    900
  • +
  • ignoreAdmins

    +
    Description
    +

    • true: Admins will NOT be kicked
    • false: Admins WILL be kicked

    +
    Default
    +
    false
  • +
  • ignoreWhitelist

    +
    Description
    +

    • true: Reserve slot players will NOT be kicked
    • false: Reserve slot players WILL be kicked

    +
    Default
    +
    false
  • @@ -537,26 +527,29 @@ Grafana (NOT YET WORKING WITH V2):
    - DiscordPlaceholder -

    DiscordPlaceholder

    -

    The DiscordPlaceholder plugin allows you to make your bot create placeholder messages that can be used when configuring other plugins.

    + IntervalledBroadcasts +

    IntervalledBroadcasts

    +

    The IntervalledBroadcasts plugin allows you to set broadcasts, which will be broadcasted at preset intervals

    Options

    -
    • discordClient (Required)

      +
      • broadcasts

        Description
        -

        Discord connector name.

        +

        Messages to broadcast.

        Default
        -
        discord
      • -
      • command

        +
        []
      • Example
        +
        [
        +  "This server is powered by SquadJS."
        +]
        +
      • interval

        Description
        -

        Command to create Discord placeholder.

        +

        Frequency of the broadcasts in milliseconds.

        Default
        -
        !placeholder
      +
      300000
    - DiscordRcon -

    DiscordRcon

    -

    The DiscordRcon plugin allows a specified Discord channel to be used as a RCON console to run RCON commands.

    + DiscordTeamkill +

    DiscordTeamkill

    +

    The DiscordTeamkill plugin logs teamkills and related information to a Discord channel for admins to review.

    Options

    • discordClient (Required)

      Description
      @@ -565,29 +558,95 @@ Grafana (NOT YET WORKING WITH V2):
      discord
    • channelID (Required)

      Description
      -

      ID of channel to turn into RCON console.

      +

      The ID of the channel to log teamkills to.

      Default
    • Example
      667741905228136459
      -
    • permissions

      +
    • color

      Description
      -

      +

      The color of the embeds.

      Default
      -
      {}
    • Example
      -
      {
      -  "123456789123456789": [
      -    "AdminBroadcast",
      -    "AdminForceTeamChange",
      -    "AdminDemoteCommander"
      -  ]
      -}
      -
    • prependAdminNameInBroadcast

      +
      16761867
    • +
    • disableSCBL

      Description
      -

      Prepend admin names when making announcements.

      +

      Disable Squad Community Ban List information.

      Default
      false
    +
    + SeedingMode +

    SeedingMode

    +

    The SeedingMode plugin broadcasts seeding rule messages to players at regular intervals when the server is below a specified player count. It can also be configured to display "Live" messages when the server goes live.

    +

    Options

    +
    • interval

      +
      Description
      +

      Frequency of seeding messages in milliseconds.

      +
      Default
      +
      150000
    • +
    • seedingThreshold

      +
      Description
      +

      Player count required for server not to be in seeding mode.

      +
      Default
      +
      50
    • +
    • seedingMessage

      +
      Description
      +

      Seeding message to display.

      +
      Default
      +
      Seeding Rules Active! Fight only over the middle flags! No FOB Hunting!
    • +
    • liveEnabled

      +
      Description
      +

      Enable "Live" messages for when the server goes live.

      +
      Default
      +
      true
    • +
    • liveThreshold

      +
      Description
      +

      Player count required for "Live" messages to not bee displayed.

      +
      Default
      +
      52
    • +
    • liveMessage

      +
      Description
      +

      "Live" message to display.

      +
      Default
      +
      Live!
    +
    + +
    + AutoTKWarn +

    AutoTKWarn

    +

    The AutoTkWarn plugin will automatically warn players with a message when they teamkill.

    +

    Options

    +
    • message

      +
      Description
      +

      The message to warn players with.

      +
      Default
      +
      Please apologise for ALL TKs in ALL chat!
    +
    + +
    + DBLog +

    DBLog

    +

    The mysql-log plugin will log various server statistics and events to a database. This is great for server performance monitoring and/or player stat tracking. + +Grafana (NOT YET WORKING WITH V2): +

    • Grafana is a cool way of viewing server statistics stored in the database.
    • +
    • Install Grafana.
    • +
    • Add your database as a datasource named SquadJS.
    • +
    • Import the SquadJS Dashboard to get a preconfigured MySQL only Grafana dashboard.
    • +
    • Install any missing Grafana plugins.

    +

    Options

    +
    • database (Required)

      +
      Description
      +

      The Sequelize connector to log server information to.

      +
      Default
      +
      mysql
    • +
    • overrideServerID

      +
      Description
      +

      A overridden server ID.

      +
      Default
      +
      null
    +
    +
    DiscordRoundWinner

    DiscordRoundWinner

    @@ -612,60 +671,51 @@ Grafana (NOT YET WORKING WITH V2):
    - DiscordServerStatus -

    DiscordServerStatus

    -

    The DiscordServerStatus plugin updates a message in Discord with current server information, e.g. player count.

    + ChatCommands +

    ChatCommands

    +

    The ChatCommands plugin can be configured to make chat commands that broadcast or warn the caller with present messages.

    Options

    -
    • discordClient (Required)

      -
      Description
      -

      Discord connector name.

      -
      Default
      -
      discord
    • -
    • messageIDs (Required)

      +
      • commands

        Description
        -

        ID of messages to update.

        +

        An array of objects containing the following properties:

        • command - The command that initiates the message.
        • type - Either warn or broadcast.
        • response - The message to respond with.
        • ignoreChats - A list of chats to ignore the commands in. Use this to limit it to admins.

        Default
        -
        []
      • Example
        [
           {
        -    "channelID": "667741905228136459",
        -    "messageID": "766688383043895387"
        +    "command": "squadjs",
        +    "type": "warn",
        +    "response": "This server is powered by SquadJS.",
        +    "ignoreChats": []
           }
        -]
        -
      • updateInterval

        -
        Description
        -

        How frequently to update the status in Discord.

        -
        Default
        -
        60000
      • -
      • disableStatus

        -
        Description
        -

        Disable the bot status.

        -
        Default
        -
        false
      +]
    - DiscordSubsystemRestarter -

    DiscordSubsystemRestarter

    -

    The DiscordSubSystemRestarter plugin allows you to manually restart SquadJS subsystems in case an issues arises with them.

    • !squadjs restartsubsystem rcon
    • !squadjs restartsubsystem logparser

    + DiscordAdminCamLogs +

    DiscordAdminCamLogs

    +

    The DiscordAdminCamLogs plugin will log in game admin camera usage to a Discord channel.

    Options

    • discordClient (Required)

      Description

      Discord connector name.

      Default
      discord
    • -
    • role (Required)

      +
    • channelID (Required)

      Description
      -

      ID of role required to run the sub system restart commands.

      +

      The ID of the channel to log admin camera usage to.

      Default
    • Example
      -
      667741905228136459
    +
    667741905228136459
    +
  • color

    +
    Description
    +

    The color of the embed.

    +
    Default
    +
    16761867
  • - DiscordTeamkill -

    DiscordTeamkill

    -

    The DiscordTeamkill plugin logs teamkills and related information to a Discord channel for admins to review.

    + DiscordRcon +

    DiscordRcon

    +

    The DiscordRcon plugin allows a specified Discord channel to be used as a RCON console to run RCON commands.

    Options

    • discordClient (Required)

      Description
      @@ -674,40 +724,39 @@ Grafana (NOT YET WORKING WITH V2):
      discord
    • channelID (Required)

      Description
      -

      The ID of the channel to log teamkills to.

      +

      ID of channel to turn into RCON console.

      Default
    • Example
      667741905228136459
      -
    • color

      +
    • permissions

      Description
      -

      The color of the embeds.

      +

      Default
      -
      16761867
    • -
    • disableSCBL

      +
      {}
    • Example
      +
      {
      +  "123456789123456789": [
      +    "AdminBroadcast",
      +    "AdminForceTeamChange",
      +    "AdminDemoteCommander"
      +  ]
      +}
      +
    • prependAdminNameInBroadcast

      Description
      -

      Disable Squad Community Ban List information.

      +

      Prepend admin names when making announcements.

      Default
      false
    - IntervalledBroadcasts -

    IntervalledBroadcasts

    -

    The IntervalledBroadcasts plugin allows you to set broadcasts, which will be broadcasted at preset intervals

    + TeamRandomizer +

    TeamRandomizer

    +

    The TeamRandomizer can be used to randomize teams. It's great for destroying clan stacks or for social events. It can be run by typing, by default, !randomize into in-game admin chat

    Options

    -
    • broadcasts

      -
      Description
      -

      Messages to broadcast.

      -
      Default
      -
      []
    • Example
      -
      [
      -  "This server is powered by SquadJS."
      -]
      -
    • interval

      +
      • command

        Description
        -

        Frequency of the broadcasts in milliseconds.

        +

        The command used to randomize the teams.

        Default
        -
        300000
      +
      randomize
    @@ -733,55 +782,6 @@ Grafana (NOT YET WORKING WITH V2):
    6
    -
    - SeedingMode -

    SeedingMode

    -

    The SeedingMode plugin broadcasts seeding rule messages to players at regular intervals when the server is below a specified player count. It can also be configured to display "Live" messages when the server goes live.

    -

    Options

    -
    • interval

      -
      Description
      -

      Frequency of seeding messages in milliseconds.

      -
      Default
      -
      150000
    • -
    • seedingThreshold

      -
      Description
      -

      Player count required for server not to be in seeding mode.

      -
      Default
      -
      50
    • -
    • seedingMessage

      -
      Description
      -

      Seeding message to display.

      -
      Default
      -
      Seeding Rules Active! Fight only over the middle flags! No FOB Hunting!
    • -
    • liveEnabled

      -
      Description
      -

      Enable "Live" messages for when the server goes live.

      -
      Default
      -
      true
    • -
    • liveThreshold

      -
      Description
      -

      Player count required for "Live" messages to not bee displayed.

      -
      Default
      -
      52
    • -
    • liveMessage

      -
      Description
      -

      "Live" message to display.

      -
      Default
      -
      Live!
    -
    - -
    - TeamRandomizer -

    TeamRandomizer

    -

    The TeamRandomizer can be used to randomize teams. It's great for destroying clan stacks or for social events. It can be run by typing, by default, !randomize into in-game admin chat

    -

    Options

    -
    • command

      -
      Description
      -

      The command used to randomize the teams.

      -
      Default
      -
      randomize
    -
    -
    ## Statement on Accuracy diff --git a/config.json b/config.json index 66e61653..4f87a314 100644 --- a/config.json +++ b/config.json @@ -33,49 +33,30 @@ }, "plugins": [ { - "plugin": "AutoKickUnassigned", - "enabled": true, - "warningMessage": "Join a squad, you are are unassigned and will be kicked", - "kickMessage": "Unassigned - automatically removed", - "frequencyOfWarnings": 30, - "unassignedTimer": 360, - "playerThreshold": 93, - "roundStartDelay": 900, - "ignoreAdmins": false, - "ignoreWhitelist": false - }, - { - "plugin": "AutoTKWarn", - "enabled": true, - "message": "Please apologise for ALL TKs in ALL chat!" - }, - { - "plugin": "ChatCommands", + "plugin": "DiscordPlaceholder", "enabled": true, - "commands": [ - { - "command": "squadjs", - "type": "warn", - "response": "This server is powered by SquadJS.", - "ignoreChats": [] - } - ] + "discordClient": "discord", + "command": "!placeholder" }, { - "plugin": "DBLog", + "plugin": "DiscordSubsystemRestarter", "enabled": false, - "database": "mysql", - "overrideServerID": null + "discordClient": "discord", + "role": "" }, { - "plugin": "DiscordAdminBroadcast", - "enabled": false, + "plugin": "DiscordChat", + "enabled": true, "discordClient": "discord", "channelID": "", - "color": 16761867 + "chatColors": {}, + "color": 16761867, + "ignoreChats": [ + "ChatSquad" + ] }, { - "plugin": "DiscordAdminCamLogs", + "plugin": "DiscordAdminBroadcast", "enabled": false, "discordClient": "discord", "channelID": "", @@ -94,15 +75,24 @@ "color": 16761867 }, { - "plugin": "DiscordChat", - "enabled": true, + "plugin": "DiscordServerStatus", + "enabled": false, "discordClient": "discord", - "channelID": "", - "chatColors": {}, - "color": 16761867, - "ignoreChats": [ - "ChatSquad" - ] + "messageIDs": [], + "updateInterval": 60000, + "disableStatus": false + }, + { + "plugin": "AutoKickUnassigned", + "enabled": true, + "warningMessage": "Join a squad, you are are unassigned and will be kicked", + "kickMessage": "Unassigned - automatically removed", + "frequencyOfWarnings": 30, + "unassignedTimer": 360, + "playerThreshold": 93, + "roundStartDelay": 900, + "ignoreAdmins": false, + "ignoreWhitelist": false }, { "plugin": "DiscordDebug", @@ -112,75 +102,85 @@ "events": [] }, { - "plugin": "DiscordPlaceholder", + "plugin": "IntervalledBroadcasts", "enabled": false, - "discordClient": "discord", - "command": "!placeholder" + "broadcasts": [], + "interval": 300000 }, { - "plugin": "DiscordRcon", - "enabled": false, + "plugin": "DiscordTeamkill", + "enabled": true, "discordClient": "discord", "channelID": "", - "permissions": {}, - "prependAdminNameInBroadcast": false + "color": 16761867, + "disableSCBL": false }, { - "plugin": "DiscordRoundWinner", + "plugin": "SeedingMode", "enabled": true, - "discordClient": "discord", - "channelID": "", - "color": 16761867 + "interval": 150000, + "seedingThreshold": 50, + "seedingMessage": "Seeding Rules Active! Fight only over the middle flags! No FOB Hunting!", + "liveEnabled": true, + "liveThreshold": 52, + "liveMessage": "Live!" }, { - "plugin": "DiscordServerStatus", - "enabled": false, - "discordClient": "discord", - "messageIDs": [], - "updateInterval": 60000, - "disableStatus": false + "plugin": "AutoTKWarn", + "enabled": true, + "message": "Please apologise for ALL TKs in ALL chat!" }, { - "plugin": "DiscordSubsystemRestarter", + "plugin": "DBLog", "enabled": false, - "discordClient": "discord", - "role": "" + "database": "mysql", + "overrideServerID": null }, { - "plugin": "DiscordTeamkill", + "plugin": "DiscordRoundWinner", "enabled": true, "discordClient": "discord", "channelID": "", - "color": 16761867, - "disableSCBL": false + "color": 16761867 }, { - "plugin": "IntervalledBroadcasts", - "enabled": false, - "broadcasts": [], - "interval": 300000 + "plugin": "ChatCommands", + "enabled": true, + "commands": [ + { + "command": "squadjs", + "type": "warn", + "response": "This server is powered by SquadJS.", + "ignoreChats": [] + } + ] }, { - "plugin": "SCBLInfo", - "enabled": true, + "plugin": "DiscordAdminCamLogs", + "enabled": false, "discordClient": "discord", "channelID": "", - "threshold": 6 + "color": 16761867 }, { - "plugin": "SeedingMode", - "enabled": true, - "interval": 150000, - "seedingThreshold": 50, - "seedingMessage": "Seeding Rules Active! Fight only over the middle flags! No FOB Hunting!", - "liveEnabled": true, - "liveThreshold": 52, - "liveMessage": "Live!" + "plugin": "DiscordRcon", + "enabled": false, + "discordClient": "discord", + "channelID": "", + "permissions": {}, + "prependAdminNameInBroadcast": false }, { "plugin": "TeamRandomizer", "enabled": true, "command": "randomize" + }, + { + "plugin": "SCBLInfo", + "enabled": true, + "discordClient": "discord", + "channelID": "", + "threshold": 6 } ], "logger": { From a16edebdf2773822090df52c19fa89daf6bbb126 Mon Sep 17 00:00:00 2001 From: Thomas Smyth Date: Sun, 28 Feb 2021 01:09:51 +0000 Subject: [PATCH 08/11] Update credits --- README.md | 8 ++++---- config.json | 2 +- squad-server/templates/readme-template.md | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index e1dd0ba0..3c02f842 100644 --- a/README.md +++ b/README.md @@ -795,11 +795,11 @@ Below is a list of scenarios we know may cause some information to be inaccurate * Duplicated Player Names - If two or more players have the same name or suffix name (see above) then SquadJS will be unable to identify them in the logs. When this occurs event logs will show the player as `null`. Be on the watch for groups of players who try to abuse this in order to TK or complete other malicious actions without being detected by SquadJS plugins. ## Credits -SquadJS would not be possible without the support of so many individuals and organisations. My thanks goes out to: - * [SquadJS's contributors](https://github.com/Thomas-Smyth/SquadJS/graphs/contributors). - * [My GitHub sponsors](https://github.com/sponsors/Thomas-Smyth)! +SquadJS would not be possible without the support of so many individuals and organisations. Our thanks goes out to: + * [SquadJS's contributors](https://github.com/Thomas-Smyth/SquadJS/graphs/contributors) + * [Thomas Smyth's GitHub sponsors](https://github.com/sponsors/Thomas-Smyth) * subtlerod for proposing the initial log parsing idea, helping to design the log parsing process and for providing multiple servers to test with. - * Fourleaf, Mex and various other members of ToG / ToG-L for helping to stage logs and participate in small scale tests. + * Fourleaf, Mex, various members of ToG / ToG-L and others that helped to stage logs and participate in small scale tests. * Various Squad servers/communities for participating in larger scale tests and for providing feedback on plugins. * Everyone in the Squad RCON Discord and others who have submitted bug reports, suggestions, feedback and provided logs. diff --git a/config.json b/config.json index 66e61653..900aca22 100644 --- a/config.json +++ b/config.json @@ -113,7 +113,7 @@ }, { "plugin": "DiscordPlaceholder", - "enabled": false, + "enabled": true, "discordClient": "discord", "command": "!placeholder" }, diff --git a/squad-server/templates/readme-template.md b/squad-server/templates/readme-template.md index c7b80512..ddc13a9c 100644 --- a/squad-server/templates/readme-template.md +++ b/squad-server/templates/readme-template.md @@ -282,11 +282,11 @@ Below is a list of scenarios we know may cause some information to be inaccurate * Duplicated Player Names - If two or more players have the same name or suffix name (see above) then SquadJS will be unable to identify them in the logs. When this occurs event logs will show the player as `null`. Be on the watch for groups of players who try to abuse this in order to TK or complete other malicious actions without being detected by SquadJS plugins. ## Credits -SquadJS would not be possible without the support of so many individuals and organisations. My thanks goes out to: - * [SquadJS's contributors](https://github.com/Thomas-Smyth/SquadJS/graphs/contributors). - * [My GitHub sponsors](https://github.com/sponsors/Thomas-Smyth)! +SquadJS would not be possible without the support of so many individuals and organisations. Our thanks goes out to: + * [SquadJS's contributors](https://github.com/Thomas-Smyth/SquadJS/graphs/contributors) + * [Thomas Smyth's GitHub sponsors](https://github.com/sponsors/Thomas-Smyth) * subtlerod for proposing the initial log parsing idea, helping to design the log parsing process and for providing multiple servers to test with. - * Fourleaf, Mex and various other members of ToG / ToG-L for helping to stage logs and participate in small scale tests. + * Fourleaf, Mex, various members of ToG / ToG-L and others that helped to stage logs and participate in small scale tests. * Various Squad servers/communities for participating in larger scale tests and for providing feedback on plugins. * Everyone in the Squad RCON Discord and others who have submitted bug reports, suggestions, feedback and provided logs. From 5ba0b06cdcade60e0aa5063ee95b5c9644ef5330 Mon Sep 17 00:00:00 2001 From: Thomas Smyth Date: Sun, 28 Feb 2021 01:10:37 +0000 Subject: [PATCH 09/11] Build readme --- README.md | 484 +++++++++++++++++++++++++++--------------------------- 1 file changed, 242 insertions(+), 242 deletions(-) diff --git a/README.md b/README.md index 5a46f9fc..3c02f842 100644 --- a/README.md +++ b/README.md @@ -268,44 +268,111 @@ The following is a list of plugins built into SquadJS, you can click their title Interested in creating your own plugin? [See more here](./squad-server/plugins/readme.md)
    - DiscordPlaceholder -

    DiscordPlaceholder

    -

    The DiscordPlaceholder plugin allows you to make your bot create placeholder messages that can be used when configuring other plugins.

    + AutoKickUnassigned +

    AutoKickUnassigned

    +

    The AutoKickUnassigned plugin will automatically kick players that are not in a squad after a specified ammount of time.

    Options

    -
    • discordClient (Required)

      +
      • warningMessage

        Description
        -

        Discord connector name.

        +

        Message SquadJS will send to players warning them they will be kicked

        Default
        -
        discord
      • -
      • command

        +
        Join a squad, you are are unassigned and will be kicked
      • +
      • kickMessage

        Description
        -

        Command to create Discord placeholder.

        +

        Message to send to players when they are kicked

        Default
        -
        !placeholder
      +
      Unassigned - automatically removed
    • +
    • frequencyOfWarnings

      +
      Description
      +

      How often in Seconds should we warn the player about being unassigned?

      +
      Default
      +
      30
    • +
    • unassignedTimer

      +
      Description
      +

      How long in Seconds to wait before a unassigned player is kicked

      +
      Default
      +
      360
    • +
    • playerThreshold

      +
      Description
      +

      Player count required for AutoKick to start kicking players, set to -1 to disable

      +
      Default
      +
      93
    • +
    • roundStartDelay

      +
      Description
      +

      Time delay in Seconds from start of the round before AutoKick starts kicking again

      +
      Default
      +
      900
    • +
    • ignoreAdmins

      +
      Description
      +

      • true: Admins will NOT be kicked
      • false: Admins WILL be kicked

      +
      Default
      +
      false
    • +
    • ignoreWhitelist

      +
      Description
      +

      • true: Reserve slot players will NOT be kicked
      • false: Reserve slot players WILL be kicked

      +
      Default
      +
      false
    - DiscordSubsystemRestarter -

    DiscordSubsystemRestarter

    -

    The DiscordSubSystemRestarter plugin allows you to manually restart SquadJS subsystems in case an issues arises with them.

    • !squadjs restartsubsystem rcon
    • !squadjs restartsubsystem logparser

    + AutoTKWarn +

    AutoTKWarn

    +

    The AutoTkWarn plugin will automatically warn players with a message when they teamkill.

    Options

    -
    • discordClient (Required)

      +
      • message

        Description
        -

        Discord connector name.

        +

        The message to warn players with.

        Default
        -
        discord
      • -
      • role (Required)

        +
        Please apologise for ALL TKs in ALL chat!
      +
    + +
    + ChatCommands +

    ChatCommands

    +

    The ChatCommands plugin can be configured to make chat commands that broadcast or warn the caller with present messages.

    +

    Options

    +
    • commands

      Description
      -

      ID of role required to run the sub system restart commands.

      +

      An array of objects containing the following properties:

      • command - The command that initiates the message.
      • type - Either warn or broadcast.
      • response - The message to respond with.
      • ignoreChats - A list of chats to ignore the commands in. Use this to limit it to admins.

      Default
      -
    • Example
      -
      667741905228136459
    +
    [
    +  {
    +    "command": "squadjs",
    +    "type": "warn",
    +    "response": "This server is powered by SquadJS.",
    +    "ignoreChats": []
    +  }
    +]
    - DiscordChat -

    DiscordChat

    -

    The DiscordChat plugin will log in-game chat to a Discord channel.

    + DBLog +

    DBLog

    +

    The mysql-log plugin will log various server statistics and events to a database. This is great for server performance monitoring and/or player stat tracking. + +Grafana (NOT YET WORKING WITH V2): +

    • Grafana is a cool way of viewing server statistics stored in the database.
    • +
    • Install Grafana.
    • +
    • Add your database as a datasource named SquadJS.
    • +
    • Import the SquadJS Dashboard to get a preconfigured MySQL only Grafana dashboard.
    • +
    • Install any missing Grafana plugins.

    +

    Options

    +
    • database (Required)

      +
      Description
      +

      The Sequelize connector to log server information to.

      +
      Default
      +
      mysql
    • +
    • overrideServerID

      +
      Description
      +

      A overridden server ID.

      +
      Default
      +
      null
    +
    + +
    + DiscordAdminBroadcast +

    DiscordAdminBroadcast

    +

    The DiscordAdminBroadcast plugin will send a copy of admin broadcasts made in game to a Discord channel.

    Options

    • discordClient (Required)

      Description
      @@ -318,32 +385,17 @@ Interested in creating your own plugin? [See more here](./squad-server/plugins/r
      Default
    • Example
      667741905228136459
      -
    • chatColors

      -
      Description
      -

      The color of the embed for each chat.

      -
      Default
      -
      {}
    • Example
      -
      {
      -  "ChatAll": 16761867
      -}
    • color

      Description

      The color of the embed.

      Default
      -
      16761867
    • -
    • ignoreChats

      -
      Description
      -

      A list of chat names to ignore.

      -
      Default
      -
      [
      -  "ChatSquad"
      -]
    +
    16761867
    - DiscordAdminBroadcast -

    DiscordAdminBroadcast

    -

    The DiscordAdminBroadcast plugin will send a copy of admin broadcasts made in game to a Discord channel.

    + DiscordAdminCamLogs +

    DiscordAdminCamLogs

    +

    The DiscordAdminCamLogs plugin will log in game admin camera usage to a Discord channel.

    Options

    • discordClient (Required)

      Description
      @@ -352,7 +404,7 @@ Interested in creating your own plugin? [See more here](./squad-server/plugins/r
      discord
    • channelID (Required)

      Description
      -

      The ID of the channel to log admin broadcasts to.

      +

      The ID of the channel to log admin camera usage to.

      Default
    • Example
      667741905228136459
      @@ -421,83 +473,41 @@ Interested in creating your own plugin? [See more here](./squad-server/plugins/r
    - DiscordServerStatus -

    DiscordServerStatus

    -

    The DiscordServerStatus plugin updates a message in Discord with current server information, e.g. player count.

    + DiscordChat +

    DiscordChat

    +

    The DiscordChat plugin will log in-game chat to a Discord channel.

    Options

    • discordClient (Required)

      Description

      Discord connector name.

      Default
      discord
    • -
    • messageIDs (Required)

      -
      Description
      -

      ID of messages to update.

      -
      Default
      -
      []
    • Example
      -
      [
      -  {
      -    "channelID": "667741905228136459",
      -    "messageID": "766688383043895387"
      -  }
      -]
      -
    • updateInterval

      -
      Description
      -

      How frequently to update the status in Discord.

      -
      Default
      -
      60000
    • -
    • disableStatus

      -
      Description
      -

      Disable the bot status.

      -
      Default
      -
      false
    -
    - -
    - AutoKickUnassigned -

    AutoKickUnassigned

    -

    The AutoKickUnassigned plugin will automatically kick players that are not in a squad after a specified ammount of time.

    -

    Options

    -
    • warningMessage

      -
      Description
      -

      Message SquadJS will send to players warning them they will be kicked

      -
      Default
      -
      Join a squad, you are are unassigned and will be kicked
    • -
    • kickMessage

      -
      Description
      -

      Message to send to players when they are kicked

      -
      Default
      -
      Unassigned - automatically removed
    • -
    • frequencyOfWarnings

      -
      Description
      -

      How often in Seconds should we warn the player about being unassigned?

      -
      Default
      -
      30
    • -
    • unassignedTimer

      -
      Description
      -

      How long in Seconds to wait before a unassigned player is kicked

      -
      Default
      -
      360
    • -
    • playerThreshold

      +
    • channelID (Required)

      Description
      -

      Player count required for AutoKick to start kicking players, set to -1 to disable

      +

      The ID of the channel to log admin broadcasts to.

      Default
      -
      93
    • -
    • roundStartDelay

      +
    • Example
      +
      667741905228136459
      +
    • chatColors

      Description
      -

      Time delay in Seconds from start of the round before AutoKick starts kicking again

      +

      The color of the embed for each chat.

      Default
      -
      900
    • -
    • ignoreAdmins

      +
      {}
    • Example
      +
      {
      +  "ChatAll": 16761867
      +}
      +
    • color

      Description
      -

      • true: Admins will NOT be kicked
      • false: Admins WILL be kicked

      +

      The color of the embed.

      Default
      -
      false
    • -
    • ignoreWhitelist

      +
      16761867
    • +
    • ignoreChats

      Description
      -

      • true: Reserve slot players will NOT be kicked
      • false: Reserve slot players WILL be kicked

      +

      A list of chat names to ignore.

      Default
      -
      false
    +
    [
    +  "ChatSquad"
    +]
    @@ -527,29 +537,26 @@ Interested in creating your own plugin? [See more here](./squad-server/plugins/r
    - IntervalledBroadcasts -

    IntervalledBroadcasts

    -

    The IntervalledBroadcasts plugin allows you to set broadcasts, which will be broadcasted at preset intervals

    + DiscordPlaceholder +

    DiscordPlaceholder

    +

    The DiscordPlaceholder plugin allows you to make your bot create placeholder messages that can be used when configuring other plugins.

    Options

    -
    • broadcasts

      +
      • discordClient (Required)

        Description
        -

        Messages to broadcast.

        +

        Discord connector name.

        Default
        -
        []
      • Example
        -
        [
        -  "This server is powered by SquadJS."
        -]
        -
      • interval

        +
        discord
      • +
      • command

        Description
        -

        Frequency of the broadcasts in milliseconds.

        +

        Command to create Discord placeholder.

        Default
        -
        300000
      +
      !placeholder
    - DiscordTeamkill -

    DiscordTeamkill

    -

    The DiscordTeamkill plugin logs teamkills and related information to a Discord channel for admins to review.

    + DiscordRcon +

    DiscordRcon

    +

    The DiscordRcon plugin allows a specified Discord channel to be used as a RCON console to run RCON commands.

    Options

    • discordClient (Required)

      Description
      @@ -558,95 +565,29 @@ Interested in creating your own plugin? [See more here](./squad-server/plugins/r
      discord
    • channelID (Required)

      Description
      -

      The ID of the channel to log teamkills to.

      +

      ID of channel to turn into RCON console.

      Default
    • Example
      667741905228136459
      -
    • color

      +
    • permissions

      Description
      -

      The color of the embeds.

      +

      Default
      -
      16761867
    • -
    • disableSCBL

      +
      {}
    • Example
      +
      {
      +  "123456789123456789": [
      +    "AdminBroadcast",
      +    "AdminForceTeamChange",
      +    "AdminDemoteCommander"
      +  ]
      +}
      +
    • prependAdminNameInBroadcast

      Description
      -

      Disable Squad Community Ban List information.

      +

      Prepend admin names when making announcements.

      Default
      false
    -
    - SeedingMode -

    SeedingMode

    -

    The SeedingMode plugin broadcasts seeding rule messages to players at regular intervals when the server is below a specified player count. It can also be configured to display "Live" messages when the server goes live.

    -

    Options

    -
    • interval

      -
      Description
      -

      Frequency of seeding messages in milliseconds.

      -
      Default
      -
      150000
    • -
    • seedingThreshold

      -
      Description
      -

      Player count required for server not to be in seeding mode.

      -
      Default
      -
      50
    • -
    • seedingMessage

      -
      Description
      -

      Seeding message to display.

      -
      Default
      -
      Seeding Rules Active! Fight only over the middle flags! No FOB Hunting!
    • -
    • liveEnabled

      -
      Description
      -

      Enable "Live" messages for when the server goes live.

      -
      Default
      -
      true
    • -
    • liveThreshold

      -
      Description
      -

      Player count required for "Live" messages to not bee displayed.

      -
      Default
      -
      52
    • -
    • liveMessage

      -
      Description
      -

      "Live" message to display.

      -
      Default
      -
      Live!
    -
    - -
    - AutoTKWarn -

    AutoTKWarn

    -

    The AutoTkWarn plugin will automatically warn players with a message when they teamkill.

    -

    Options

    -
    • message

      -
      Description
      -

      The message to warn players with.

      -
      Default
      -
      Please apologise for ALL TKs in ALL chat!
    -
    - -
    - DBLog -

    DBLog

    -

    The mysql-log plugin will log various server statistics and events to a database. This is great for server performance monitoring and/or player stat tracking. - -Grafana (NOT YET WORKING WITH V2): -

    • Grafana is a cool way of viewing server statistics stored in the database.
    • -
    • Install Grafana.
    • -
    • Add your database as a datasource named SquadJS.
    • -
    • Import the SquadJS Dashboard to get a preconfigured MySQL only Grafana dashboard.
    • -
    • Install any missing Grafana plugins.

    -

    Options

    -
    • database (Required)

      -
      Description
      -

      The Sequelize connector to log server information to.

      -
      Default
      -
      mysql
    • -
    • overrideServerID

      -
      Description
      -

      A overridden server ID.

      -
      Default
      -
      null
    -
    -
    DiscordRoundWinner

    DiscordRoundWinner

    @@ -671,51 +612,60 @@ Grafana (NOT YET WORKING WITH V2):
    - ChatCommands -

    ChatCommands

    -

    The ChatCommands plugin can be configured to make chat commands that broadcast or warn the caller with present messages.

    + DiscordServerStatus +

    DiscordServerStatus

    +

    The DiscordServerStatus plugin updates a message in Discord with current server information, e.g. player count.

    Options

    -
    • commands

      +
      • discordClient (Required)

        Description
        -

        An array of objects containing the following properties:

        • command - The command that initiates the message.
        • type - Either warn or broadcast.
        • response - The message to respond with.
        • ignoreChats - A list of chats to ignore the commands in. Use this to limit it to admins.

        +

        Discord connector name.

        +
        Default
        +
        discord
      • +
      • messageIDs (Required)

        +
        Description
        +

        ID of messages to update.

        Default
        +
        []
      • Example
        [
           {
        -    "command": "squadjs",
        -    "type": "warn",
        -    "response": "This server is powered by SquadJS.",
        -    "ignoreChats": []
        +    "channelID": "667741905228136459",
        +    "messageID": "766688383043895387"
           }
        -]
      +] +
    • updateInterval

      +
      Description
      +

      How frequently to update the status in Discord.

      +
      Default
      +
      60000
    • +
    • disableStatus

      +
      Description
      +

      Disable the bot status.

      +
      Default
      +
      false
    - DiscordAdminCamLogs -

    DiscordAdminCamLogs

    -

    The DiscordAdminCamLogs plugin will log in game admin camera usage to a Discord channel.

    + DiscordSubsystemRestarter +

    DiscordSubsystemRestarter

    +

    The DiscordSubSystemRestarter plugin allows you to manually restart SquadJS subsystems in case an issues arises with them.

    • !squadjs restartsubsystem rcon
    • !squadjs restartsubsystem logparser

    Options

    • discordClient (Required)

      Description

      Discord connector name.

      Default
      discord
    • -
    • channelID (Required)

      +
    • role (Required)

      Description
      -

      The ID of the channel to log admin camera usage to.

      +

      ID of role required to run the sub system restart commands.

      Default
    • Example
      -
      667741905228136459
      -
    • color

      -
      Description
      -

      The color of the embed.

      -
      Default
      -
      16761867
    +
    667741905228136459
    - DiscordRcon -

    DiscordRcon

    -

    The DiscordRcon plugin allows a specified Discord channel to be used as a RCON console to run RCON commands.

    + DiscordTeamkill +

    DiscordTeamkill

    +

    The DiscordTeamkill plugin logs teamkills and related information to a Discord channel for admins to review.

    Options

    • discordClient (Required)

      Description
      @@ -724,39 +674,40 @@ Grafana (NOT YET WORKING WITH V2):
      discord
    • channelID (Required)

      Description
      -

      ID of channel to turn into RCON console.

      +

      The ID of the channel to log teamkills to.

      Default
    • Example
      667741905228136459
      -
    • permissions

      +
    • color

      Description
      -

      +

      The color of the embeds.

      Default
      -
      {}
    • Example
      -
      {
      -  "123456789123456789": [
      -    "AdminBroadcast",
      -    "AdminForceTeamChange",
      -    "AdminDemoteCommander"
      -  ]
      -}
      -
    • prependAdminNameInBroadcast

      +
      16761867
    • +
    • disableSCBL

      Description
      -

      Prepend admin names when making announcements.

      +

      Disable Squad Community Ban List information.

      Default
      false
    - TeamRandomizer -

    TeamRandomizer

    -

    The TeamRandomizer can be used to randomize teams. It's great for destroying clan stacks or for social events. It can be run by typing, by default, !randomize into in-game admin chat

    + IntervalledBroadcasts +

    IntervalledBroadcasts

    +

    The IntervalledBroadcasts plugin allows you to set broadcasts, which will be broadcasted at preset intervals

    Options

    -
    • command

      +
      • broadcasts

        Description
        -

        The command used to randomize the teams.

        +

        Messages to broadcast.

        Default
        -
        randomize
      +
      []
    • Example
      +
      [
      +  "This server is powered by SquadJS."
      +]
      +
    • interval

      +
      Description
      +

      Frequency of the broadcasts in milliseconds.

      +
      Default
      +
      300000
    @@ -782,6 +733,55 @@ Grafana (NOT YET WORKING WITH V2):
    6
    +
    + SeedingMode +

    SeedingMode

    +

    The SeedingMode plugin broadcasts seeding rule messages to players at regular intervals when the server is below a specified player count. It can also be configured to display "Live" messages when the server goes live.

    +

    Options

    +
    • interval

      +
      Description
      +

      Frequency of seeding messages in milliseconds.

      +
      Default
      +
      150000
    • +
    • seedingThreshold

      +
      Description
      +

      Player count required for server not to be in seeding mode.

      +
      Default
      +
      50
    • +
    • seedingMessage

      +
      Description
      +

      Seeding message to display.

      +
      Default
      +
      Seeding Rules Active! Fight only over the middle flags! No FOB Hunting!
    • +
    • liveEnabled

      +
      Description
      +

      Enable "Live" messages for when the server goes live.

      +
      Default
      +
      true
    • +
    • liveThreshold

      +
      Description
      +

      Player count required for "Live" messages to not bee displayed.

      +
      Default
      +
      52
    • +
    • liveMessage

      +
      Description
      +

      "Live" message to display.

      +
      Default
      +
      Live!
    +
    + +
    + TeamRandomizer +

    TeamRandomizer

    +

    The TeamRandomizer can be used to randomize teams. It's great for destroying clan stacks or for social events. It can be run by typing, by default, !randomize into in-game admin chat

    +

    Options

    +
    • command

      +
      Description
      +

      The command used to randomize the teams.

      +
      Default
      +
      randomize
    +
    +
    ## Statement on Accuracy From 2705edea580e8f974e14c8f480b54bb0e79a6079 Mon Sep 17 00:00:00 2001 From: Thomas Smyth Date: Sun, 28 Feb 2021 01:11:01 +0000 Subject: [PATCH 10/11] SquadJS v2.0.4 Release --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a41089e6..41ab2284 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "SquadJS", - "version": "2.0.4-beta1", + "version": "2.0.4", "repository": "https://github.com/Thomas-Smyth/SquadJS.git", "author": "Thomas Smyth ", "license": "BSL-1.0", From a60392a67581e71ec9964572fdd3500d35acf864 Mon Sep 17 00:00:00 2001 From: Thomas Smyth Date: Sun, 28 Feb 2021 01:11:45 +0000 Subject: [PATCH 11/11] ESLint & README Generation --- README.md | 484 ++++++++++++++++++++++++++-------------------------- config.json | 158 ++++++++--------- 2 files changed, 321 insertions(+), 321 deletions(-) diff --git a/README.md b/README.md index 3c02f842..5a46f9fc 100644 --- a/README.md +++ b/README.md @@ -268,111 +268,44 @@ The following is a list of plugins built into SquadJS, you can click their title Interested in creating your own plugin? [See more here](./squad-server/plugins/readme.md)
    - AutoKickUnassigned -

    AutoKickUnassigned

    -

    The AutoKickUnassigned plugin will automatically kick players that are not in a squad after a specified ammount of time.

    -

    Options

    -
    • warningMessage

      -
      Description
      -

      Message SquadJS will send to players warning them they will be kicked

      -
      Default
      -
      Join a squad, you are are unassigned and will be kicked
    • -
    • kickMessage

      -
      Description
      -

      Message to send to players when they are kicked

      -
      Default
      -
      Unassigned - automatically removed
    • -
    • frequencyOfWarnings

      -
      Description
      -

      How often in Seconds should we warn the player about being unassigned?

      -
      Default
      -
      30
    • -
    • unassignedTimer

      -
      Description
      -

      How long in Seconds to wait before a unassigned player is kicked

      -
      Default
      -
      360
    • -
    • playerThreshold

      -
      Description
      -

      Player count required for AutoKick to start kicking players, set to -1 to disable

      -
      Default
      -
      93
    • -
    • roundStartDelay

      -
      Description
      -

      Time delay in Seconds from start of the round before AutoKick starts kicking again

      -
      Default
      -
      900
    • -
    • ignoreAdmins

      -
      Description
      -

      • true: Admins will NOT be kicked
      • false: Admins WILL be kicked

      -
      Default
      -
      false
    • -
    • ignoreWhitelist

      -
      Description
      -

      • true: Reserve slot players will NOT be kicked
      • false: Reserve slot players WILL be kicked

      -
      Default
      -
      false
    -
    - -
    - AutoTKWarn -

    AutoTKWarn

    -

    The AutoTkWarn plugin will automatically warn players with a message when they teamkill.

    + DiscordPlaceholder +

    DiscordPlaceholder

    +

    The DiscordPlaceholder plugin allows you to make your bot create placeholder messages that can be used when configuring other plugins.

    Options

    -
    • message

      +
      • discordClient (Required)

        Description
        -

        The message to warn players with.

        +

        Discord connector name.

        Default
        -
        Please apologise for ALL TKs in ALL chat!
      -
    - -
    - ChatCommands -

    ChatCommands

    -

    The ChatCommands plugin can be configured to make chat commands that broadcast or warn the caller with present messages.

    -

    Options

    -
    • commands

      +
      discord
    • +
    • command

      Description
      -

      An array of objects containing the following properties:

      • command - The command that initiates the message.
      • type - Either warn or broadcast.
      • response - The message to respond with.
      • ignoreChats - A list of chats to ignore the commands in. Use this to limit it to admins.

      +

      Command to create Discord placeholder.

      Default
      -
      [
      -  {
      -    "command": "squadjs",
      -    "type": "warn",
      -    "response": "This server is powered by SquadJS.",
      -    "ignoreChats": []
      -  }
      -]
    +
    !placeholder
    - DBLog -

    DBLog

    -

    The mysql-log plugin will log various server statistics and events to a database. This is great for server performance monitoring and/or player stat tracking. - -Grafana (NOT YET WORKING WITH V2): -

    • Grafana is a cool way of viewing server statistics stored in the database.
    • -
    • Install Grafana.
    • -
    • Add your database as a datasource named SquadJS.
    • -
    • Import the SquadJS Dashboard to get a preconfigured MySQL only Grafana dashboard.
    • -
    • Install any missing Grafana plugins.

    + DiscordSubsystemRestarter +

    DiscordSubsystemRestarter

    +

    The DiscordSubSystemRestarter plugin allows you to manually restart SquadJS subsystems in case an issues arises with them.

    • !squadjs restartsubsystem rcon
    • !squadjs restartsubsystem logparser

    Options

    -
    • database (Required)

      +
      • discordClient (Required)

        Description
        -

        The Sequelize connector to log server information to.

        +

        Discord connector name.

        Default
        -
        mysql
      • -
      • overrideServerID

        +
        discord
      • +
      • role (Required)

        Description
        -

        A overridden server ID.

        +

        ID of role required to run the sub system restart commands.

        Default
        -
        null
      +
    • Example
      +
      667741905228136459
    - DiscordAdminBroadcast -

    DiscordAdminBroadcast

    -

    The DiscordAdminBroadcast plugin will send a copy of admin broadcasts made in game to a Discord channel.

    + DiscordChat +

    DiscordChat

    +

    The DiscordChat plugin will log in-game chat to a Discord channel.

    Options

    • discordClient (Required)

      Description
      @@ -385,17 +318,32 @@ Grafana (NOT YET WORKING WITH V2):
      Default
    • Example
      667741905228136459
      +
    • chatColors

      +
      Description
      +

      The color of the embed for each chat.

      +
      Default
      +
      {}
    • Example
      +
      {
      +  "ChatAll": 16761867
      +}
    • color

      Description

      The color of the embed.

      Default
      -
      16761867
    +
    16761867
    +
  • ignoreChats

    +
    Description
    +

    A list of chat names to ignore.

    +
    Default
    +
    [
    +  "ChatSquad"
    +]
  • - DiscordAdminCamLogs -

    DiscordAdminCamLogs

    -

    The DiscordAdminCamLogs plugin will log in game admin camera usage to a Discord channel.

    + DiscordAdminBroadcast +

    DiscordAdminBroadcast

    +

    The DiscordAdminBroadcast plugin will send a copy of admin broadcasts made in game to a Discord channel.

    Options

    • discordClient (Required)

      Description
      @@ -404,7 +352,7 @@ Grafana (NOT YET WORKING WITH V2):
      discord
    • channelID (Required)

      Description
      -

      The ID of the channel to log admin camera usage to.

      +

      The ID of the channel to log admin broadcasts to.

      Default
    • Example
      667741905228136459
      @@ -473,41 +421,83 @@ Grafana (NOT YET WORKING WITH V2):
    - DiscordChat -

    DiscordChat

    -

    The DiscordChat plugin will log in-game chat to a Discord channel.

    + DiscordServerStatus +

    DiscordServerStatus

    +

    The DiscordServerStatus plugin updates a message in Discord with current server information, e.g. player count.

    Options

    • discordClient (Required)

      Description

      Discord connector name.

      Default
      discord
    • -
    • channelID (Required)

      +
    • messageIDs (Required)

      Description
      -

      The ID of the channel to log admin broadcasts to.

      +

      ID of messages to update.

      Default
      -
    • Example
      -
      667741905228136459
      -
    • chatColors

      +
      []
    • Example
      +
      [
      +  {
      +    "channelID": "667741905228136459",
      +    "messageID": "766688383043895387"
      +  }
      +]
      +
    • updateInterval

      Description
      -

      The color of the embed for each chat.

      +

      How frequently to update the status in Discord.

      Default
      -
      {}
    • Example
      -
      {
      -  "ChatAll": 16761867
      -}
      -
    • color

      +
      60000
    • +
    • disableStatus

      Description
      -

      The color of the embed.

      +

      Disable the bot status.

      Default
      -
      16761867
    • -
    • ignoreChats

      +
      false
    +
    + +
    + AutoKickUnassigned +

    AutoKickUnassigned

    +

    The AutoKickUnassigned plugin will automatically kick players that are not in a squad after a specified ammount of time.

    +

    Options

    +
    • warningMessage

      Description
      -

      A list of chat names to ignore.

      +

      Message SquadJS will send to players warning them they will be kicked

      Default
      -
      [
      -  "ChatSquad"
      -]
    +
    Join a squad, you are are unassigned and will be kicked
    +
  • kickMessage

    +
    Description
    +

    Message to send to players when they are kicked

    +
    Default
    +
    Unassigned - automatically removed
  • +
  • frequencyOfWarnings

    +
    Description
    +

    How often in Seconds should we warn the player about being unassigned?

    +
    Default
    +
    30
  • +
  • unassignedTimer

    +
    Description
    +

    How long in Seconds to wait before a unassigned player is kicked

    +
    Default
    +
    360
  • +
  • playerThreshold

    +
    Description
    +

    Player count required for AutoKick to start kicking players, set to -1 to disable

    +
    Default
    +
    93
  • +
  • roundStartDelay

    +
    Description
    +

    Time delay in Seconds from start of the round before AutoKick starts kicking again

    +
    Default
    +
    900
  • +
  • ignoreAdmins

    +
    Description
    +

    • true: Admins will NOT be kicked
    • false: Admins WILL be kicked

    +
    Default
    +
    false
  • +
  • ignoreWhitelist

    +
    Description
    +

    • true: Reserve slot players will NOT be kicked
    • false: Reserve slot players WILL be kicked

    +
    Default
    +
    false
  • @@ -537,26 +527,29 @@ Grafana (NOT YET WORKING WITH V2):
    - DiscordPlaceholder -

    DiscordPlaceholder

    -

    The DiscordPlaceholder plugin allows you to make your bot create placeholder messages that can be used when configuring other plugins.

    + IntervalledBroadcasts +

    IntervalledBroadcasts

    +

    The IntervalledBroadcasts plugin allows you to set broadcasts, which will be broadcasted at preset intervals

    Options

    -
    • discordClient (Required)

      +
      • broadcasts

        Description
        -

        Discord connector name.

        +

        Messages to broadcast.

        Default
        -
        discord
      • -
      • command

        +
        []
      • Example
        +
        [
        +  "This server is powered by SquadJS."
        +]
        +
      • interval

        Description
        -

        Command to create Discord placeholder.

        +

        Frequency of the broadcasts in milliseconds.

        Default
        -
        !placeholder
      +
      300000
    - DiscordRcon -

    DiscordRcon

    -

    The DiscordRcon plugin allows a specified Discord channel to be used as a RCON console to run RCON commands.

    + DiscordTeamkill +

    DiscordTeamkill

    +

    The DiscordTeamkill plugin logs teamkills and related information to a Discord channel for admins to review.

    Options

    • discordClient (Required)

      Description
      @@ -565,29 +558,95 @@ Grafana (NOT YET WORKING WITH V2):
      discord
    • channelID (Required)

      Description
      -

      ID of channel to turn into RCON console.

      +

      The ID of the channel to log teamkills to.

      Default
    • Example
      667741905228136459
      -
    • permissions

      +
    • color

      Description
      -

      +

      The color of the embeds.

      Default
      -
      {}
    • Example
      -
      {
      -  "123456789123456789": [
      -    "AdminBroadcast",
      -    "AdminForceTeamChange",
      -    "AdminDemoteCommander"
      -  ]
      -}
      -
    • prependAdminNameInBroadcast

      +
      16761867
    • +
    • disableSCBL

      Description
      -

      Prepend admin names when making announcements.

      +

      Disable Squad Community Ban List information.

      Default
      false
    +
    + SeedingMode +

    SeedingMode

    +

    The SeedingMode plugin broadcasts seeding rule messages to players at regular intervals when the server is below a specified player count. It can also be configured to display "Live" messages when the server goes live.

    +

    Options

    +
    • interval

      +
      Description
      +

      Frequency of seeding messages in milliseconds.

      +
      Default
      +
      150000
    • +
    • seedingThreshold

      +
      Description
      +

      Player count required for server not to be in seeding mode.

      +
      Default
      +
      50
    • +
    • seedingMessage

      +
      Description
      +

      Seeding message to display.

      +
      Default
      +
      Seeding Rules Active! Fight only over the middle flags! No FOB Hunting!
    • +
    • liveEnabled

      +
      Description
      +

      Enable "Live" messages for when the server goes live.

      +
      Default
      +
      true
    • +
    • liveThreshold

      +
      Description
      +

      Player count required for "Live" messages to not bee displayed.

      +
      Default
      +
      52
    • +
    • liveMessage

      +
      Description
      +

      "Live" message to display.

      +
      Default
      +
      Live!
    +
    + +
    + AutoTKWarn +

    AutoTKWarn

    +

    The AutoTkWarn plugin will automatically warn players with a message when they teamkill.

    +

    Options

    +
    • message

      +
      Description
      +

      The message to warn players with.

      +
      Default
      +
      Please apologise for ALL TKs in ALL chat!
    +
    + +
    + DBLog +

    DBLog

    +

    The mysql-log plugin will log various server statistics and events to a database. This is great for server performance monitoring and/or player stat tracking. + +Grafana (NOT YET WORKING WITH V2): +

    • Grafana is a cool way of viewing server statistics stored in the database.
    • +
    • Install Grafana.
    • +
    • Add your database as a datasource named SquadJS.
    • +
    • Import the SquadJS Dashboard to get a preconfigured MySQL only Grafana dashboard.
    • +
    • Install any missing Grafana plugins.

    +

    Options

    +
    • database (Required)

      +
      Description
      +

      The Sequelize connector to log server information to.

      +
      Default
      +
      mysql
    • +
    • overrideServerID

      +
      Description
      +

      A overridden server ID.

      +
      Default
      +
      null
    +
    +
    DiscordRoundWinner

    DiscordRoundWinner

    @@ -612,60 +671,51 @@ Grafana (NOT YET WORKING WITH V2):
    - DiscordServerStatus -

    DiscordServerStatus

    -

    The DiscordServerStatus plugin updates a message in Discord with current server information, e.g. player count.

    + ChatCommands +

    ChatCommands

    +

    The ChatCommands plugin can be configured to make chat commands that broadcast or warn the caller with present messages.

    Options

    -
    • discordClient (Required)

      -
      Description
      -

      Discord connector name.

      -
      Default
      -
      discord
    • -
    • messageIDs (Required)

      +
      • commands

        Description
        -

        ID of messages to update.

        +

        An array of objects containing the following properties:

        • command - The command that initiates the message.
        • type - Either warn or broadcast.
        • response - The message to respond with.
        • ignoreChats - A list of chats to ignore the commands in. Use this to limit it to admins.

        Default
        -
        []
      • Example
        [
           {
        -    "channelID": "667741905228136459",
        -    "messageID": "766688383043895387"
        +    "command": "squadjs",
        +    "type": "warn",
        +    "response": "This server is powered by SquadJS.",
        +    "ignoreChats": []
           }
        -]
        -
      • updateInterval

        -
        Description
        -

        How frequently to update the status in Discord.

        -
        Default
        -
        60000
      • -
      • disableStatus

        -
        Description
        -

        Disable the bot status.

        -
        Default
        -
        false
      +]
    - DiscordSubsystemRestarter -

    DiscordSubsystemRestarter

    -

    The DiscordSubSystemRestarter plugin allows you to manually restart SquadJS subsystems in case an issues arises with them.

    • !squadjs restartsubsystem rcon
    • !squadjs restartsubsystem logparser

    + DiscordAdminCamLogs +

    DiscordAdminCamLogs

    +

    The DiscordAdminCamLogs plugin will log in game admin camera usage to a Discord channel.

    Options

    • discordClient (Required)

      Description

      Discord connector name.

      Default
      discord
    • -
    • role (Required)

      +
    • channelID (Required)

      Description
      -

      ID of role required to run the sub system restart commands.

      +

      The ID of the channel to log admin camera usage to.

      Default
    • Example
      -
      667741905228136459
    +
    667741905228136459
    +
  • color

    +
    Description
    +

    The color of the embed.

    +
    Default
    +
    16761867
  • - DiscordTeamkill -

    DiscordTeamkill

    -

    The DiscordTeamkill plugin logs teamkills and related information to a Discord channel for admins to review.

    + DiscordRcon +

    DiscordRcon

    +

    The DiscordRcon plugin allows a specified Discord channel to be used as a RCON console to run RCON commands.

    Options

    • discordClient (Required)

      Description
      @@ -674,40 +724,39 @@ Grafana (NOT YET WORKING WITH V2):
      discord
    • channelID (Required)

      Description
      -

      The ID of the channel to log teamkills to.

      +

      ID of channel to turn into RCON console.

      Default
    • Example
      667741905228136459
      -
    • color

      +
    • permissions

      Description
      -

      The color of the embeds.

      +

      Default
      -
      16761867
    • -
    • disableSCBL

      +
      {}
    • Example
      +
      {
      +  "123456789123456789": [
      +    "AdminBroadcast",
      +    "AdminForceTeamChange",
      +    "AdminDemoteCommander"
      +  ]
      +}
      +
    • prependAdminNameInBroadcast

      Description
      -

      Disable Squad Community Ban List information.

      +

      Prepend admin names when making announcements.

      Default
      false
    - IntervalledBroadcasts -

    IntervalledBroadcasts

    -

    The IntervalledBroadcasts plugin allows you to set broadcasts, which will be broadcasted at preset intervals

    + TeamRandomizer +

    TeamRandomizer

    +

    The TeamRandomizer can be used to randomize teams. It's great for destroying clan stacks or for social events. It can be run by typing, by default, !randomize into in-game admin chat

    Options

    -
    • broadcasts

      -
      Description
      -

      Messages to broadcast.

      -
      Default
      -
      []
    • Example
      -
      [
      -  "This server is powered by SquadJS."
      -]
      -
    • interval

      +
      • command

        Description
        -

        Frequency of the broadcasts in milliseconds.

        +

        The command used to randomize the teams.

        Default
        -
        300000
      +
      randomize
    @@ -733,55 +782,6 @@ Grafana (NOT YET WORKING WITH V2):
    6
    -
    - SeedingMode -

    SeedingMode

    -

    The SeedingMode plugin broadcasts seeding rule messages to players at regular intervals when the server is below a specified player count. It can also be configured to display "Live" messages when the server goes live.

    -

    Options

    -
    • interval

      -
      Description
      -

      Frequency of seeding messages in milliseconds.

      -
      Default
      -
      150000
    • -
    • seedingThreshold

      -
      Description
      -

      Player count required for server not to be in seeding mode.

      -
      Default
      -
      50
    • -
    • seedingMessage

      -
      Description
      -

      Seeding message to display.

      -
      Default
      -
      Seeding Rules Active! Fight only over the middle flags! No FOB Hunting!
    • -
    • liveEnabled

      -
      Description
      -

      Enable "Live" messages for when the server goes live.

      -
      Default
      -
      true
    • -
    • liveThreshold

      -
      Description
      -

      Player count required for "Live" messages to not bee displayed.

      -
      Default
      -
      52
    • -
    • liveMessage

      -
      Description
      -

      "Live" message to display.

      -
      Default
      -
      Live!
    -
    - -
    - TeamRandomizer -

    TeamRandomizer

    -

    The TeamRandomizer can be used to randomize teams. It's great for destroying clan stacks or for social events. It can be run by typing, by default, !randomize into in-game admin chat

    -

    Options

    -
    • command

      -
      Description
      -

      The command used to randomize the teams.

      -
      Default
      -
      randomize
    -
    -
    ## Statement on Accuracy diff --git a/config.json b/config.json index 900aca22..4f87a314 100644 --- a/config.json +++ b/config.json @@ -33,49 +33,30 @@ }, "plugins": [ { - "plugin": "AutoKickUnassigned", - "enabled": true, - "warningMessage": "Join a squad, you are are unassigned and will be kicked", - "kickMessage": "Unassigned - automatically removed", - "frequencyOfWarnings": 30, - "unassignedTimer": 360, - "playerThreshold": 93, - "roundStartDelay": 900, - "ignoreAdmins": false, - "ignoreWhitelist": false - }, - { - "plugin": "AutoTKWarn", - "enabled": true, - "message": "Please apologise for ALL TKs in ALL chat!" - }, - { - "plugin": "ChatCommands", + "plugin": "DiscordPlaceholder", "enabled": true, - "commands": [ - { - "command": "squadjs", - "type": "warn", - "response": "This server is powered by SquadJS.", - "ignoreChats": [] - } - ] + "discordClient": "discord", + "command": "!placeholder" }, { - "plugin": "DBLog", + "plugin": "DiscordSubsystemRestarter", "enabled": false, - "database": "mysql", - "overrideServerID": null + "discordClient": "discord", + "role": "" }, { - "plugin": "DiscordAdminBroadcast", - "enabled": false, + "plugin": "DiscordChat", + "enabled": true, "discordClient": "discord", "channelID": "", - "color": 16761867 + "chatColors": {}, + "color": 16761867, + "ignoreChats": [ + "ChatSquad" + ] }, { - "plugin": "DiscordAdminCamLogs", + "plugin": "DiscordAdminBroadcast", "enabled": false, "discordClient": "discord", "channelID": "", @@ -94,15 +75,24 @@ "color": 16761867 }, { - "plugin": "DiscordChat", - "enabled": true, + "plugin": "DiscordServerStatus", + "enabled": false, "discordClient": "discord", - "channelID": "", - "chatColors": {}, - "color": 16761867, - "ignoreChats": [ - "ChatSquad" - ] + "messageIDs": [], + "updateInterval": 60000, + "disableStatus": false + }, + { + "plugin": "AutoKickUnassigned", + "enabled": true, + "warningMessage": "Join a squad, you are are unassigned and will be kicked", + "kickMessage": "Unassigned - automatically removed", + "frequencyOfWarnings": 30, + "unassignedTimer": 360, + "playerThreshold": 93, + "roundStartDelay": 900, + "ignoreAdmins": false, + "ignoreWhitelist": false }, { "plugin": "DiscordDebug", @@ -112,18 +102,39 @@ "events": [] }, { - "plugin": "DiscordPlaceholder", + "plugin": "IntervalledBroadcasts", + "enabled": false, + "broadcasts": [], + "interval": 300000 + }, + { + "plugin": "DiscordTeamkill", "enabled": true, "discordClient": "discord", - "command": "!placeholder" + "channelID": "", + "color": 16761867, + "disableSCBL": false }, { - "plugin": "DiscordRcon", + "plugin": "SeedingMode", + "enabled": true, + "interval": 150000, + "seedingThreshold": 50, + "seedingMessage": "Seeding Rules Active! Fight only over the middle flags! No FOB Hunting!", + "liveEnabled": true, + "liveThreshold": 52, + "liveMessage": "Live!" + }, + { + "plugin": "AutoTKWarn", + "enabled": true, + "message": "Please apologise for ALL TKs in ALL chat!" + }, + { + "plugin": "DBLog", "enabled": false, - "discordClient": "discord", - "channelID": "", - "permissions": {}, - "prependAdminNameInBroadcast": false + "database": "mysql", + "overrideServerID": null }, { "plugin": "DiscordRoundWinner", @@ -133,32 +144,36 @@ "color": 16761867 }, { - "plugin": "DiscordServerStatus", - "enabled": false, - "discordClient": "discord", - "messageIDs": [], - "updateInterval": 60000, - "disableStatus": false + "plugin": "ChatCommands", + "enabled": true, + "commands": [ + { + "command": "squadjs", + "type": "warn", + "response": "This server is powered by SquadJS.", + "ignoreChats": [] + } + ] }, { - "plugin": "DiscordSubsystemRestarter", + "plugin": "DiscordAdminCamLogs", "enabled": false, "discordClient": "discord", - "role": "" + "channelID": "", + "color": 16761867 }, { - "plugin": "DiscordTeamkill", - "enabled": true, + "plugin": "DiscordRcon", + "enabled": false, "discordClient": "discord", "channelID": "", - "color": 16761867, - "disableSCBL": false + "permissions": {}, + "prependAdminNameInBroadcast": false }, { - "plugin": "IntervalledBroadcasts", - "enabled": false, - "broadcasts": [], - "interval": 300000 + "plugin": "TeamRandomizer", + "enabled": true, + "command": "randomize" }, { "plugin": "SCBLInfo", @@ -166,21 +181,6 @@ "discordClient": "discord", "channelID": "", "threshold": 6 - }, - { - "plugin": "SeedingMode", - "enabled": true, - "interval": 150000, - "seedingThreshold": 50, - "seedingMessage": "Seeding Rules Active! Fight only over the middle flags! No FOB Hunting!", - "liveEnabled": true, - "liveThreshold": 52, - "liveMessage": "Live!" - }, - { - "plugin": "TeamRandomizer", - "enabled": true, - "command": "randomize" } ], "logger": {