diff --git a/README.md b/README.md index ce6873c3..9083db05 100644 --- a/README.md +++ b/README.md @@ -211,113 +211,73 @@ 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)
- DiscordAdminCamLogs -

DiscordAdminCamLogs

-

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

+ AutoKickUnassigned +

AutoKickUnassigned

+

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

Options

-
- -
- DiscordAdminBroadcast -

DiscordAdminBroadcast

-

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

-

Options

- -
- -
- DiscordRcon -

DiscordRcon

-

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

-

Options

-
- DiscordRoundWinner -

DiscordRoundWinner

-

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

+ AutoTKWarn +

AutoTKWarn

+

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

Options

-
- DiscordKillFeed -

DiscordKillFeed

-

The DiscordKillFeed plugin logs all wounds and related information to a Discord channel for admins to review.

+ CBLInfo +

CBLInfo

+

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

Options

+
6
- DiscordPlaceholder -

DiscordPlaceholder

-

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

+ ChatCommands +

ChatCommands

+

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

Options

-
@@ -389,9 +341,9 @@ Grafana:
- CBLInfo -

CBLInfo

-

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

+ DiscordAdminBroadcast +

DiscordAdminBroadcast

+

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

Options

+
16761867
- DiscordRoundEnded -

DiscordRoundEnded

-

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

+ DiscordAdminCamLogs +

DiscordAdminCamLogs

+

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

Options

- ChatCommands -

ChatCommands

-

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

-

Options

- -
- -
- DiscordServerStatus -

DiscordServerStatus

-

The DiscordServerStatus plugin can be used to get the server status in Discord.

+ DiscordAdminRequest +

DiscordAdminRequest

+

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

Options

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

- +
false
+
  • showInGameAdmins

    +
    Description
    +

    Should players know how much in-game admins there are active/online?

    +
    Default
    +
    true
  • @@ -540,53 +496,6 @@ Grafana: ]
    -
    - 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

    - -
    -
    DiscordDebug

    DiscordDebug

    @@ -614,27 +523,32 @@ Grafana:
    - DiscordSubsystemRestarter -

    DiscordSubsystemRestarter

    -

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

    + DiscordFOBHABExplosionDamage +

    DiscordFOBHABExplosionDamage

    +

    The DiscordFOBHABExplosionDamage plugin logs damage done to FOBs and HABs by explosions to help identify engineers blowing up friendly FOBs and HABs.

    Options

    +
    667741905228136459
    +
  • color

    +
    Description
    +

    The color of the embeds.

    +
    Default
    +
    16761867
  • - DiscordSquadCreated -

    DiscordSquadCreated

    -

    The SquadCreated plugin will log Squad Creation events to a Discord channel.

    + DiscordKillFeed +

    DiscordKillFeed

    +

    The DiscordKillFeed plugin logs all wounds and related information to a Discord channel for admins to review.

    Options

    +
    false
    - FogOfWar -

    FogOfWar

    -

    The FogOfWar plugin can be used to automate setting fog of war mode.

    + DiscordPlaceholder +

    DiscordPlaceholder

    +

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

    Options

    -
    - IntervalledBroadcasts -

    IntervalledBroadcasts

    -

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

    + DiscordRcon +

    DiscordRcon

    +

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

    Options

    -
    - SocketIOAPI -

    SocketIOAPI

    -

    The SocketIOAPI plugin allows remote access to a SquadJS instance via Socket.IO
    As a client example you can use this to connect to the socket.io server;

    
    -      const socket = io.connect('ws://IP:PORT', {
    -        auth: {
    -          token: "MySecretPassword"
    -        }
    -      })
    -    
    If you need more documentation about socket.io please go ahead and read the following;
    General Socket.io documentation: Socket.io Docs
    Authentication and securing your websocket: Sending-credentials
    How to use, install and configure a socketIO-client: Usage Guide with Examples

    + DiscordRoundWinner +

    DiscordRoundWinner

    +

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

    Options

    -
    - AutoTKWarn -

    AutoTKWarn

    -

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

    + DiscordRoundEnded +

    DiscordRoundEnded

    +

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

    Options

    -
    - AutoKickUnassigned -

    AutoKickUnassigned

    -

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

    + DiscordServerStatus +

    DiscordServerStatus

    +

    The DiscordServerStatus plugin can be used to get the server status in Discord.

    Options

    -
    + +
    + DiscordSquadCreated +

    DiscordSquadCreated

    +

    The SquadCreated plugin will log Squad Creation events to a Discord channel.

    +

    Options

    + +
    Example
    +
    667741905228136459
    +
  • color

    +
    Description
    +

    The color of the embed.

    +
    Default
    +
    16761867
  • +
  • useEmbed

    +
    Description
    +

    Send message as Embed

    +
    Default
    +
    true
  • +
    + +
    + DiscordSubsystemRestarter +

    DiscordSubsystemRestarter

    +

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

    +

    Options

    +
    @@ -814,98 +788,124 @@ Grafana:
    - DiscordAdminRequest -

    DiscordAdminRequest

    -

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

    + FogOfWar +

    FogOfWar

    +

    The FogOfWar plugin can be used to automate setting fog of war mode.

    Options

    -
    + +
    + IntervalledBroadcasts +

    IntervalledBroadcasts

    +

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

    +

    Options

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

    + +
    true
    +
  • waitTimeOnNewGame

    +
    Description
    +

    The time to wait before check player counts in seconds.

    +
    Default
    +
    30
  • - DiscordFOBHABExplosionDamage -

    DiscordFOBHABExplosionDamage

    -

    The DiscordFOBHABExplosionDamage plugin logs damage done to FOBs and HABs by explosions to help identify engineers blowing up friendly FOBs and HABs.

    + SocketIOAPI +

    SocketIOAPI

    +

    The SocketIOAPI plugin allows remote access to a SquadJS instance via Socket.IO
    As a client example you can use this to connect to the socket.io server;

    
    +      const socket = io.connect('ws://IP:PORT', {
    +        auth: {
    +          token: "MySecretPassword"
    +        }
    +      })
    +    
    If you need more documentation about socket.io please go ahead and read the following;
    General Socket.io documentation: Socket.io Docs
    Authentication and securing your websocket: Sending-credentials
    How to use, install and configure a socketIO-client: Usage Guide with Examples

    Options

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

    + +
    randomize

    diff --git a/config.json b/config.json index dbc65944..cee56428 100644 --- a/config.json +++ b/config.json @@ -46,29 +46,97 @@ }, "plugins": [ { - "plugin": "DiscordAdminCamLogs", + "plugin": "AutoKickUnassigned", + "enabled": true, + "warningMessage": "Join a squad, you are unassigned and will be kicked", + "kickMessage": "Unassigned - automatically removed", + "frequencyOfWarnings": 30, + "unassignedTimer": 360, + "playerThreshold": 93, + "roundStartDelay": 900, + "ignoreAdmins": false, + "ignoreWhitelist": false + }, + { + "plugin": "AutoTKWarn", + "enabled": true, + "attackerMessage": "Please apologise for ALL TKs in ALL chat!", + "victimMessage": null + }, + { + "plugin": "CBLInfo", + "enabled": true, + "discordClient": "discord", + "channelID": "", + "threshold": 6 + }, + { + "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, "discordClient": "discord", "channelID": "", "color": 16761867 }, { - "plugin": "DiscordAdminBroadcast", + "plugin": "DiscordAdminCamLogs", "enabled": false, "discordClient": "discord", "channelID": "", "color": 16761867 }, { - "plugin": "DiscordRcon", + "plugin": "DiscordAdminRequest", + "enabled": true, + "discordClient": "discord", + "channelID": "", + "ignoreChats": [], + "ignorePhrases": [], + "command": "admin", + "pingGroups": [], + "pingHere": false, + "pingDelay": 60000, + "color": 16761867, + "warnInGameAdmins": false, + "showInGameAdmins": true + }, + { + "plugin": "DiscordChat", + "enabled": true, + "discordClient": "discord", + "channelID": "", + "chatColors": {}, + "color": 16761867, + "ignoreChats": [ + "ChatSquad" + ] + }, + { + "plugin": "DiscordDebug", "enabled": false, "discordClient": "discord", "channelID": "", - "permissions": {}, - "prependAdminNameInBroadcast": false + "events": [] }, { - "plugin": "DiscordRoundWinner", + "plugin": "DiscordFOBHABExplosionDamage", "enabled": true, "discordClient": "discord", "channelID": "", @@ -90,17 +158,19 @@ "channelID": "" }, { - "plugin": "DBLog", + "plugin": "DiscordRcon", "enabled": false, - "database": "mysql", - "overrideServerID": null + "discordClient": "discord", + "channelID": "", + "permissions": {}, + "prependAdminNameInBroadcast": false }, { - "plugin": "CBLInfo", + "plugin": "DiscordRoundWinner", "enabled": true, "discordClient": "discord", "channelID": "", - "threshold": 6 + "color": 16761867 }, { "plugin": "DiscordRoundEnded", @@ -109,18 +179,6 @@ "channelID": "", "color": 16761867 }, - { - "plugin": "ChatCommands", - "enabled": true, - "commands": [ - { - "command": "squadjs", - "type": "warn", - "response": "This server is powered by SquadJS.", - "ignoreChats": [] - } - ] - }, { "plugin": "DiscordServerStatus", "enabled": true, @@ -132,39 +190,12 @@ "setBotStatus": true }, { - "plugin": "TeamRandomizer", - "enabled": true, - "command": "randomize" - }, - { - "plugin": "DiscordChat", - "enabled": true, - "discordClient": "discord", - "channelID": "", - "chatColors": {}, - "color": 16761867, - "ignoreChats": [ - "ChatSquad" - ] - }, - { - "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!", - "waitOnNewGames": true, - "waitTimeOnNewGame": 30 - }, - { - "plugin": "DiscordDebug", + "plugin": "DiscordSquadCreated", "enabled": false, "discordClient": "discord", "channelID": "", - "events": [] + "color": 16761867, + "useEmbed": true }, { "plugin": "DiscordSubsystemRestarter", @@ -173,12 +204,12 @@ "role": "" }, { - "plugin": "DiscordSquadCreated", - "enabled": false, + "plugin": "DiscordTeamkill", + "enabled": true, "discordClient": "discord", "channelID": "", "color": 16761867, - "useEmbed": true + "disableCBL": false }, { "plugin": "FogOfWar", @@ -192,6 +223,18 @@ "broadcasts": [], "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!", + "waitOnNewGames": true, + "waitTimeOnNewGame": 30 + }, { "plugin": "SocketIOAPI", "enabled": false, @@ -199,52 +242,9 @@ "securityToken": "" }, { - "plugin": "AutoTKWarn", - "enabled": true, - "attackerMessage": "Please apologise for ALL TKs in ALL chat!", - "victimMessage": null - }, - { - "plugin": "AutoKickUnassigned", - "enabled": true, - "warningMessage": "Join a squad, you are unassigned and will be kicked", - "kickMessage": "Unassigned - automatically removed", - "frequencyOfWarnings": 30, - "unassignedTimer": 360, - "playerThreshold": 93, - "roundStartDelay": 900, - "ignoreAdmins": false, - "ignoreWhitelist": false - }, - { - "plugin": "DiscordTeamkill", - "enabled": true, - "discordClient": "discord", - "channelID": "", - "color": 16761867, - "disableCBL": false - }, - { - "plugin": "DiscordAdminRequest", - "enabled": true, - "discordClient": "discord", - "channelID": "", - "ignoreChats": [], - "ignorePhrases": [], - "command": "admin", - "pingGroups": [], - "pingHere": false, - "pingDelay": 60000, - "color": 16761867, - "warnInGameAdmins": false, - "showInGameAdmins": true - }, - { - "plugin": "DiscordFOBHABExplosionDamage", + "plugin": "TeamRandomizer", "enabled": true, - "discordClient": "discord", - "channelID": "", - "color": 16761867 + "command": "randomize" } ], "logger": { diff --git a/squad-server/plugins/discord-server-status.js b/squad-server/plugins/discord-server-status.js index c187fced..8e2f620b 100644 --- a/squad-server/plugins/discord-server-status.js +++ b/squad-server/plugins/discord-server-status.js @@ -108,9 +108,11 @@ export default class DiscordServerStatus extends DiscordBaseMessageUpdater { color: color, footer: { text: COPYRIGHT_MESSAGE }, timestamp: new Date(), + // Dont use CDN for images, use raw.githubusercontent.com. + // Also not updated for 8.x properly. image: { url: this.server.currentLayer - ? `https://squad-data.nyc3.cdn.digitaloceanspaces.com/main/${this.server.currentLayer.layerid}.jpg` + ? `https://raw.githubusercontent.com/Squad-Wiki/squad-wiki-pipeline-map-data/master/completed_output/_Current%20Version/images/${this.server.currentLayer.layerid}.jpg` : undefined } };