Skip to content

Commit

Permalink
Merge pull request #139 from Thomas-Smyth/beta
Browse files Browse the repository at this point in the history
SquadJS v2 Release
  • Loading branch information
Thomas-Smyth authored Feb 24, 2021
2 parents efa48d1 + 3ba32b6 commit 24d45ea
Show file tree
Hide file tree
Showing 117 changed files with 5,248 additions and 14,843 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Build Yarn docs & lint source code
on: [push, pull_request]
jobs:
run:
name: Lint and build templates
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '14'
check-latest: true

- name: Install dependencies
run: yarn install

- name: Build all docs
run: yarn run build-all

- name: Update source code
run: yarn run lint

- name: Commit changes
uses: EndBug/add-and-commit@v6
with:
message: 'ESLint & README Generation'
add: '.'

3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# Project Files
*.tmp

index-test.js
config-test.json
config-test*.json

# Dependencies
node_modules/
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Boost Software License - Version 1.0 - August 17th, 2003

Copyright (c) 2020 Thomas Smyth
Copyright (c) 2021 Thomas Smyth

Permission is hereby granted, free of charge, to any person or organization
obtaining a copy of the software and accompanying documentation covered by
Expand Down
1,375 changes: 679 additions & 696 deletions README.md

Large diffs are not rendered by default.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
248 changes: 113 additions & 135 deletions config.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,209 +7,187 @@
"rconPassword": "password",
"logReaderMode": "tail",
"logDir": "C:/path/to/squad/log/folder",
"ftpPort": 21,
"ftpUser": "FTP Username",
"ftpPassword": "FTP Password",
"rconVerbose": true
"ftp": {
"port": 21,
"user": "FTP Username",
"password": "FTP Password",
"useListForSize": false
},
"adminLists": [
{
"type": "",
"source": ""
}
]
},
"connectors": {
"discord": "Discord Login Token",
"layerFilter": {
"type": "buildFromFilter",
"filter": {
"whitelistedLayers": null,
"blacklistedLayers": null,
"whitelistedMaps": null,
"blacklistedMaps": null,
"whitelistedGamemodes": null,
"blacklistedGamemodes": [
"Training"
],
"flagCountMin": null,
"flagCountMax": null,
"hasCommander": null,
"hasTanks": null,
"hasHelicopters": null
},
"activeLayerFilter": {
"historyResetTime": 18000000,
"layerHistoryTolerance": 8,
"mapHistoryTolerance": 4,
"gamemodeHistoryTolerance": {
"Invasion": 4
},
"gamemodeRepetitiveTolerance": {
"Invasion": 4
},
"playerCountComplianceEnabled": true,
"factionComplianceEnabled": true,
"factionHistoryTolerance": {
"RUS": 4
},
"factionRepetitiveTolerance": {
"RUS": 4
}
}
},
"mysql": {
"connectionLimit": 10,
"host": "host",
"port": 3306,
"user": "squadjs",
"username": "squadjs",
"password": "password",
"database": "squadjs"
"database": "squadjs",
"dialect": "mysql"
}
},
"plugins": [
{
"plugin": "auto-tk-warn",
"enabled": true,
"message": "Please apologise for ALL TKs in ALL chat!"
},
{
"plugin": "chat-commands",
"enabled": true,
"commands": [
{
"command": "!squadjs",
"type": "warn",
"response": "This server is powered by SquadJS.",
"ignoreChats": []
}
]
},
{
"plugin": "discord-admin-broadcast",
"enabled": true,
"plugin": "DiscordSubsystemRestarter",
"enabled": false,
"discordClient": "discord",
"channelID": "",
"color": 16761867
"role": ""
},
{
"plugin": "discord-admin-cam-logs",
"plugin": "DiscordChat",
"enabled": true,
"discordClient": "discord",
"channelID": "",
"color": 16761867
"chatColors": {},
"color": 16761867,
"ignoreChats": [
"ChatSquad"
]
},
{
"plugin": "discord-chat",
"enabled": true,
"plugin": "DiscordAdminBroadcast",
"enabled": false,
"discordClient": "discord",
"channelID": "",
"ignoreChats": [
"ChatSquad"
],
"chatColors": {},
"color": 16761867
},
{
"plugin": "discord-admin-request",
"plugin": "DiscordAdminRequest",
"enabled": true,
"discordClient": "discord",
"channelID": "",
"ignoreChats": [],
"ignorePhrases": [],
"adminPrefix": "!admin",
"command": "admin",
"pingGroups": [],
"pingDelay": 60000,
"color": 16761867
},
{
"plugin": "discord-debug",
"plugin": "DiscordServerStatus",
"enabled": false,
"discordClient": "discord",
"channelID": "",
"events": []
"messageIDs": [],
"updateInterval": 60000,
"disableStatus": false
},
{
"plugin": "discord-rcon",
"plugin": "AutoKickUnassigned",
"enabled": true,
"discordClient": "discord",
"channelID": "",
"prependAdminNameInBroadcast": false
"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": "discord-round-winner",
"enabled": true,
"plugin": "DiscordDebug",
"enabled": false,
"discordClient": "discord",
"channelID": "",
"color": 16761867
"events": []
},
{
"plugin": "discord-server-status",
"enabled": true,
"discordClient": "discord",
"color": 16761867,
"colorGradient": true,
"connectLink": true,
"command": "!server",
"disableStatus": false
"plugin": "IntervalledBroadcasts",
"enabled": false,
"broadcasts": [],
"interval": 300000
},
{
"plugin": "discord-teamkill",
"plugin": "DiscordTeamkill",
"enabled": true,
"discordClient": "discord",
"channelID": "",
"teamkillColor": 16761867,
"suicideColor": 16761867,
"ignoreSuicides": false,
"color": 16761867,
"disableSCBL": false
},
{
"plugin": "intervalled-broadcasts",
"enabled": false,
"broadcasts": [
"Server powered by SquadJS."
],
"interval": 300000
"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": "mapvote-123",
"enabled": false,
"minVoteCount": null
"plugin": "AutoTKWarn",
"enabled": true,
"message": "Please apologise for ALL TKs in ALL chat!"
},
{
"plugin": "mapvote-did-you-mean",
"plugin": "DBLog",
"enabled": false,
"layerFilter": "layerFilter",
"alwaysOn": true,
"minPlayerCount": null,
"minVoteCount": null
"database": "mysql",
"overrideServerID": null
},
{
"plugin": "mysql-log",
"enabled": false,
"mysqlPool": "mysql",
"overrideServerID": null
"plugin": "DiscordRoundWinner",
"enabled": true,
"discordClient": "discord",
"channelID": "",
"color": 16761867
},
{
"plugin": "seeding-message",
"plugin": "ChatCommands",
"enabled": true,
"mode": "interval",
"interval": 150000,
"delay": 45000,
"seedingThreshold": 50,
"seedingMessage": "Seeding Rules Active! Fight only over the middle flags! No FOB Hunting!",
"liveEnabled": true,
"liveThreshold": 2,
"liveMessage": "Live"
"commands": [
{
"command": "squadjs",
"type": "warn",
"response": "This server is powered by SquadJS.",
"ignoreChats": []
}
]
},
{
"plugin": "skipmap",
"plugin": "DiscordAdminCamLogs",
"enabled": false,
"command": "!skipmap",
"voteDuration": 300000,
"startTimer": 900000,
"endTimer": 1800000,
"pastVoteTimer": 600000,
"minimumVotes": 20,
"reminderInterval": 120000
"discordClient": "discord",
"channelID": "",
"color": 16761867
},
{
"plugin": "team-randomizer",
"plugin": "DiscordRcon",
"enabled": false,
"discordClient": "discord",
"channelID": "",
"permissions": {},
"prependAdminNameInBroadcast": false
},
{
"plugin": "TeamRandomizer",
"enabled": true,
"command": "!randomize"
"command": "randomize"
},
{
"plugin": "SCBLInfo",
"enabled": true,
"discordClient": "discord",
"channelID": "",
"threshold": 6
}
],
"logger": {
"verboseness": {
"SquadServer": 1,
"LogParser": 1,
"RCON": 1
},
"colors": {
"SquadServer": "yellowBright",
"SquadServerFactory": "yellowBright",
"LogParser": "blueBright",
"RCON": "redBright"
}
]
}
}
15 changes: 2 additions & 13 deletions core/constants.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,3 @@
import fs from 'fs';
import path from 'path';
import { fileURLToPath } from 'url';
const SQUADJS_API_DOMAIN = 'https://squadjs.thomas-smyth.uk';

const __dirname = path.dirname(fileURLToPath(import.meta.url));

const SQUADJS_VERSION = JSON.parse(
fs.readFileSync(path.resolve(__dirname, '../package.json'), 'utf8')
).version;

/* As set out by the terms of the license, the following should not be modified. */
const COPYRIGHT_MESSAGE = 'Powered by SquadJS, Copyright © 2020';

export { SQUADJS_VERSION, COPYRIGHT_MESSAGE };
export { SQUADJS_API_DOMAIN };
Loading

0 comments on commit 24d45ea

Please sign in to comment.