From 4008075fba23ede647e26b94325183c1634fe185 Mon Sep 17 00:00:00 2001 From: Shanomac99 Date: Fri, 26 Feb 2021 02:17:34 -0500 Subject: [PATCH 01/20] Corrected Squad Wiki Data. - Changed layer classname to use level name - Updated github link to a more permanent folder location. --- squad-server/layers/layer.js | 2 +- squad-server/layers/layers.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/squad-server/layers/layer.js b/squad-server/layers/layer.js index 5ddc713..47c032f 100644 --- a/squad-server/layers/layer.js +++ b/squad-server/layers/layer.js @@ -1,7 +1,7 @@ export default class Layer { constructor(data) { this.name = data.Name; - this.classname = data.rawName; + this.classname = data.levelName; this.map = { name: data.mapName }; diff --git a/squad-server/layers/layers.js b/squad-server/layers/layers.js index d4c76f4..f01c5e2 100644 --- a/squad-server/layers/layers.js +++ b/squad-server/layers/layers.js @@ -22,7 +22,7 @@ class Layers { Logger.verbose('Layers', 1, 'Pulling layers...'); const response = await axios.get( - 'https://raw.githubusercontent.com/Squad-Wiki-Editorial/squad-wiki-pipeline-map-data/dev/completed_output/2.0/finished_2.0.json' + 'https://raw.githubusercontent.com/Squad-Wiki-Editorial/squad-wiki-pipeline-map-data/dev/completed_output/_Current%20Version/finished.json' ); for (const layer of response.data.Maps) { From 0a495b0fa43cc7776cc44228b7bc68eba6789433 Mon Sep 17 00:00:00 2001 From: Thomas Smyth Date: Fri, 26 Feb 2021 10:38:53 +0000 Subject: [PATCH 02/20] npm install warning --- squad-server/templates/readme-template.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/squad-server/templates/readme-template.md b/squad-server/templates/readme-template.md index d80afe2..c7b8051 100644 --- a/squad-server/templates/readme-template.md +++ b/squad-server/templates/readme-template.md @@ -38,6 +38,8 @@ SquadJS relies on being able to access the Squad server log directory in order t 3. Configure the `config.json` file. See below for more details. 4. Start SquadJS: `node index.js`. +**Note** - We use Yarn Workspaces so `npm install` will not work and will break stuff! +
## **Configuring SquadJS** From 387d1d78597328737022f05f8ed64b4b56305557 Mon Sep 17 00:00:00 2001 From: Thomas Smyth Date: Fri, 26 Feb 2021 10:39:49 +0000 Subject: [PATCH 03/20] ESLint & README Generation --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index d92ad97..108b494 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,8 @@ SquadJS relies on being able to access the Squad server log directory in order t 3. Configure the `config.json` file. See below for more details. 4. Start SquadJS: `node index.js`. +**Note** - We use Yarn Workspaces so `npm install` will not work and will break stuff! +
## **Configuring SquadJS** From 48c2691f061e68c2d35b0b228ba1edf5f1e4f22d Mon Sep 17 00:00:00 2001 From: Thomas Smyth Date: Fri, 26 Feb 2021 10:55:36 +0000 Subject: [PATCH 04/20] SquadJS v2.0.2-beta1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b183459..0de6634 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "SquadJS", - "version": "2.0.2", + "version": "2.0.2-beta1", "repository": "https://github.com/Thomas-Smyth/SquadJS.git", "author": "Thomas Smyth ", "license": "BSL-1.0", From 2704b099de94e7ad553a39f641e66389471e577b Mon Sep 17 00:00:00 2001 From: Thomas Smyth Date: Fri, 26 Feb 2021 10:56:26 +0000 Subject: [PATCH 05/20] Tidy SquadJS API ping error message --- squad-server/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/squad-server/index.js b/squad-server/index.js index 886c15e..6d00ae2 100644 --- a/squad-server/index.js +++ b/squad-server/index.js @@ -470,7 +470,7 @@ export default class SquadServer extends EventEmitter { `Successfully pinged the SquadJS API. Got back message: ${data.message}` ); } catch (err) { - Logger.verbose('SquadServer', 1, 'Failed to ping the SquadJS API: ', err); + Logger.verbose('SquadServer', 1, 'Failed to ping the SquadJS API: ', err.message); } this.pingSquadJSAPITimeout = setTimeout(this.pingSquadJSAPI, this.pingSquadJSAPIInterval); From 89ee15de3f0afcca44361e68cdbd4416dabbede9 Mon Sep 17 00:00:00 2001 From: Thomas Smyth Date: Fri, 26 Feb 2021 15:48:45 +0000 Subject: [PATCH 06/20] Use A2S player count in API ping --- squad-server/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/squad-server/index.js b/squad-server/index.js index 6d00ae2..a59ff88 100644 --- a/squad-server/index.js +++ b/squad-server/index.js @@ -438,7 +438,7 @@ export default class SquadServer extends EventEmitter { queryPort: this.options.queryPort, name: this.serverName, - playerCount: this.players.length + playerCount: this.a2sPlayerCount }, // Send information about SquadJS. From 62d925b4fdf0050ed5d64c41558001eb1860e4ce Mon Sep 17 00:00:00 2001 From: Thomas Smyth Date: Fri, 26 Feb 2021 15:53:01 +0000 Subject: [PATCH 07/20] Add queue length to player count in API ping --- squad-server/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/squad-server/index.js b/squad-server/index.js index a59ff88..c927813 100644 --- a/squad-server/index.js +++ b/squad-server/index.js @@ -438,7 +438,7 @@ export default class SquadServer extends EventEmitter { queryPort: this.options.queryPort, name: this.serverName, - playerCount: this.a2sPlayerCount + playerCount: this.a2sPlayerCount + this.publicQueue + this.reserveQueue }, // Send information about SquadJS. From b6cbea325e14429964abf95039002b3af3559f1b Mon Sep 17 00:00:00 2001 From: Thomas Smyth Date: Sat, 27 Feb 2021 10:24:44 +0000 Subject: [PATCH 08/20] Use current layer and not history in status --- squad-server/plugins/discord-server-status.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/squad-server/plugins/discord-server-status.js b/squad-server/plugins/discord-server-status.js index 6763727..cb4d360 100644 --- a/squad-server/plugins/discord-server-status.js +++ b/squad-server/plugins/discord-server-status.js @@ -69,7 +69,7 @@ export default class DiscordServerStatus extends BasePlugin { await this.options.discordClient.user.setActivity( `(${this.server.a2sPlayerCount}/${this.server.publicSlots}) ${ - this.server.layerHistory[0].layer.name || 'Unknown' + this.server.currentLayer.name || 'Unknown' }`, { type: 'WATCHING' } ); From bdf246cb28e3629750e3f8031cd7661ed26b677a Mon Sep 17 00:00:00 2001 From: Thomas Smyth Date: Sat, 27 Feb 2021 10:26:41 +0000 Subject: [PATCH 09/20] SquadJS v2.0.3 Release --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0de6634..71e1a02 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "SquadJS", - "version": "2.0.2-beta1", + "version": "2.0.3", "repository": "https://github.com/Thomas-Smyth/SquadJS.git", "author": "Thomas Smyth ", "license": "BSL-1.0", From 05430e32b2e58cfc77a9b9deb24750480b906953 Mon Sep 17 00:00:00 2001 From: Luis Martin Schick Date: Sun, 28 Feb 2021 00:42:07 +0100 Subject: [PATCH 10/20] 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 108b494..7b739a9 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 11/20] 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 a0cd72b..f665b96 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 { '
  • Grafana is a cool way of viewing server statistics stored in the database.
  • \n' + '
  • Install Grafana.
  • \n' + '
  • Add your database as a datasource named SquadJS.
  • \n' + - '
  • Import the SquadJS Dashboard to get a preconfigured MySQL only Grafana dashboard.
  • \n' + + '
  • Import the SquadJS Dashboard to get a preconfigured MySQL only Grafana dashboard.
  • \n' + '
  • Install any missing Grafana plugins.
' ); } diff --git a/squad-server/templates/SquadJS-Dashboard-v2.json b/squad-server/templates/SquadJS-Dashboard-v2.json new file mode 100644 index 0000000..5ac32f0 --- /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 12/20] ESLint & README Generation --- README.md | 560 ++++++++++++++++++++++++++-------------------------- config.json | 164 +++++++-------- 2 files changed, 362 insertions(+), 362 deletions(-) diff --git a/README.md b/README.md index 108b494..19c3ef4 100644 --- a/README.md +++ b/README.md @@ -268,21 +268,75 @@ 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
  • +
    + +
    + 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
    • +
    • channelID (Required)

      +
      Description
      +

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

      +
      Default
      +
    • Example
      +
      667741905228136459
      +
    • color

      +
      Description
      +

      The color of the embed.

      +
      Default
      +
      16761867
    +
    + +
    + DiscordDebug +

    DiscordDebug

    +

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

    +

    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)

      +
      Description
      +

      A list of events to dump.

      +
      Default
      +
      []
    • Example
      +
      [
      +  "PLAYER_DIED"
      +]
    @@ -324,26 +378,56 @@ Interested in creating your own plugin? [See more here](./squad-server/plugins/r
    - DiscordAdminBroadcast -

    DiscordAdminBroadcast

    -

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

    + IntervalledBroadcasts +

    IntervalledBroadcasts

    +

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

    +

    Options

    +
    • broadcasts

      +
      Description
      +

      Messages to broadcast.

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

      +
      Description
      +

      Frequency of the broadcasts in milliseconds.

      +
      Default
      +
      300000
    +
    + +
    + 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
      -
    • color

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

      Description
      -

      The color of the embed.

      +

      How frequently to update the status in Discord.

      Default
      -
      16761867
    +
    60000
    +
  • disableStatus

    +
    Description
    +

    Disable the bot status.

    +
    Default
    +
    false
  • @@ -404,34 +488,190 @@ 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.

    + 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": []
      +  }
      +]
    +
    + +
    + 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!
    +
    + +
    + DiscordAdminBroadcast +

    DiscordAdminBroadcast

    +

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

    Options

    • discordClient (Required)

      Description

      Discord connector name.

      Default
      discord
    • -
    • messageIDs (Required)

      +
    • channelID (Required)

      Description
      -

      ID of messages to update.

      +

      The ID of the channel to log admin broadcasts to.

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

      +
    • Example
      +
      667741905228136459
      +
    • color

      Description
      -

      How frequently to update the status in Discord.

      +

      The color of the embed.

      Default
      -
      60000
    • -
    • disableStatus

      +
      16761867
    +
    + +
    + 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
      -

      Disable the bot status.

      +

      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!
    +
    + +
    + 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
    • +
    • channelID (Required)

      +
      Description
      +

      The ID of the channel to alert admins through.

      +
      Default
      +
    • Example
      +
      667741905228136459
      +
    • threshold

      +
      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

      +
      Default
      +
      6
    +
    + +
    + 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
    +
    + +
    + 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
      +

      Discord connector name.

      +
      Default
      +
      discord
    • +
    • channelID (Required)

      +
      Description
      +

      ID of channel to turn into RCON console.

      +
      Default
      +
    • Example
      +
      667741905228136459
      +
    • permissions

      +
      Description
      +

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

      +
      Description
      +

      Prepend admin names when making announcements.

      +
      Default
      +
      false
    +
    + +
    + DiscordTeamkill +

    DiscordTeamkill

    +

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

    +

    Options

    +
    • discordClient (Required)

      +
      Description
      +

      Discord connector name.

      +
      Default
      +
      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
    @@ -484,126 +724,21 @@ Interested in creating your own plugin? [See more here](./squad-server/plugins/r
    - DiscordDebug -

    DiscordDebug

    -

    The DiscordDebug plugin can be used to help debug SquadJS by dumping SquadJS events 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 events to.

      +

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

      Default
    • Example
      -
      667741905228136459
      -
    • events (Required)

      -
      Description
      -

      A list of events to dump.

      -
      Default
      -
      []
    • Example
      -
      [
      -  "PLAYER_DIED"
      -]
    -
    - -
    - IntervalledBroadcasts -

    IntervalledBroadcasts

    -

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

    -

    Options

    -
    • broadcasts

      -
      Description
      -

      Messages to broadcast.

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

      -
      Description
      -

      Frequency of the broadcasts in milliseconds.

      -
      Default
      -
      300000
    -
    - -
    - DiscordTeamkill -

    DiscordTeamkill

    -

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

    -

    Options

    -
    • discordClient (Required)

      -
      Description
      -

      Discord connector name.

      -
      Default
      -
      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
    -
    - -
    - 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!
    +
    667741905228136459
    @@ -615,7 +750,7 @@ 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.
    • +
    • Import the SquadJS Dashboard to get a preconfigured MySQL only Grafana dashboard.
    • Install any missing Grafana plugins.

    Options

    • database (Required)

      @@ -630,141 +765,6 @@ Grafana (NOT YET WORKING WITH V2):
      null
    -
    - DiscordRoundWinner -

    DiscordRoundWinner

    -

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

    -

    Options

    -
    • discordClient (Required)

      -
      Description
      -

      Discord connector name.

      -
      Default
      -
      discord
    • -
    • channelID (Required)

      -
      Description
      -

      The ID of the channel to log admin broadcasts to.

      -
      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

      -
      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": []
      -  }
      -]
    -
    - -
    - 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
    • -
    • channelID (Required)

      -
      Description
      -

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

      -
      Default
      -
    • Example
      -
      667741905228136459
      -
    • color

      -
      Description
      -

      The color of the embed.

      -
      Default
      -
      16761867
    -
    - -
    - 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
      -

      Discord connector name.

      -
      Default
      -
      discord
    • -
    • channelID (Required)

      -
      Description
      -

      ID of channel to turn into RCON console.

      -
      Default
      -
    • Example
      -
      667741905228136459
      -
    • permissions

      -
      Description
      -

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

      -
      Description
      -

      Prepend admin names when making announcements.

      -
      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

    -

    Options

    -
    • command

      -
      Description
      -

      The command used to randomize the teams.

      -
      Default
      -
      randomize
    -
    - -
    - 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
    • -
    • channelID (Required)

      -
      Description
      -

      The ID of the channel to alert admins through.

      -
      Default
      -
    • Example
      -
      667741905228136459
      -
    • threshold

      -
      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

      -
      Default
      -
      6
    -
    -
    ## Statement on Accuracy diff --git a/config.json b/config.json index 9043cc9..a94ffcc 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", @@ -68,75 +90,6 @@ "pingDelay": 60000, "color": 16761867 }, - { - "plugin": "DiscordServerStatus", - "enabled": false, - "discordClient": "discord", - "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", - "enabled": false, - "discordClient": "discord", - "channelID": "", - "events": [] - }, - { - "plugin": "IntervalledBroadcasts", - "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!" - }, - { - "plugin": "DBLog", - "enabled": false, - "database": "mysql", - "overrideServerID": null - }, - { - "plugin": "DiscordRoundWinner", - "enabled": true, - "discordClient": "discord", - "channelID": "", - "color": 16761867 - }, { "plugin": "ChatCommands", "enabled": true, @@ -150,12 +103,39 @@ ] }, { - "plugin": "DiscordAdminCamLogs", + "plugin": "AutoTKWarn", + "enabled": true, + "message": "Please apologise for ALL TKs in ALL chat!" + }, + { + "plugin": "DiscordAdminBroadcast", "enabled": false, "discordClient": "discord", "channelID": "", "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": "SCBLInfo", + "enabled": true, + "discordClient": "discord", + "channelID": "", + "threshold": 6 + }, + { + "plugin": "TeamRandomizer", + "enabled": true, + "command": "randomize" + }, { "plugin": "DiscordRcon", "enabled": false, @@ -165,16 +145,36 @@ "prependAdminNameInBroadcast": false }, { - "plugin": "TeamRandomizer", - "enabled": true, - "command": "randomize" - }, - { - "plugin": "SCBLInfo", + "plugin": "DiscordTeamkill", "enabled": true, "discordClient": "discord", "channelID": "", - "threshold": 6 + "color": 16761867, + "disableSCBL": 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": "DiscordSubsystemRestarter", + "enabled": false, + "discordClient": "discord", + "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 13/20] ESLint & README Generation --- README.md | 564 ++++++++++++++++++++++++++-------------------------- config.json | 164 +++++++-------- 2 files changed, 364 insertions(+), 364 deletions(-) diff --git a/README.md b/README.md index a471aa7..f6e3868 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,75 +268,21 @@ 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
    -
    - -
    - 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
    • -
    • channelID (Required)

      -
      Description
      -

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

      -
      Default
      -
    • Example
      -
      667741905228136459
      -
    • color

      -
      Description
      -

      The color of the embed.

      -
      Default
      -
      16761867
    -
    - -
    - DiscordDebug -

    DiscordDebug

    -

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

    -

    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)

      -
      Description
      -

      A list of events to dump.

      -
      Default
      -
      []
    • Example
      -
      [
      -  "PLAYER_DIED"
      -]
    +
    667741905228136459
    @@ -378,56 +324,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

    -

    Options

    -
    • broadcasts

      -
      Description
      -

      Messages to broadcast.

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

      -
      Description
      -

      Frequency of the broadcasts in milliseconds.

      -
      Default
      -
      300000
    -
    - -
    - DiscordServerStatus -

    DiscordServerStatus

    -

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

    + DiscordAdminBroadcast +

    DiscordAdminBroadcast

    +

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

    Options

    • discordClient (Required)

      Description

      Discord connector name.

      Default
      discord
    • -
    • messageIDs (Required)

      +
    • channelID (Required)

      Description
      -

      ID of messages to update.

      +

      The ID of the channel to log admin broadcasts to.

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

      +
    • Example
      +
      667741905228136459
      +
    • color

      Description
      -

      How frequently to update the status in Discord.

      +

      The color of the embed.

      Default
      -
      60000
    • -
    • disableStatus

      -
      Description
      -

      Disable the bot status.

      -
      Default
      -
      false
    +
    16761867
    @@ -488,190 +404,34 @@ Interested in creating your own plugin? [See more here](./squad-server/plugins/r
    - 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"
           }
        -]
      -
    - -
    - AutoTKWarn -

    AutoTKWarn

    -

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

    -

    Options

    -
    • message

      +] +
    • updateInterval

      Description
      -

      The message to warn players with.

      +

      How frequently to update the status in Discord.

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

    DiscordAdminBroadcast

    -

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

    -

    Options

    -
    • discordClient (Required)

      +
      60000
    • +
    • disableStatus

      Description
      -

      Discord connector name.

      -
      Default
      -
      discord
    • -
    • channelID (Required)

      -
      Description
      -

      The ID of the channel to log admin broadcasts to.

      -
      Default
      -
    • Example
      -
      667741905228136459
      -
    • color

      -
      Description
      -

      The color of the embed.

      -
      Default
      -
      16761867
    -
    - -
    - 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!
    -
    - -
    - 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
    • -
    • channelID (Required)

      -
      Description
      -

      The ID of the channel to alert admins through.

      -
      Default
      -
    • Example
      -
      667741905228136459
      -
    • threshold

      -
      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

      -
      Default
      -
      6
    -
    - -
    - 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
    -
    - -
    - 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
      -

      Discord connector name.

      -
      Default
      -
      discord
    • -
    • channelID (Required)

      -
      Description
      -

      ID of channel to turn into RCON console.

      -
      Default
      -
    • Example
      -
      667741905228136459
      -
    • permissions

      -
      Description
      -

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

      -
      Description
      -

      Prepend admin names when making announcements.

      -
      Default
      -
      false
    -
    - -
    - DiscordTeamkill -

    DiscordTeamkill

    -

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

    -

    Options

    -
    • discordClient (Required)

      -
      Description
      -

      Discord connector name.

      -
      Default
      -
      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.

      +

      Disable the bot status.

      Default
      false
    @@ -724,21 +484,126 @@ Interested in creating your own plugin? [See more here](./squad-server/plugins/r
    - 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

    + DiscordDebug +

    DiscordDebug

    +

    The DiscordDebug plugin can be used to help debug SquadJS by dumping SquadJS events 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 events to.

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

    +
    Description
    +

    A list of events to dump.

    +
    Default
    +
    []
  • Example
    +
    [
    +  "PLAYER_DIED"
    +]
    +
    + +
    + IntervalledBroadcasts +

    IntervalledBroadcasts

    +

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

    +

    Options

    +
    • broadcasts

      +
      Description
      +

      Messages to broadcast.

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

      +
      Description
      +

      Frequency of the broadcasts in milliseconds.

      +
      Default
      +
      300000
    +
    + +
    + DiscordTeamkill +

    DiscordTeamkill

    +

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

    +

    Options

    +
    • discordClient (Required)

      +
      Description
      +

      Discord connector name.

      +
      Default
      +
      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
    +
    + +
    + 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!
    @@ -765,6 +630,141 @@ Grafana (NOT YET WORKING WITH V2):
    null
    +
    + DiscordRoundWinner +

    DiscordRoundWinner

    +

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

    +

    Options

    +
    • discordClient (Required)

      +
      Description
      +

      Discord connector name.

      +
      Default
      +
      discord
    • +
    • channelID (Required)

      +
      Description
      +

      The ID of the channel to log admin broadcasts to.

      +
      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

      +
      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": []
      +  }
      +]
    +
    + +
    + 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
    • +
    • channelID (Required)

      +
      Description
      +

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

      +
      Default
      +
    • Example
      +
      667741905228136459
      +
    • color

      +
      Description
      +

      The color of the embed.

      +
      Default
      +
      16761867
    +
    + +
    + 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
      +

      Discord connector name.

      +
      Default
      +
      discord
    • +
    • channelID (Required)

      +
      Description
      +

      ID of channel to turn into RCON console.

      +
      Default
      +
    • Example
      +
      667741905228136459
      +
    • permissions

      +
      Description
      +

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

      +
      Description
      +

      Prepend admin names when making announcements.

      +
      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

    +

    Options

    +
    • command

      +
      Description
      +

      The command used to randomize the teams.

      +
      Default
      +
      randomize
    +
    + +
    + 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
    • +
    • channelID (Required)

      +
      Description
      +

      The ID of the channel to alert admins through.

      +
      Default
      +
    • Example
      +
      667741905228136459
      +
    • threshold

      +
      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

      +
      Default
      +
      6
    +
    +
    ## Statement on Accuracy diff --git a/config.json b/config.json index a94ffcc..9043cc9 100644 --- a/config.json +++ b/config.json @@ -33,25 +33,10 @@ }, "plugins": [ { - "plugin": "DiscordRoundWinner", - "enabled": true, - "discordClient": "discord", - "channelID": "", - "color": 16761867 - }, - { - "plugin": "DiscordAdminCamLogs", + "plugin": "DiscordSubsystemRestarter", "enabled": false, "discordClient": "discord", - "channelID": "", - "color": 16761867 - }, - { - "plugin": "DiscordDebug", - "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", @@ -90,6 +68,75 @@ "pingDelay": 60000, "color": 16761867 }, + { + "plugin": "DiscordServerStatus", + "enabled": false, + "discordClient": "discord", + "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", + "enabled": false, + "discordClient": "discord", + "channelID": "", + "events": [] + }, + { + "plugin": "IntervalledBroadcasts", + "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!" + }, + { + "plugin": "DBLog", + "enabled": false, + "database": "mysql", + "overrideServerID": null + }, + { + "plugin": "DiscordRoundWinner", + "enabled": true, + "discordClient": "discord", + "channelID": "", + "color": 16761867 + }, { "plugin": "ChatCommands", "enabled": true, @@ -103,39 +150,12 @@ ] }, { - "plugin": "AutoTKWarn", - "enabled": true, - "message": "Please apologise for ALL TKs in ALL chat!" - }, - { - "plugin": "DiscordAdminBroadcast", + "plugin": "DiscordAdminCamLogs", "enabled": false, "discordClient": "discord", "channelID": "", "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": "SCBLInfo", - "enabled": true, - "discordClient": "discord", - "channelID": "", - "threshold": 6 - }, - { - "plugin": "TeamRandomizer", - "enabled": true, - "command": "randomize" - }, { "plugin": "DiscordRcon", "enabled": false, @@ -145,36 +165,16 @@ "prependAdminNameInBroadcast": false }, { - "plugin": "DiscordTeamkill", + "plugin": "TeamRandomizer", + "enabled": true, + "command": "randomize" + }, + { + "plugin": "SCBLInfo", "enabled": true, "discordClient": "discord", "channelID": "", - "color": 16761867, - "disableSCBL": 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": "DiscordSubsystemRestarter", - "enabled": false, - "discordClient": "discord", - "role": "" - }, - { - "plugin": "DBLog", - "enabled": false, - "database": "mysql", - "overrideServerID": null + "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 14/20] SquadJS v2.0.4-beta1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 71e1a02..a41089e 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 15/20] Add back DiscordPlaceholder plugin --- README.md | 573 ++++++++++---------- config.json | 172 +++--- squad-server/plugins/discord-placeholder.js | 49 ++ 3 files changed, 433 insertions(+), 361 deletions(-) create mode 100644 squad-server/plugins/discord-placeholder.js diff --git a/README.md b/README.md index f6e3868..e1dd0ba 100644 --- a/README.md +++ b/README.md @@ -268,61 +268,107 @@ 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

    -
    • discordClient (Required)

      +
      • message

        Description
        -

        Discord connector name.

        +

        The message to warn players with.

        Default
        -
        discord
      • -
      • channelID (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
      -

      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
    • -
    • ignoreChats

      -
      Description
      -

      A list of chat names to ignore.

      +

      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
      [
      -  "ChatSquad"
      +  {
      +    "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

    @@ -346,6 +392,29 @@ Interested in creating your own plugin? [See more here](./squad-server/plugins/r
    16761867
    +
    + 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
    • +
    • channelID (Required)

      +
      Description
      +

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

      +
      Default
      +
    • Example
      +
      667741905228136459
      +
    • color

      +
      Description
      +

      The color of the embed.

      +
      Default
      +
      16761867
    +
    +
    DiscordAdminRequest

    DiscordAdminRequest

    @@ -403,6 +472,145 @@ Interested in creating your own plugin? [See more here](./squad-server/plugins/r
    16761867
    +
    + DiscordChat +

    DiscordChat

    +

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

    +

    Options

    +
    • discordClient (Required)

      +
      Description
      +

      Discord connector name.

      +
      Default
      +
      discord
    • +
    • channelID (Required)

      +
      Description
      +

      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
    • +
    • 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.

    +

    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)

      +
      Description
      +

      A list of events to dump.

      +
      Default
      +
      []
    • Example
      +
      [
      +  "PLAYER_DIED"
      +]
    +
    + +
    + DiscordPlaceholder +

    DiscordPlaceholder

    +

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

    +

    Options

    +
    • discordClient (Required)

      +
      Description
      +

      Discord connector name.

      +
      Default
      +
      discord
    • +
    • command

      +
      Description
      +

      Command to create Discord placeholder.

      +
      Default
      +
      !placeholder
    +
    + +
    + 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
      +

      Discord connector name.

      +
      Default
      +
      discord
    • +
    • channelID (Required)

      +
      Description
      +

      ID of channel to turn into RCON console.

      +
      Default
      +
    • Example
      +
      667741905228136459
      +
    • permissions

      +
      Description
      +

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

      +
      Description
      +

      Prepend admin names when making announcements.

      +
      Default
      +
      false
    +
    + +
    + DiscordRoundWinner +

    DiscordRoundWinner

    +

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

    +

    Options

    +
    • discordClient (Required)

      +
      Description
      +

      Discord connector name.

      +
      Default
      +
      discord
    • +
    • channelID (Required)

      +
      Description
      +

      The ID of the channel to log admin broadcasts to.

      +
      Default
      +
    • Example
      +
      667741905228136459
      +
    • color

      +
      Description
      +

      The color of the embed.

      +
      Default
      +
      16761867
    +
    +
    DiscordServerStatus

    DiscordServerStatus

    @@ -437,96 +645,21 @@ 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.

    -

    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
    -
    - -
    - DiscordDebug -

    DiscordDebug

    -

    The DiscordDebug plugin can be used to help debug SquadJS by dumping SquadJS events 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 events to.

      +

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

      Default
    • Example
      -
      667741905228136459
      -
    • events (Required)

      -
      Description
      -

      A list of events to dump.

      -
      Default
      -
      []
    • Example
      -
      [
      -  "PLAYER_DIED"
      -]
    -
    - -
    - IntervalledBroadcasts -

    IntervalledBroadcasts

    -

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

    -

    Options

    -
    • broadcasts

      -
      Description
      -

      Messages to broadcast.

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

      -
      Description
      -

      Frequency of the broadcasts in milliseconds.

      -
      Default
      -
      300000
    +
    667741905228136459
    @@ -557,6 +690,49 @@ Interested in creating your own plugin? [See more here](./squad-server/plugins/r
    false
    +
    + IntervalledBroadcasts +

    IntervalledBroadcasts

    +

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

    +

    Options

    +
    • broadcasts

      +
      Description
      +

      Messages to broadcast.

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

      +
      Description
      +

      Frequency of the broadcasts in milliseconds.

      +
      Default
      +
      300000
    +
    + +
    + 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
    • +
    • channelID (Required)

      +
      Description
      +

      The ID of the channel to alert admins through.

      +
      Default
      +
    • Example
      +
      667741905228136459
      +
    • threshold

      +
      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

      +
      Default
      +
      6
    +
    +
    SeedingMode

    SeedingMode

    @@ -594,142 +770,6 @@ Interested in creating your own plugin? [See more here](./squad-server/plugins/r
    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

    -

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

    -

    Options

    -
    • discordClient (Required)

      -
      Description
      -

      Discord connector name.

      -
      Default
      -
      discord
    • -
    • channelID (Required)

      -
      Description
      -

      The ID of the channel to log admin broadcasts to.

      -
      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

      -
      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": []
      -  }
      -]
    -
    - -
    - 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
    • -
    • channelID (Required)

      -
      Description
      -

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

      -
      Default
      -
    • Example
      -
      667741905228136459
      -
    • color

      -
      Description
      -

      The color of the embed.

      -
      Default
      -
      16761867
    -
    - -
    - 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
      -

      Discord connector name.

      -
      Default
      -
      discord
    • -
    • channelID (Required)

      -
      Description
      -

      ID of channel to turn into RCON console.

      -
      Default
      -
    • Example
      -
      667741905228136459
      -
    • permissions

      -
      Description
      -

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

      -
      Description
      -

      Prepend admin names when making announcements.

      -
      Default
      -
      false
    -
    -
    TeamRandomizer

    TeamRandomizer

    @@ -742,29 +782,6 @@ Grafana (NOT YET WORKING WITH V2):
    randomize
    -
    - 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
    • -
    • channelID (Required)

      -
      Description
      -

      The ID of the channel to alert admins through.

      -
      Default
      -
    • Example
      -
      667741905228136459
      -
    • threshold

      -
      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

      -
      Default
      -
      6
    -
    -
    ## Statement on Accuracy diff --git a/config.json b/config.json index 9043cc9..66e6165 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,10 +112,39 @@ "events": [] }, { - "plugin": "IntervalledBroadcasts", + "plugin": "DiscordPlaceholder", "enabled": false, - "broadcasts": [], - "interval": 300000 + "discordClient": "discord", + "command": "!placeholder" + }, + { + "plugin": "DiscordRcon", + "enabled": false, + "discordClient": "discord", + "channelID": "", + "permissions": {}, + "prependAdminNameInBroadcast": false + }, + { + "plugin": "DiscordRoundWinner", + "enabled": true, + "discordClient": "discord", + "channelID": "", + "color": 16761867 + }, + { + "plugin": "DiscordServerStatus", + "enabled": false, + "discordClient": "discord", + "messageIDs": [], + "updateInterval": 60000, + "disableStatus": false + }, + { + "plugin": "DiscordSubsystemRestarter", + "enabled": false, + "discordClient": "discord", + "role": "" }, { "plugin": "DiscordTeamkill", @@ -109,6 +154,19 @@ "color": 16761867, "disableSCBL": false }, + { + "plugin": "IntervalledBroadcasts", + "enabled": false, + "broadcasts": [], + "interval": 300000 + }, + { + "plugin": "SCBLInfo", + "enabled": true, + "discordClient": "discord", + "channelID": "", + "threshold": 6 + }, { "plugin": "SeedingMode", "enabled": true, @@ -119,62 +177,10 @@ "liveThreshold": 52, "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", - "enabled": true, - "discordClient": "discord", - "channelID": "", - "color": 16761867 - }, - { - "plugin": "ChatCommands", - "enabled": true, - "commands": [ - { - "command": "squadjs", - "type": "warn", - "response": "This server is powered by SquadJS.", - "ignoreChats": [] - } - ] - }, - { - "plugin": "DiscordAdminCamLogs", - "enabled": false, - "discordClient": "discord", - "channelID": "", - "color": 16761867 - }, - { - "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": { diff --git a/squad-server/plugins/discord-placeholder.js b/squad-server/plugins/discord-placeholder.js new file mode 100644 index 0000000..0890aea --- /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 16/20] ESLint & README Generation --- README.md | 582 ++++++++++++++++++++++++++-------------------------- config.json | 172 ++++++++-------- 2 files changed, 377 insertions(+), 377 deletions(-) diff --git a/README.md b/README.md index e1dd0ba..3c55f6e 100644 --- a/README.md +++ b/README.md @@ -268,107 +268,78 @@ 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.

    + DiscordPlaceholder +

    DiscordPlaceholder

    +

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

    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
      • +
      • command

        Description
        -

        Message to send to players when they are kicked

        +

        Command to create Discord placeholder.

        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
      +
      !placeholder
    - AutoTKWarn -

    AutoTKWarn

    -

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

    + 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

    -
    • message

      +
      • discordClient (Required)

        Description
        -

        The message to warn players with.

        +

        Discord connector name.

        Default
        -
        Please apologise for ALL TKs in ALL chat!
      +
      discord
    • +
    • role (Required)

      +
      Description
      +

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

      +
      Default
      +
    • Example
      +
      667741905228136459
    - ChatCommands -

    ChatCommands

    -

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

    + DiscordChat +

    DiscordChat

    +

    The DiscordChat plugin will log in-game chat 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 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
      • +
      • ignoreChats

        +
        Description
        +

        A list of chat names to ignore.

        Default
        [
        -  {
        -    "command": "squadjs",
        -    "type": "warn",
        -    "response": "This server is powered by SquadJS.",
        -    "ignoreChats": []
        -  }
        +  "ChatSquad"
         ]
    -
    - 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

    @@ -392,29 +363,6 @@ Grafana (NOT YET WORKING WITH V2):
    16761867
    -
    - 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
    • -
    • channelID (Required)

      -
      Description
      -

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

      -
      Default
      -
    • Example
      -
      667741905228136459
      -
    • color

      -
      Description
      -

      The color of the embed.

      -
      Default
      -
      16761867
    -
    -
    DiscordAdminRequest

    DiscordAdminRequest

    @@ -472,145 +420,6 @@ Grafana (NOT YET WORKING WITH V2):
    16761867
    -
    - DiscordChat -

    DiscordChat

    -

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

    -

    Options

    -
    • discordClient (Required)

      -
      Description
      -

      Discord connector name.

      -
      Default
      -
      discord
    • -
    • channelID (Required)

      -
      Description
      -

      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
    • -
    • 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.

    -

    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)

      -
      Description
      -

      A list of events to dump.

      -
      Default
      -
      []
    • Example
      -
      [
      -  "PLAYER_DIED"
      -]
    -
    - -
    - DiscordPlaceholder -

    DiscordPlaceholder

    -

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

    -

    Options

    -
    • discordClient (Required)

      -
      Description
      -

      Discord connector name.

      -
      Default
      -
      discord
    • -
    • command

      -
      Description
      -

      Command to create Discord placeholder.

      -
      Default
      -
      !placeholder
    -
    - -
    - 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
      -

      Discord connector name.

      -
      Default
      -
      discord
    • -
    • channelID (Required)

      -
      Description
      -

      ID of channel to turn into RCON console.

      -
      Default
      -
    • Example
      -
      667741905228136459
      -
    • permissions

      -
      Description
      -

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

      -
      Description
      -

      Prepend admin names when making announcements.

      -
      Default
      -
      false
    -
    - -
    - DiscordRoundWinner -

    DiscordRoundWinner

    -

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

    -

    Options

    -
    • discordClient (Required)

      -
      Description
      -

      Discord connector name.

      -
      Default
      -
      discord
    • -
    • channelID (Required)

      -
      Description
      -

      The ID of the channel to log admin broadcasts to.

      -
      Default
      -
    • Example
      -
      667741905228136459
      -
    • color

      -
      Description
      -

      The color of the embed.

      -
      Default
      -
      16761867
    -
    -
    DiscordServerStatus

    DiscordServerStatus

    @@ -645,21 +454,96 @@ Grafana (NOT YET WORKING WITH V2):
    - 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

    +
    • 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
    +
    + +
    + DiscordDebug +

    DiscordDebug

    +

    The DiscordDebug plugin can be used to help debug SquadJS by dumping SquadJS events 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 events to.

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

    +
    Description
    +

    A list of events to dump.

    +
    Default
    +
    []
  • Example
    +
    [
    +  "PLAYER_DIED"
    +]
    +
    + +
    + IntervalledBroadcasts +

    IntervalledBroadcasts

    +

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

    +

    Options

    +
    • broadcasts

      +
      Description
      +

      Messages to broadcast.

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

      +
      Description
      +

      Frequency of the broadcasts in milliseconds.

      +
      Default
      +
      300000
    @@ -690,49 +574,6 @@ Grafana (NOT YET WORKING WITH V2):
    false
    -
    - IntervalledBroadcasts -

    IntervalledBroadcasts

    -

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

    -

    Options

    -
    • broadcasts

      -
      Description
      -

      Messages to broadcast.

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

      -
      Description
      -

      Frequency of the broadcasts in milliseconds.

      -
      Default
      -
      300000
    -
    - -
    - 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
    • -
    • channelID (Required)

      -
      Description
      -

      The ID of the channel to alert admins through.

      -
      Default
      -
    • Example
      -
      667741905228136459
      -
    • threshold

      -
      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

      -
      Default
      -
      6
    -
    -
    SeedingMode

    SeedingMode

    @@ -770,6 +611,142 @@ Grafana (NOT YET WORKING WITH V2):
    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

    +

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

    +

    Options

    +
    • discordClient (Required)

      +
      Description
      +

      Discord connector name.

      +
      Default
      +
      discord
    • +
    • channelID (Required)

      +
      Description
      +

      The ID of the channel to log admin broadcasts to.

      +
      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

      +
      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": []
      +  }
      +]
    +
    + +
    + 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
    • +
    • channelID (Required)

      +
      Description
      +

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

      +
      Default
      +
    • Example
      +
      667741905228136459
      +
    • color

      +
      Description
      +

      The color of the embed.

      +
      Default
      +
      16761867
    +
    + +
    + 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
      +

      Discord connector name.

      +
      Default
      +
      discord
    • +
    • channelID (Required)

      +
      Description
      +

      ID of channel to turn into RCON console.

      +
      Default
      +
    • Example
      +
      667741905228136459
      +
    • permissions

      +
      Description
      +

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

      +
      Description
      +

      Prepend admin names when making announcements.

      +
      Default
      +
      false
    +
    +
    TeamRandomizer

    TeamRandomizer

    @@ -782,6 +759,29 @@ Grafana (NOT YET WORKING WITH V2):
    randomize
    +
    + 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
    • +
    • channelID (Required)

      +
      Description
      +

      The ID of the channel to alert admins through.

      +
      Default
      +
    • Example
      +
      667741905228136459
      +
    • threshold

      +
      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

      +
      Default
      +
      6
    +
    +
    ## Statement on Accuracy diff --git a/config.json b/config.json index 66e6165..4f87a31 100644 --- a/config.json +++ b/config.json @@ -33,40 +33,28 @@ }, "plugins": [ { - "plugin": "AutoKickUnassigned", + "plugin": "DiscordPlaceholder", "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", + "command": "!placeholder" }, { - "plugin": "AutoTKWarn", - "enabled": true, - "message": "Please apologise for ALL TKs in ALL chat!" + "plugin": "DiscordSubsystemRestarter", + "enabled": false, + "discordClient": "discord", + "role": "" }, { - "plugin": "ChatCommands", + "plugin": "DiscordChat", "enabled": true, - "commands": [ - { - "command": "squadjs", - "type": "warn", - "response": "This server is powered by SquadJS.", - "ignoreChats": [] - } + "discordClient": "discord", + "channelID": "", + "chatColors": {}, + "color": 16761867, + "ignoreChats": [ + "ChatSquad" ] }, - { - "plugin": "DBLog", - "enabled": false, - "database": "mysql", - "overrideServerID": null - }, { "plugin": "DiscordAdminBroadcast", "enabled": false, @@ -74,13 +62,6 @@ "channelID": "", "color": 16761867 }, - { - "plugin": "DiscordAdminCamLogs", - "enabled": false, - "discordClient": "discord", - "channelID": "", - "color": 16761867 - }, { "plugin": "DiscordAdminRequest", "enabled": true, @@ -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,39 +102,10 @@ "events": [] }, { - "plugin": "DiscordPlaceholder", + "plugin": "IntervalledBroadcasts", "enabled": false, - "discordClient": "discord", - "command": "!placeholder" - }, - { - "plugin": "DiscordRcon", - "enabled": false, - "discordClient": "discord", - "channelID": "", - "permissions": {}, - "prependAdminNameInBroadcast": false - }, - { - "plugin": "DiscordRoundWinner", - "enabled": true, - "discordClient": "discord", - "channelID": "", - "color": 16761867 - }, - { - "plugin": "DiscordServerStatus", - "enabled": false, - "discordClient": "discord", - "messageIDs": [], - "updateInterval": 60000, - "disableStatus": false - }, - { - "plugin": "DiscordSubsystemRestarter", - "enabled": false, - "discordClient": "discord", - "role": "" + "broadcasts": [], + "interval": 300000 }, { "plugin": "DiscordTeamkill", @@ -154,19 +115,6 @@ "color": 16761867, "disableSCBL": false }, - { - "plugin": "IntervalledBroadcasts", - "enabled": false, - "broadcasts": [], - "interval": 300000 - }, - { - "plugin": "SCBLInfo", - "enabled": true, - "discordClient": "discord", - "channelID": "", - "threshold": 6 - }, { "plugin": "SeedingMode", "enabled": true, @@ -177,10 +125,62 @@ "liveThreshold": 52, "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", + "enabled": true, + "discordClient": "discord", + "channelID": "", + "color": 16761867 + }, + { + "plugin": "ChatCommands", + "enabled": true, + "commands": [ + { + "command": "squadjs", + "type": "warn", + "response": "This server is powered by SquadJS.", + "ignoreChats": [] + } + ] + }, + { + "plugin": "DiscordAdminCamLogs", + "enabled": false, + "discordClient": "discord", + "channelID": "", + "color": 16761867 + }, + { + "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 17/20] 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 e1dd0ba..3c02f84 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 66e6165..900aca2 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 c7b8051..ddc13a9 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 18/20] Build readme --- README.md | 582 +++++++++++++++++++++++++++--------------------------- 1 file changed, 291 insertions(+), 291 deletions(-) diff --git a/README.md b/README.md index 5a46f9f..3c02f84 100644 --- a/README.md +++ b/README.md @@ -268,78 +268,107 @@ 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)

        -
        Description
        -

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

        -
        Default
        -
      • Example
        -
        667741905228136459
      +
      Please apologise for ALL TKs in ALL chat!
    - DiscordChat -

    DiscordChat

    -

    The DiscordChat plugin will log in-game chat 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)

      +
      • commands

        Description
        -

        Discord connector name.

        -
        Default
        -
        discord
      • -
      • channelID (Required)

        -
        Description
        -

        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
      • -
      • ignoreChats

        -
        Description
        -

        A list of chat names to ignore.

        +

        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
        [
        -  "ChatSquad"
        +  {
        +    "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

    @@ -363,6 +392,29 @@ Interested in creating your own plugin? [See more here](./squad-server/plugins/r
    16761867
    +
    + 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
    • +
    • channelID (Required)

      +
      Description
      +

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

      +
      Default
      +
    • Example
      +
      667741905228136459
      +
    • color

      +
      Description
      +

      The color of the embed.

      +
      Default
      +
      16761867
    +
    +
    DiscordAdminRequest

    DiscordAdminRequest

    @@ -420,6 +472,145 @@ Interested in creating your own plugin? [See more here](./squad-server/plugins/r
    16761867
    +
    + DiscordChat +

    DiscordChat

    +

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

    +

    Options

    +
    • discordClient (Required)

      +
      Description
      +

      Discord connector name.

      +
      Default
      +
      discord
    • +
    • channelID (Required)

      +
      Description
      +

      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
    • +
    • 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.

    +

    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)

      +
      Description
      +

      A list of events to dump.

      +
      Default
      +
      []
    • Example
      +
      [
      +  "PLAYER_DIED"
      +]
    +
    + +
    + DiscordPlaceholder +

    DiscordPlaceholder

    +

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

    +

    Options

    +
    • discordClient (Required)

      +
      Description
      +

      Discord connector name.

      +
      Default
      +
      discord
    • +
    • command

      +
      Description
      +

      Command to create Discord placeholder.

      +
      Default
      +
      !placeholder
    +
    + +
    + 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
      +

      Discord connector name.

      +
      Default
      +
      discord
    • +
    • channelID (Required)

      +
      Description
      +

      ID of channel to turn into RCON console.

      +
      Default
      +
    • Example
      +
      667741905228136459
      +
    • permissions

      +
      Description
      +

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

      +
      Description
      +

      Prepend admin names when making announcements.

      +
      Default
      +
      false
    +
    + +
    + DiscordRoundWinner +

    DiscordRoundWinner

    +

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

    +

    Options

    +
    • discordClient (Required)

      +
      Description
      +

      Discord connector name.

      +
      Default
      +
      discord
    • +
    • channelID (Required)

      +
      Description
      +

      The ID of the channel to log admin broadcasts to.

      +
      Default
      +
    • Example
      +
      667741905228136459
      +
    • color

      +
      Description
      +

      The color of the embed.

      +
      Default
      +
      16761867
    +
    +
    DiscordServerStatus

    DiscordServerStatus

    @@ -454,96 +645,21 @@ 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.

    -

    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
    -
    - -
    - DiscordDebug -

    DiscordDebug

    -

    The DiscordDebug plugin can be used to help debug SquadJS by dumping SquadJS events 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 events to.

      +

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

      Default
    • Example
      -
      667741905228136459
      -
    • events (Required)

      -
      Description
      -

      A list of events to dump.

      -
      Default
      -
      []
    • Example
      -
      [
      -  "PLAYER_DIED"
      -]
    -
    - -
    - IntervalledBroadcasts -

    IntervalledBroadcasts

    -

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

    -

    Options

    -
    • broadcasts

      -
      Description
      -

      Messages to broadcast.

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

      -
      Description
      -

      Frequency of the broadcasts in milliseconds.

      -
      Default
      -
      300000
    +
    667741905228136459
    @@ -574,6 +690,49 @@ Interested in creating your own plugin? [See more here](./squad-server/plugins/r
    false
    +
    + IntervalledBroadcasts +

    IntervalledBroadcasts

    +

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

    +

    Options

    +
    • broadcasts

      +
      Description
      +

      Messages to broadcast.

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

      +
      Description
      +

      Frequency of the broadcasts in milliseconds.

      +
      Default
      +
      300000
    +
    + +
    + 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
    • +
    • channelID (Required)

      +
      Description
      +

      The ID of the channel to alert admins through.

      +
      Default
      +
    • Example
      +
      667741905228136459
      +
    • threshold

      +
      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

      +
      Default
      +
      6
    +
    +
    SeedingMode

    SeedingMode

    @@ -611,142 +770,6 @@ Interested in creating your own plugin? [See more here](./squad-server/plugins/r
    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

    -

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

    -

    Options

    -
    • discordClient (Required)

      -
      Description
      -

      Discord connector name.

      -
      Default
      -
      discord
    • -
    • channelID (Required)

      -
      Description
      -

      The ID of the channel to log admin broadcasts to.

      -
      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

      -
      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": []
      -  }
      -]
    -
    - -
    - 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
    • -
    • channelID (Required)

      -
      Description
      -

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

      -
      Default
      -
    • Example
      -
      667741905228136459
      -
    • color

      -
      Description
      -

      The color of the embed.

      -
      Default
      -
      16761867
    -
    - -
    - 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
      -

      Discord connector name.

      -
      Default
      -
      discord
    • -
    • channelID (Required)

      -
      Description
      -

      ID of channel to turn into RCON console.

      -
      Default
      -
    • Example
      -
      667741905228136459
      -
    • permissions

      -
      Description
      -

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

      -
      Description
      -

      Prepend admin names when making announcements.

      -
      Default
      -
      false
    -
    -
    TeamRandomizer

    TeamRandomizer

    @@ -759,29 +782,6 @@ Grafana (NOT YET WORKING WITH V2):
    randomize
    -
    - 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
    • -
    • channelID (Required)

      -
      Description
      -

      The ID of the channel to alert admins through.

      -
      Default
      -
    • Example
      -
      667741905228136459
      -
    • threshold

      -
      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

      -
      Default
      -
      6
    -
    -
    ## 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 19/20] SquadJS v2.0.4 Release --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a41089e..41ab228 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 20/20] ESLint & README Generation --- README.md | 582 ++++++++++++++++++++++++++-------------------------- config.json | 172 ++++++++-------- 2 files changed, 377 insertions(+), 377 deletions(-) diff --git a/README.md b/README.md index 3c02f84..5a46f9f 100644 --- a/README.md +++ b/README.md @@ -268,107 +268,78 @@ 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.

    + DiscordPlaceholder +

    DiscordPlaceholder

    +

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

    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
      • +
      • command

        Description
        -

        Message to send to players when they are kicked

        +

        Command to create Discord placeholder.

        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
      +
      !placeholder
    - AutoTKWarn -

    AutoTKWarn

    -

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

    + 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

    -
    • message

      +
      • discordClient (Required)

        Description
        -

        The message to warn players with.

        +

        Discord connector name.

        Default
        -
        Please apologise for ALL TKs in ALL chat!
      +
      discord
    • +
    • role (Required)

      +
      Description
      +

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

      +
      Default
      +
    • Example
      +
      667741905228136459
    - ChatCommands -

    ChatCommands

    -

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

    + DiscordChat +

    DiscordChat

    +

    The DiscordChat plugin will log in-game chat 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 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
      • +
      • ignoreChats

        +
        Description
        +

        A list of chat names to ignore.

        Default
        [
        -  {
        -    "command": "squadjs",
        -    "type": "warn",
        -    "response": "This server is powered by SquadJS.",
        -    "ignoreChats": []
        -  }
        +  "ChatSquad"
         ]
    -
    - 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

    @@ -392,29 +363,6 @@ Grafana (NOT YET WORKING WITH V2):
    16761867
    -
    - 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
    • -
    • channelID (Required)

      -
      Description
      -

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

      -
      Default
      -
    • Example
      -
      667741905228136459
      -
    • color

      -
      Description
      -

      The color of the embed.

      -
      Default
      -
      16761867
    -
    -
    DiscordAdminRequest

    DiscordAdminRequest

    @@ -472,145 +420,6 @@ Grafana (NOT YET WORKING WITH V2):
    16761867
    -
    - DiscordChat -

    DiscordChat

    -

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

    -

    Options

    -
    • discordClient (Required)

      -
      Description
      -

      Discord connector name.

      -
      Default
      -
      discord
    • -
    • channelID (Required)

      -
      Description
      -

      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
    • -
    • 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.

    -

    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)

      -
      Description
      -

      A list of events to dump.

      -
      Default
      -
      []
    • Example
      -
      [
      -  "PLAYER_DIED"
      -]
    -
    - -
    - DiscordPlaceholder -

    DiscordPlaceholder

    -

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

    -

    Options

    -
    • discordClient (Required)

      -
      Description
      -

      Discord connector name.

      -
      Default
      -
      discord
    • -
    • command

      -
      Description
      -

      Command to create Discord placeholder.

      -
      Default
      -
      !placeholder
    -
    - -
    - 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
      -

      Discord connector name.

      -
      Default
      -
      discord
    • -
    • channelID (Required)

      -
      Description
      -

      ID of channel to turn into RCON console.

      -
      Default
      -
    • Example
      -
      667741905228136459
      -
    • permissions

      -
      Description
      -

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

      -
      Description
      -

      Prepend admin names when making announcements.

      -
      Default
      -
      false
    -
    - -
    - DiscordRoundWinner -

    DiscordRoundWinner

    -

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

    -

    Options

    -
    • discordClient (Required)

      -
      Description
      -

      Discord connector name.

      -
      Default
      -
      discord
    • -
    • channelID (Required)

      -
      Description
      -

      The ID of the channel to log admin broadcasts to.

      -
      Default
      -
    • Example
      -
      667741905228136459
      -
    • color

      -
      Description
      -

      The color of the embed.

      -
      Default
      -
      16761867
    -
    -
    DiscordServerStatus

    DiscordServerStatus

    @@ -645,21 +454,96 @@ Grafana (NOT YET WORKING WITH V2):
    - 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

    +
    • 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
    +
    + +
    + DiscordDebug +

    DiscordDebug

    +

    The DiscordDebug plugin can be used to help debug SquadJS by dumping SquadJS events 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 events to.

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

    +
    Description
    +

    A list of events to dump.

    +
    Default
    +
    []
  • Example
    +
    [
    +  "PLAYER_DIED"
    +]
    +
    + +
    + IntervalledBroadcasts +

    IntervalledBroadcasts

    +

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

    +

    Options

    +
    • broadcasts

      +
      Description
      +

      Messages to broadcast.

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

      +
      Description
      +

      Frequency of the broadcasts in milliseconds.

      +
      Default
      +
      300000
    @@ -690,49 +574,6 @@ Grafana (NOT YET WORKING WITH V2):
    false
    -
    - IntervalledBroadcasts -

    IntervalledBroadcasts

    -

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

    -

    Options

    -
    • broadcasts

      -
      Description
      -

      Messages to broadcast.

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

      -
      Description
      -

      Frequency of the broadcasts in milliseconds.

      -
      Default
      -
      300000
    -
    - -
    - 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
    • -
    • channelID (Required)

      -
      Description
      -

      The ID of the channel to alert admins through.

      -
      Default
      -
    • Example
      -
      667741905228136459
      -
    • threshold

      -
      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

      -
      Default
      -
      6
    -
    -
    SeedingMode

    SeedingMode

    @@ -770,6 +611,142 @@ Grafana (NOT YET WORKING WITH V2):
    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

    +

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

    +

    Options

    +
    • discordClient (Required)

      +
      Description
      +

      Discord connector name.

      +
      Default
      +
      discord
    • +
    • channelID (Required)

      +
      Description
      +

      The ID of the channel to log admin broadcasts to.

      +
      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

      +
      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": []
      +  }
      +]
    +
    + +
    + 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
    • +
    • channelID (Required)

      +
      Description
      +

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

      +
      Default
      +
    • Example
      +
      667741905228136459
      +
    • color

      +
      Description
      +

      The color of the embed.

      +
      Default
      +
      16761867
    +
    + +
    + 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
      +

      Discord connector name.

      +
      Default
      +
      discord
    • +
    • channelID (Required)

      +
      Description
      +

      ID of channel to turn into RCON console.

      +
      Default
      +
    • Example
      +
      667741905228136459
      +
    • permissions

      +
      Description
      +

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

      +
      Description
      +

      Prepend admin names when making announcements.

      +
      Default
      +
      false
    +
    +
    TeamRandomizer

    TeamRandomizer

    @@ -782,6 +759,29 @@ Grafana (NOT YET WORKING WITH V2):
    randomize
    +
    + 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
    • +
    • channelID (Required)

      +
      Description
      +

      The ID of the channel to alert admins through.

      +
      Default
      +
    • Example
      +
      667741905228136459
      +
    • threshold

      +
      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

      +
      Default
      +
      6
    +
    +
    ## Statement on Accuracy diff --git a/config.json b/config.json index 900aca2..4f87a31 100644 --- a/config.json +++ b/config.json @@ -33,40 +33,28 @@ }, "plugins": [ { - "plugin": "AutoKickUnassigned", + "plugin": "DiscordPlaceholder", "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", + "command": "!placeholder" }, { - "plugin": "AutoTKWarn", - "enabled": true, - "message": "Please apologise for ALL TKs in ALL chat!" + "plugin": "DiscordSubsystemRestarter", + "enabled": false, + "discordClient": "discord", + "role": "" }, { - "plugin": "ChatCommands", + "plugin": "DiscordChat", "enabled": true, - "commands": [ - { - "command": "squadjs", - "type": "warn", - "response": "This server is powered by SquadJS.", - "ignoreChats": [] - } + "discordClient": "discord", + "channelID": "", + "chatColors": {}, + "color": 16761867, + "ignoreChats": [ + "ChatSquad" ] }, - { - "plugin": "DBLog", - "enabled": false, - "database": "mysql", - "overrideServerID": null - }, { "plugin": "DiscordAdminBroadcast", "enabled": false, @@ -74,13 +62,6 @@ "channelID": "", "color": 16761867 }, - { - "plugin": "DiscordAdminCamLogs", - "enabled": false, - "discordClient": "discord", - "channelID": "", - "color": 16761867 - }, { "plugin": "DiscordAdminRequest", "enabled": true, @@ -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,39 +102,10 @@ "events": [] }, { - "plugin": "DiscordPlaceholder", - "enabled": true, - "discordClient": "discord", - "command": "!placeholder" - }, - { - "plugin": "DiscordRcon", + "plugin": "IntervalledBroadcasts", "enabled": false, - "discordClient": "discord", - "channelID": "", - "permissions": {}, - "prependAdminNameInBroadcast": false - }, - { - "plugin": "DiscordRoundWinner", - "enabled": true, - "discordClient": "discord", - "channelID": "", - "color": 16761867 - }, - { - "plugin": "DiscordServerStatus", - "enabled": false, - "discordClient": "discord", - "messageIDs": [], - "updateInterval": 60000, - "disableStatus": false - }, - { - "plugin": "DiscordSubsystemRestarter", - "enabled": false, - "discordClient": "discord", - "role": "" + "broadcasts": [], + "interval": 300000 }, { "plugin": "DiscordTeamkill", @@ -154,19 +115,6 @@ "color": 16761867, "disableSCBL": false }, - { - "plugin": "IntervalledBroadcasts", - "enabled": false, - "broadcasts": [], - "interval": 300000 - }, - { - "plugin": "SCBLInfo", - "enabled": true, - "discordClient": "discord", - "channelID": "", - "threshold": 6 - }, { "plugin": "SeedingMode", "enabled": true, @@ -177,10 +125,62 @@ "liveThreshold": 52, "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", + "enabled": true, + "discordClient": "discord", + "channelID": "", + "color": 16761867 + }, + { + "plugin": "ChatCommands", + "enabled": true, + "commands": [ + { + "command": "squadjs", + "type": "warn", + "response": "This server is powered by SquadJS.", + "ignoreChats": [] + } + ] + }, + { + "plugin": "DiscordAdminCamLogs", + "enabled": false, + "discordClient": "discord", + "channelID": "", + "color": 16761867 + }, + { + "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": {