chore: added IP logging on player connected event

This commit is contained in:
Fantino Davide 2023-12-30 22:59:27 +01:00
parent 08bf6a4e6a
commit 527411f808
3 changed files with 504 additions and 504 deletions

812
README.md
View File

@ -201,214 +201,6 @@ 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)
<details>
<summary>SeedingMode</summary>
<h2>SeedingMode</h2>
<p>The <code>SeedingMode</code> 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.</p>
<h3>Options</h3>
<ul><li><h4>interval</h4>
<h6>Description</h6>
<p>Frequency of seeding messages in milliseconds.</p>
<h6>Default</h6>
<pre><code>150000</code></pre></li>
<li><h4>seedingThreshold</h4>
<h6>Description</h6>
<p>Player count required for server not to be in seeding mode.</p>
<h6>Default</h6>
<pre><code>50</code></pre></li>
<li><h4>seedingMessage</h4>
<h6>Description</h6>
<p>Seeding message to display.</p>
<h6>Default</h6>
<pre><code>Seeding Rules Active! Fight only over the middle flags! No FOB Hunting!</code></pre></li>
<li><h4>liveEnabled</h4>
<h6>Description</h6>
<p>Enable "Live" messages for when the server goes live.</p>
<h6>Default</h6>
<pre><code>true</code></pre></li>
<li><h4>liveThreshold</h4>
<h6>Description</h6>
<p>Player count required for "Live" messages to not bee displayed.</p>
<h6>Default</h6>
<pre><code>52</code></pre></li>
<li><h4>liveMessage</h4>
<h6>Description</h6>
<p>"Live" message to display.</p>
<h6>Default</h6>
<pre><code>Live!</code></pre></li>
<li><h4>waitOnNewGames</h4>
<h6>Description</h6>
<p>Should the plugin wait to be executed on NEW_GAME event.</p>
<h6>Default</h6>
<pre><code>true</code></pre></li>
<li><h4>waitTimeOnNewGame</h4>
<h6>Description</h6>
<p>The time to wait before check player counts in seconds.</p>
<h6>Default</h6>
<pre><code>30</code></pre></li></ul>
</details>
<details>
<summary>DiscordChat</summary>
<h2>DiscordChat</h2>
<p>The <code>DiscordChat</code> plugin will log in-game chat to a Discord channel.</p>
<h3>Options</h3>
<ul><li><h4>discordClient (Required)</h4>
<h6>Description</h6>
<p>Discord connector name.</p>
<h6>Default</h6>
<pre><code>discord</code></pre></li>
<li><h4>channelID (Required)</h4>
<h6>Description</h6>
<p>The ID of the channel to log admin broadcasts to.</p>
<h6>Default</h6>
<pre><code></code></pre></li><h6>Example</h6>
<pre><code>667741905228136459</code></pre>
<li><h4>chatColors</h4>
<h6>Description</h6>
<p>The color of the embed for each chat.</p>
<h6>Default</h6>
<pre><code>{}</code></pre></li><h6>Example</h6>
<pre><code>{
"ChatAll": 16761867
}</code></pre>
<li><h4>color</h4>
<h6>Description</h6>
<p>The color of the embed.</p>
<h6>Default</h6>
<pre><code>16761867</code></pre></li>
<li><h4>ignoreChats</h4>
<h6>Description</h6>
<p>A list of chat names to ignore.</p>
<h6>Default</h6>
<pre><code>[
"ChatSquad"
]</code></pre></li></ul>
</details>
<details>
<summary>DiscordSubsystemRestarter</summary>
<h2>DiscordSubsystemRestarter</h2>
<p>The <code>DiscordSubSystemRestarter</code> plugin allows you to manually restart SquadJS subsystems in case an issues arises with them.<ul><li><code>!squadjs restartsubsystem rcon</code></li><li><code>!squadjs restartsubsystem logparser</code></li></ul></p>
<h3>Options</h3>
<ul><li><h4>discordClient (Required)</h4>
<h6>Description</h6>
<p>Discord connector name.</p>
<h6>Default</h6>
<pre><code>discord</code></pre></li>
<li><h4>role (Required)</h4>
<h6>Description</h6>
<p>ID of role required to run the sub system restart commands.</p>
<h6>Default</h6>
<pre><code></code></pre></li><h6>Example</h6>
<pre><code>667741905228136459</code></pre></ul>
</details>
<details>
<summary>AutoTKWarn</summary>
<h2>AutoTKWarn</h2>
<p>The <code>AutoTkWarn</code> plugin will automatically warn players with a message when they teamkill.</p>
<h3>Options</h3>
<ul><li><h4>attackerMessage</h4>
<h6>Description</h6>
<p>The message to warn attacking players with.</p>
<h6>Default</h6>
<pre><code>Please apologise for ALL TKs in ALL chat!</code></pre></li>
<li><h4>victimMessage</h4>
<h6>Description</h6>
<p>The message that will be sent to the victim.</p>
<h6>Default</h6>
<pre><code>null</code></pre></li></ul>
</details>
<details>
<summary>DiscordRoundWinner</summary>
<h2>DiscordRoundWinner</h2>
<p>The <code>DiscordRoundWinner</code> plugin will send the round winner to a Discord channel.</p>
<h3>Options</h3>
<ul><li><h4>discordClient (Required)</h4>
<h6>Description</h6>
<p>Discord connector name.</p>
<h6>Default</h6>
<pre><code>discord</code></pre></li>
<li><h4>channelID (Required)</h4>
<h6>Description</h6>
<p>The ID of the channel to log admin broadcasts to.</p>
<h6>Default</h6>
<pre><code></code></pre></li><h6>Example</h6>
<pre><code>667741905228136459</code></pre>
<li><h4>color</h4>
<h6>Description</h6>
<p>The color of the embed.</p>
<h6>Default</h6>
<pre><code>16761867</code></pre></li></ul>
</details>
<details>
<summary>ChatCommands</summary>
<h2>ChatCommands</h2>
<p>The <code>ChatCommands</code> plugin can be configured to make chat commands that broadcast or warn the caller with present messages.</p>
<h3>Options</h3>
<ul><li><h4>commands</h4>
<h6>Description</h6>
<p>An array of objects containing the following properties: <ul><li><code>command</code> - The command that initiates the message.</li><li><code>type</code> - Either <code>warn</code> or <code>broadcast</code>.</li><li><code>response</code> - The message to respond with.</li><li><code>ignoreChats</code> - A list of chats to ignore the commands in. Use this to limit it to admins.</li></ul></p>
<h6>Default</h6>
<pre><code>[
{
"command": "squadjs",
"type": "warn",
"response": "This server is powered by SquadJS.",
"ignoreChats": []
}
]</code></pre></li></ul>
</details>
<details>
<summary>DiscordAdminBroadcast</summary>
<h2>DiscordAdminBroadcast</h2>
<p>The <code>DiscordAdminBroadcast</code> plugin will send a copy of admin broadcasts made in game to a Discord channel.</p>
<h3>Options</h3>
<ul><li><h4>discordClient (Required)</h4>
<h6>Description</h6>
<p>Discord connector name.</p>
<h6>Default</h6>
<pre><code>discord</code></pre></li>
<li><h4>channelID (Required)</h4>
<h6>Description</h6>
<p>The ID of the channel to log admin broadcasts to.</p>
<h6>Default</h6>
<pre><code></code></pre></li><h6>Example</h6>
<pre><code>667741905228136459</code></pre>
<li><h4>color</h4>
<h6>Description</h6>
<p>The color of the embed.</p>
<h6>Default</h6>
<pre><code>16761867</code></pre></li></ul>
</details>
<details>
<summary>DiscordRoundEnded</summary>
<h2>DiscordRoundEnded</h2>
<p>The <code>DiscordRoundEnded</code> plugin will send the round winner to a Discord channel.</p>
<h3>Options</h3>
<ul><li><h4>discordClient (Required)</h4>
<h6>Description</h6>
<p>Discord connector name.</p>
<h6>Default</h6>
<pre><code>discord</code></pre></li>
<li><h4>channelID (Required)</h4>
<h6>Description</h6>
<p>The ID of the channel to log round end events to.</p>
<h6>Default</h6>
<pre><code></code></pre></li><h6>Example</h6>
<pre><code>667741905228136459</code></pre>
<li><h4>color</h4>
<h6>Description</h6>
<p>The color of the embed.</p>
<h6>Default</h6>
<pre><code>16761867</code></pre></li></ul>
</details>
<details>
<summary>AutoKickUnassigned</summary>
<h2>AutoKickUnassigned</h2>
@ -457,28 +249,132 @@ Interested in creating your own plugin? [See more here](./squad-server/plugins/r
</details>
<details>
<summary>SocketIOAPI</summary>
<h2>SocketIOAPI</h2>
<p>The <code>SocketIOAPI</code> plugin allows remote access to a SquadJS instance via Socket.IO<br />As a client example you can use this to connect to the socket.io server;<pre><code>
const socket = io.connect('ws://IP:PORT', {
auth: {
token: "MySecretPassword"
}
})
</code></pre>If you need more documentation about socket.io please go ahead and read the following;<br />General Socket.io documentation: <a href="https://socket.io/docs/v3" target="_blank">Socket.io Docs</a><br />Authentication and securing your websocket: <a href="https://socket.io/docs/v3/middlewares/#Sending-credentials" target="_blank">Sending-credentials</a><br />How to use, install and configure a socketIO-client: <a href="https://github.com/11TStudio/SocketIO-Examples-for-SquadJS" target="_blank">Usage Guide with Examples</a></p>
<summary>AutoTKWarn</summary>
<h2>AutoTKWarn</h2>
<p>The <code>AutoTkWarn</code> plugin will automatically warn players with a message when they teamkill.</p>
<h3>Options</h3>
<ul><li><h4>websocketPort (Required)</h4>
<ul><li><h4>attackerMessage</h4>
<h6>Description</h6>
<p>The port for the websocket.</p>
<p>The message to warn attacking players with.</p>
<h6>Default</h6>
<pre><code>Please apologise for ALL TKs in ALL chat!</code></pre></li>
<li><h4>victimMessage</h4>
<h6>Description</h6>
<p>The message that will be sent to the victim.</p>
<h6>Default</h6>
<pre><code>null</code></pre></li></ul>
</details>
<details>
<summary>CBLInfo</summary>
<h2>CBLInfo</h2>
<p>The <code>CBLInfo</code> plugin alerts admins when a harmful player is detected joining their server based on data from the <a href="https://communitybanlist.com/">Community Ban List</a>.</p>
<h3>Options</h3>
<ul><li><h4>discordClient (Required)</h4>
<h6>Description</h6>
<p>Discord connector name.</p>
<h6>Default</h6>
<pre><code>discord</code></pre></li>
<li><h4>channelID (Required)</h4>
<h6>Description</h6>
<p>The ID of the channel to alert admins through.</p>
<h6>Default</h6>
<pre><code></code></pre></li><h6>Example</h6>
<pre><code>3000</code></pre>
<li><h4>securityToken (Required)</h4>
<pre><code>667741905228136459</code></pre>
<li><h4>threshold</h4>
<h6>Description</h6>
<p>Your secret token/password for connecting.</p>
<p>Admins will be alerted when a player has this or more reputation points. For more information on reputation points, see the <a href="https://communitybanlist.com/faq">Community Ban List's FAQ</a></p>
<h6>Default</h6>
<pre><code>6</code></pre></li></ul>
</details>
<details>
<summary>ChatCommands</summary>
<h2>ChatCommands</h2>
<p>The <code>ChatCommands</code> plugin can be configured to make chat commands that broadcast or warn the caller with present messages.</p>
<h3>Options</h3>
<ul><li><h4>commands</h4>
<h6>Description</h6>
<p>An array of objects containing the following properties: <ul><li><code>command</code> - The command that initiates the message.</li><li><code>type</code> - Either <code>warn</code> or <code>broadcast</code>.</li><li><code>response</code> - The message to respond with.</li><li><code>ignoreChats</code> - A list of chats to ignore the commands in. Use this to limit it to admins.</li></ul></p>
<h6>Default</h6>
<pre><code>[
{
"command": "squadjs",
"type": "warn",
"response": "This server is powered by SquadJS.",
"ignoreChats": []
}
]</code></pre></li></ul>
</details>
<details>
<summary>DBLog</summary>
<h2>DBLog</h2>
<p>The <code>mysql-log</code> plugin will log various server statistics and events to a database. This is great for server performance monitoring and/or player stat tracking.
Grafana:
<ul><li> <a href="https://grafana.com/">Grafana</a> is a cool way of viewing server statistics stored in the database.</li>
<li>Install Grafana.</li>
<li>Add your database as a datasource named <code>SquadJS</code>.</li>
<li>Import the <a href="https://github.com/Team-Silver-Sphere/SquadJS/blob/master/squad-server/templates/SquadJS-Dashboard-v2.json">SquadJS Dashboard</a> to get a preconfigured MySQL only Grafana dashboard.</li>
<li>Install any missing Grafana plugins.</li></ul></p>
<h3>Options</h3>
<ul><li><h4>database (Required)</h4>
<h6>Description</h6>
<p>The Sequelize connector to log server information to.</p>
<h6>Default</h6>
<pre><code>mysql</code></pre></li>
<li><h4>overrideServerID</h4>
<h6>Description</h6>
<p>A overridden server ID.</p>
<h6>Default</h6>
<pre><code>null</code></pre></li></ul>
</details>
<details>
<summary>DiscordAdminBroadcast</summary>
<h2>DiscordAdminBroadcast</h2>
<p>The <code>DiscordAdminBroadcast</code> plugin will send a copy of admin broadcasts made in game to a Discord channel.</p>
<h3>Options</h3>
<ul><li><h4>discordClient (Required)</h4>
<h6>Description</h6>
<p>Discord connector name.</p>
<h6>Default</h6>
<pre><code>discord</code></pre></li>
<li><h4>channelID (Required)</h4>
<h6>Description</h6>
<p>The ID of the channel to log admin broadcasts to.</p>
<h6>Default</h6>
<pre><code></code></pre></li><h6>Example</h6>
<pre><code>MySecretPassword</code></pre></ul>
<pre><code>667741905228136459</code></pre>
<li><h4>color</h4>
<h6>Description</h6>
<p>The color of the embed.</p>
<h6>Default</h6>
<pre><code>16761867</code></pre></li></ul>
</details>
<details>
<summary>DiscordAdminCamLogs</summary>
<h2>DiscordAdminCamLogs</h2>
<p>The <code>DiscordAdminCamLogs</code> plugin will log in game admin camera usage to a Discord channel.</p>
<h3>Options</h3>
<ul><li><h4>discordClient (Required)</h4>
<h6>Description</h6>
<p>Discord connector name.</p>
<h6>Default</h6>
<pre><code>discord</code></pre></li>
<li><h4>channelID (Required)</h4>
<h6>Description</h6>
<p>The ID of the channel to log admin camera usage to.</p>
<h6>Default</h6>
<pre><code></code></pre></li><h6>Example</h6>
<pre><code>667741905228136459</code></pre>
<li><h4>color</h4>
<h6>Description</h6>
<p>The color of the embed.</p>
<h6>Default</h6>
<pre><code>16761867</code></pre></li></ul>
</details>
<details>
@ -549,15 +445,90 @@ Interested in creating your own plugin? [See more here](./squad-server/plugins/r
</details>
<details>
<summary>TeamRandomizer</summary>
<h2>TeamRandomizer</h2>
<p>The <code>TeamRandomizer</code> 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, <code>!randomize</code> into in-game admin chat</p>
<summary>DiscordChat</summary>
<h2>DiscordChat</h2>
<p>The <code>DiscordChat</code> plugin will log in-game chat to a Discord channel.</p>
<h3>Options</h3>
<ul><li><h4>command</h4>
<ul><li><h4>discordClient (Required)</h4>
<h6>Description</h6>
<p>The command used to randomize the teams.</p>
<p>Discord connector name.</p>
<h6>Default</h6>
<pre><code>randomize</code></pre></li></ul>
<pre><code>discord</code></pre></li>
<li><h4>channelID (Required)</h4>
<h6>Description</h6>
<p>The ID of the channel to log admin broadcasts to.</p>
<h6>Default</h6>
<pre><code></code></pre></li><h6>Example</h6>
<pre><code>667741905228136459</code></pre>
<li><h4>chatColors</h4>
<h6>Description</h6>
<p>The color of the embed for each chat.</p>
<h6>Default</h6>
<pre><code>{}</code></pre></li><h6>Example</h6>
<pre><code>{
"ChatAll": 16761867
}</code></pre>
<li><h4>color</h4>
<h6>Description</h6>
<p>The color of the embed.</p>
<h6>Default</h6>
<pre><code>16761867</code></pre></li>
<li><h4>ignoreChats</h4>
<h6>Description</h6>
<p>A list of chat names to ignore.</p>
<h6>Default</h6>
<pre><code>[
"ChatSquad"
]</code></pre></li></ul>
</details>
<details>
<summary>DiscordDebug</summary>
<h2>DiscordDebug</h2>
<p>The <code>DiscordDebug</code> plugin can be used to help debug SquadJS by dumping SquadJS events to a Discord channel.</p>
<h3>Options</h3>
<ul><li><h4>discordClient (Required)</h4>
<h6>Description</h6>
<p>Discord connector name.</p>
<h6>Default</h6>
<pre><code>discord</code></pre></li>
<li><h4>channelID (Required)</h4>
<h6>Description</h6>
<p>The ID of the channel to log events to.</p>
<h6>Default</h6>
<pre><code></code></pre></li><h6>Example</h6>
<pre><code>667741905228136459</code></pre>
<li><h4>events (Required)</h4>
<h6>Description</h6>
<p>A list of events to dump.</p>
<h6>Default</h6>
<pre><code>[]</code></pre></li><h6>Example</h6>
<pre><code>[
"PLAYER_DIED"
]</code></pre></ul>
</details>
<details>
<summary>DiscordFOBHABExplosionDamage</summary>
<h2>DiscordFOBHABExplosionDamage</h2>
<p>The <code>DiscordFOBHABExplosionDamage</code> plugin logs damage done to FOBs and HABs by explosions to help identify engineers blowing up friendly FOBs and HABs.</p>
<h3>Options</h3>
<ul><li><h4>discordClient (Required)</h4>
<h6>Description</h6>
<p>Discord connector name.</p>
<h6>Default</h6>
<pre><code>discord</code></pre></li>
<li><h4>channelID (Required)</h4>
<h6>Description</h6>
<p>The ID of the channel to log FOB/HAB explosion damage to.</p>
<h6>Default</h6>
<pre><code></code></pre></li><h6>Example</h6>
<pre><code>667741905228136459</code></pre>
<li><h4>color</h4>
<h6>Description</h6>
<p>The color of the embeds.</p>
<h6>Default</h6>
<pre><code>16761867</code></pre></li></ul>
</details>
<details>
@ -589,99 +560,25 @@ Interested in creating your own plugin? [See more here](./squad-server/plugins/r
</details>
<details>
<summary>DiscordAdminCamLogs</summary>
<h2>DiscordAdminCamLogs</h2>
<p>The <code>DiscordAdminCamLogs</code> plugin will log in game admin camera usage to a Discord channel.</p>
<summary>DiscordPlaceholder</summary>
<h2>DiscordPlaceholder</h2>
<p>The <code>DiscordPlaceholder</code> plugin allows you to make your bot create placeholder messages that can be used when configuring other plugins.</p>
<h3>Options</h3>
<ul><li><h4>discordClient (Required)</h4>
<h6>Description</h6>
<p>Discord connector name.</p>
<h6>Default</h6>
<pre><code>discord</code></pre></li>
<li><h4>command</h4>
<h6>Description</h6>
<p>Command to create Discord placeholder.</p>
<h6>Default</h6>
<pre><code>!placeholder</code></pre></li>
<li><h4>channelID (Required)</h4>
<h6>Description</h6>
<p>The ID of the channel to log admin camera usage to.</p>
<p>The bot will only answer with a placeholder on this channel</p>
<h6>Default</h6>
<pre><code></code></pre></li><h6>Example</h6>
<pre><code>667741905228136459</code></pre>
<li><h4>color</h4>
<h6>Description</h6>
<p>The color of the embed.</p>
<h6>Default</h6>
<pre><code>16761867</code></pre></li></ul>
</details>
<details>
<summary>DBLog</summary>
<h2>DBLog</h2>
<p>The <code>mysql-log</code> plugin will log various server statistics and events to a database. This is great for server performance monitoring and/or player stat tracking.
Grafana:
<ul><li> <a href="https://grafana.com/">Grafana</a> is a cool way of viewing server statistics stored in the database.</li>
<li>Install Grafana.</li>
<li>Add your database as a datasource named <code>SquadJS</code>.</li>
<li>Import the <a href="https://github.com/Team-Silver-Sphere/SquadJS/blob/master/squad-server/templates/SquadJS-Dashboard-v2.json">SquadJS Dashboard</a> to get a preconfigured MySQL only Grafana dashboard.</li>
<li>Install any missing Grafana plugins.</li></ul></p>
<h3>Options</h3>
<ul><li><h4>database (Required)</h4>
<h6>Description</h6>
<p>The Sequelize connector to log server information to.</p>
<h6>Default</h6>
<pre><code>mysql</code></pre></li>
<li><h4>overrideServerID</h4>
<h6>Description</h6>
<p>A overridden server ID.</p>
<h6>Default</h6>
<pre><code>null</code></pre></li></ul>
</details>
<details>
<summary>CBLInfo</summary>
<h2>CBLInfo</h2>
<p>The <code>CBLInfo</code> plugin alerts admins when a harmful player is detected joining their server based on data from the <a href="https://communitybanlist.com/">Community Ban List</a>.</p>
<h3>Options</h3>
<ul><li><h4>discordClient (Required)</h4>
<h6>Description</h6>
<p>Discord connector name.</p>
<h6>Default</h6>
<pre><code>discord</code></pre></li>
<li><h4>channelID (Required)</h4>
<h6>Description</h6>
<p>The ID of the channel to alert admins through.</p>
<h6>Default</h6>
<pre><code></code></pre></li><h6>Example</h6>
<pre><code>667741905228136459</code></pre>
<li><h4>threshold</h4>
<h6>Description</h6>
<p>Admins will be alerted when a player has this or more reputation points. For more information on reputation points, see the <a href="https://communitybanlist.com/faq">Community Ban List's FAQ</a></p>
<h6>Default</h6>
<pre><code>6</code></pre></li></ul>
</details>
<details>
<summary>DiscordDebug</summary>
<h2>DiscordDebug</h2>
<p>The <code>DiscordDebug</code> plugin can be used to help debug SquadJS by dumping SquadJS events to a Discord channel.</p>
<h3>Options</h3>
<ul><li><h4>discordClient (Required)</h4>
<h6>Description</h6>
<p>Discord connector name.</p>
<h6>Default</h6>
<pre><code>discord</code></pre></li>
<li><h4>channelID (Required)</h4>
<h6>Description</h6>
<p>The ID of the channel to log events to.</p>
<h6>Default</h6>
<pre><code></code></pre></li><h6>Example</h6>
<pre><code>667741905228136459</code></pre>
<li><h4>events (Required)</h4>
<h6>Description</h6>
<p>A list of events to dump.</p>
<h6>Default</h6>
<pre><code>[]</code></pre></li><h6>Example</h6>
<pre><code>[
"PLAYER_DIED"
]</code></pre></ul>
<pre><code></code></pre></li></ul>
</details>
<details>
@ -720,9 +617,9 @@ Grafana:
</details>
<details>
<summary>DiscordFOBHABExplosionDamage</summary>
<h2>DiscordFOBHABExplosionDamage</h2>
<p>The <code>DiscordFOBHABExplosionDamage</code> plugin logs damage done to FOBs and HABs by explosions to help identify engineers blowing up friendly FOBs and HABs.</p>
<summary>DiscordRoundWinner</summary>
<h2>DiscordRoundWinner</h2>
<p>The <code>DiscordRoundWinner</code> plugin will send the round winner to a Discord channel.</p>
<h3>Options</h3>
<ul><li><h4>discordClient (Required)</h4>
<h6>Description</h6>
@ -731,92 +628,7 @@ Grafana:
<pre><code>discord</code></pre></li>
<li><h4>channelID (Required)</h4>
<h6>Description</h6>
<p>The ID of the channel to log FOB/HAB explosion damage to.</p>
<h6>Default</h6>
<pre><code></code></pre></li><h6>Example</h6>
<pre><code>667741905228136459</code></pre>
<li><h4>color</h4>
<h6>Description</h6>
<p>The color of the embeds.</p>
<h6>Default</h6>
<pre><code>16761867</code></pre></li></ul>
</details>
<details>
<summary>PersistentEOSIDtoSteamID</summary>
<h2>PersistentEOSIDtoSteamID</h2>
<p>Stores into a DB every association of SteamID-EOSID</p>
<h3>Options</h3>
<ul><li><h4>database (Required)</h4>
<h6>Description</h6>
<p>The Sequelize connector.</p>
<h6>Default</h6>
<pre><code>sqlite</code></pre></li></ul>
</details>
<details>
<summary>DiscordPlaceholder</summary>
<h2>DiscordPlaceholder</h2>
<p>The <code>DiscordPlaceholder</code> plugin allows you to make your bot create placeholder messages that can be used when configuring other plugins.</p>
<h3>Options</h3>
<ul><li><h4>discordClient (Required)</h4>
<h6>Description</h6>
<p>Discord connector name.</p>
<h6>Default</h6>
<pre><code>discord</code></pre></li>
<li><h4>command</h4>
<h6>Description</h6>
<p>Command to create Discord placeholder.</p>
<h6>Default</h6>
<pre><code>!placeholder</code></pre></li>
<li><h4>channelID (Required)</h4>
<h6>Description</h6>
<p>The bot will only answer with a placeholder on this channel</p>
<h6>Default</h6>
<pre><code></code></pre></li></ul>
</details>
<details>
<summary>DiscordTeamkill</summary>
<h2>DiscordTeamkill</h2>
<p>The <code>DiscordTeamkill</code> plugin logs teamkills and related information to a Discord channel for admins to review.</p>
<h3>Options</h3>
<ul><li><h4>discordClient (Required)</h4>
<h6>Description</h6>
<p>Discord connector name.</p>
<h6>Default</h6>
<pre><code>discord</code></pre></li>
<li><h4>channelID (Required)</h4>
<h6>Description</h6>
<p>The ID of the channel to log teamkills to.</p>
<h6>Default</h6>
<pre><code></code></pre></li><h6>Example</h6>
<pre><code>667741905228136459</code></pre>
<li><h4>color</h4>
<h6>Description</h6>
<p>The color of the embeds.</p>
<h6>Default</h6>
<pre><code>16761867</code></pre></li>
<li><h4>disableCBL</h4>
<h6>Description</h6>
<p>Disable Community Ban List information.</p>
<h6>Default</h6>
<pre><code>false</code></pre></li></ul>
</details>
<details>
<summary>DiscordSquadCreated</summary>
<h2>DiscordSquadCreated</h2>
<p>The <code>SquadCreated</code> plugin will log Squad Creation events to a Discord channel.</p>
<h3>Options</h3>
<ul><li><h4>discordClient (Required)</h4>
<h6>Description</h6>
<p>Discord connector name.</p>
<h6>Default</h6>
<pre><code>discord</code></pre></li>
<li><h4>channelID (Required)</h4>
<h6>Description</h6>
<p>The ID of the channel to log Squad Creation events to.</p>
<p>The ID of the channel to log admin broadcasts to.</p>
<h6>Default</h6>
<pre><code></code></pre></li><h6>Example</h6>
<pre><code>667741905228136459</code></pre>
@ -824,12 +636,30 @@ Grafana:
<h6>Description</h6>
<p>The color of the embed.</p>
<h6>Default</h6>
<pre><code>16761867</code></pre></li>
<li><h4>useEmbed</h4>
<pre><code>16761867</code></pre></li></ul>
</details>
<details>
<summary>DiscordRoundEnded</summary>
<h2>DiscordRoundEnded</h2>
<p>The <code>DiscordRoundEnded</code> plugin will send the round winner to a Discord channel.</p>
<h3>Options</h3>
<ul><li><h4>discordClient (Required)</h4>
<h6>Description</h6>
<p>Send message as Embed</p>
<p>Discord connector name.</p>
<h6>Default</h6>
<pre><code>true</code></pre></li></ul>
<pre><code>discord</code></pre></li>
<li><h4>channelID (Required)</h4>
<h6>Description</h6>
<p>The ID of the channel to log round end events to.</p>
<h6>Default</h6>
<pre><code></code></pre></li><h6>Example</h6>
<pre><code>667741905228136459</code></pre>
<li><h4>color</h4>
<h6>Description</h6>
<p>The color of the embed.</p>
<h6>Default</h6>
<pre><code>16761867</code></pre></li></ul>
</details>
<details>
@ -869,6 +699,80 @@ Grafana:
<pre><code>true</code></pre></li></ul>
</details>
<details>
<summary>DiscordSquadCreated</summary>
<h2>DiscordSquadCreated</h2>
<p>The <code>SquadCreated</code> plugin will log Squad Creation events to a Discord channel.</p>
<h3>Options</h3>
<ul><li><h4>discordClient (Required)</h4>
<h6>Description</h6>
<p>Discord connector name.</p>
<h6>Default</h6>
<pre><code>discord</code></pre></li>
<li><h4>channelID (Required)</h4>
<h6>Description</h6>
<p>The ID of the channel to log Squad Creation events to.</p>
<h6>Default</h6>
<pre><code></code></pre></li><h6>Example</h6>
<pre><code>667741905228136459</code></pre>
<li><h4>color</h4>
<h6>Description</h6>
<p>The color of the embed.</p>
<h6>Default</h6>
<pre><code>16761867</code></pre></li>
<li><h4>useEmbed</h4>
<h6>Description</h6>
<p>Send message as Embed</p>
<h6>Default</h6>
<pre><code>true</code></pre></li></ul>
</details>
<details>
<summary>DiscordSubsystemRestarter</summary>
<h2>DiscordSubsystemRestarter</h2>
<p>The <code>DiscordSubSystemRestarter</code> plugin allows you to manually restart SquadJS subsystems in case an issues arises with them.<ul><li><code>!squadjs restartsubsystem rcon</code></li><li><code>!squadjs restartsubsystem logparser</code></li></ul></p>
<h3>Options</h3>
<ul><li><h4>discordClient (Required)</h4>
<h6>Description</h6>
<p>Discord connector name.</p>
<h6>Default</h6>
<pre><code>discord</code></pre></li>
<li><h4>role (Required)</h4>
<h6>Description</h6>
<p>ID of role required to run the sub system restart commands.</p>
<h6>Default</h6>
<pre><code></code></pre></li><h6>Example</h6>
<pre><code>667741905228136459</code></pre></ul>
</details>
<details>
<summary>DiscordTeamkill</summary>
<h2>DiscordTeamkill</h2>
<p>The <code>DiscordTeamkill</code> plugin logs teamkills and related information to a Discord channel for admins to review.</p>
<h3>Options</h3>
<ul><li><h4>discordClient (Required)</h4>
<h6>Description</h6>
<p>Discord connector name.</p>
<h6>Default</h6>
<pre><code>discord</code></pre></li>
<li><h4>channelID (Required)</h4>
<h6>Description</h6>
<p>The ID of the channel to log teamkills to.</p>
<h6>Default</h6>
<pre><code></code></pre></li><h6>Example</h6>
<pre><code>667741905228136459</code></pre>
<li><h4>color</h4>
<h6>Description</h6>
<p>The color of the embeds.</p>
<h6>Default</h6>
<pre><code>16761867</code></pre></li>
<li><h4>disableCBL</h4>
<h6>Description</h6>
<p>Disable Community Ban List information.</p>
<h6>Default</h6>
<pre><code>false</code></pre></li></ul>
</details>
<details>
<summary>FogOfWar</summary>
<h2>FogOfWar</h2>
@ -906,6 +810,102 @@ Grafana:
<pre><code>300000</code></pre></li></ul>
</details>
<details>
<summary>PersistentEOSIDtoSteamID</summary>
<h2>PersistentEOSIDtoSteamID</h2>
<p>Stores into a DB every association of SteamID-EOSID</p>
<h3>Options</h3>
<ul><li><h4>database (Required)</h4>
<h6>Description</h6>
<p>The Sequelize connector.</p>
<h6>Default</h6>
<pre><code>sqlite</code></pre></li></ul>
</details>
<details>
<summary>SeedingMode</summary>
<h2>SeedingMode</h2>
<p>The <code>SeedingMode</code> 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.</p>
<h3>Options</h3>
<ul><li><h4>interval</h4>
<h6>Description</h6>
<p>Frequency of seeding messages in milliseconds.</p>
<h6>Default</h6>
<pre><code>150000</code></pre></li>
<li><h4>seedingThreshold</h4>
<h6>Description</h6>
<p>Player count required for server not to be in seeding mode.</p>
<h6>Default</h6>
<pre><code>50</code></pre></li>
<li><h4>seedingMessage</h4>
<h6>Description</h6>
<p>Seeding message to display.</p>
<h6>Default</h6>
<pre><code>Seeding Rules Active! Fight only over the middle flags! No FOB Hunting!</code></pre></li>
<li><h4>liveEnabled</h4>
<h6>Description</h6>
<p>Enable "Live" messages for when the server goes live.</p>
<h6>Default</h6>
<pre><code>true</code></pre></li>
<li><h4>liveThreshold</h4>
<h6>Description</h6>
<p>Player count required for "Live" messages to not bee displayed.</p>
<h6>Default</h6>
<pre><code>52</code></pre></li>
<li><h4>liveMessage</h4>
<h6>Description</h6>
<p>"Live" message to display.</p>
<h6>Default</h6>
<pre><code>Live!</code></pre></li>
<li><h4>waitOnNewGames</h4>
<h6>Description</h6>
<p>Should the plugin wait to be executed on NEW_GAME event.</p>
<h6>Default</h6>
<pre><code>true</code></pre></li>
<li><h4>waitTimeOnNewGame</h4>
<h6>Description</h6>
<p>The time to wait before check player counts in seconds.</p>
<h6>Default</h6>
<pre><code>30</code></pre></li></ul>
</details>
<details>
<summary>SocketIOAPI</summary>
<h2>SocketIOAPI</h2>
<p>The <code>SocketIOAPI</code> plugin allows remote access to a SquadJS instance via Socket.IO<br />As a client example you can use this to connect to the socket.io server;<pre><code>
const socket = io.connect('ws://IP:PORT', {
auth: {
token: "MySecretPassword"
}
})
</code></pre>If you need more documentation about socket.io please go ahead and read the following;<br />General Socket.io documentation: <a href="https://socket.io/docs/v3" target="_blank">Socket.io Docs</a><br />Authentication and securing your websocket: <a href="https://socket.io/docs/v3/middlewares/#Sending-credentials" target="_blank">Sending-credentials</a><br />How to use, install and configure a socketIO-client: <a href="https://github.com/11TStudio/SocketIO-Examples-for-SquadJS" target="_blank">Usage Guide with Examples</a></p>
<h3>Options</h3>
<ul><li><h4>websocketPort (Required)</h4>
<h6>Description</h6>
<p>The port for the websocket.</p>
<h6>Default</h6>
<pre><code></code></pre></li><h6>Example</h6>
<pre><code>3000</code></pre>
<li><h4>securityToken (Required)</h4>
<h6>Description</h6>
<p>Your secret token/password for connecting.</p>
<h6>Default</h6>
<pre><code></code></pre></li><h6>Example</h6>
<pre><code>MySecretPassword</code></pre></ul>
</details>
<details>
<summary>TeamRandomizer</summary>
<h2>TeamRandomizer</h2>
<p>The <code>TeamRandomizer</code> 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, <code>!randomize</code> into in-game admin chat</p>
<h3>Options</h3>
<ul><li><h4>command</h4>
<h6>Description</h6>
<p>The command used to randomize the teams.</p>
<h6>Default</h6>
<pre><code>randomize</code></pre></li></ul>
</details>
<br>
## Statement on Accuracy

View File

@ -41,33 +41,16 @@
},
"plugins": [
{
"plugin": "SeedingMode",
"plugin": "AutoKickUnassigned",
"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": "DiscordChat",
"enabled": true,
"discordClient": "discord",
"channelID": "",
"chatColors": {},
"color": 16761867,
"ignoreChats": [
"ChatSquad"
]
},
{
"plugin": "DiscordSubsystemRestarter",
"enabled": false,
"discordClient": "discord",
"role": ""
"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",
@ -76,11 +59,11 @@
"victimMessage": null
},
{
"plugin": "DiscordRoundWinner",
"plugin": "CBLInfo",
"enabled": true,
"discordClient": "discord",
"channelID": "",
"color": 16761867
"threshold": 6
},
{
"plugin": "ChatCommands",
@ -94,6 +77,12 @@
}
]
},
{
"plugin": "DBLog",
"enabled": false,
"database": "mysql",
"overrideServerID": null
},
{
"plugin": "DiscordAdminBroadcast",
"enabled": false,
@ -102,30 +91,12 @@
"color": 16761867
},
{
"plugin": "DiscordRoundEnded",
"enabled": true,
"plugin": "DiscordAdminCamLogs",
"enabled": false,
"discordClient": "discord",
"channelID": "",
"color": 16761867
},
{
"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": "SocketIOAPI",
"enabled": false,
"websocketPort": "",
"securityToken": ""
},
{
"plugin": "DiscordAdminRequest",
"enabled": true,
@ -141,9 +112,29 @@
"showInGameAdmins": true
},
{
"plugin": "TeamRandomizer",
"plugin": "DiscordChat",
"enabled": true,
"command": "randomize"
"discordClient": "discord",
"channelID": "",
"chatColors": {},
"color": 16761867,
"ignoreChats": [
"ChatSquad"
]
},
{
"plugin": "DiscordDebug",
"enabled": false,
"discordClient": "discord",
"channelID": "",
"events": []
},
{
"plugin": "DiscordFOBHABExplosionDamage",
"enabled": true,
"discordClient": "discord",
"channelID": "",
"color": 16761867
},
{
"plugin": "DiscordKillFeed",
@ -154,31 +145,11 @@
"disableCBL": false
},
{
"plugin": "DiscordAdminCamLogs",
"enabled": false,
"discordClient": "discord",
"channelID": "",
"color": 16761867
},
{
"plugin": "DBLog",
"enabled": false,
"database": "mysql",
"overrideServerID": null
},
{
"plugin": "CBLInfo",
"plugin": "DiscordPlaceholder",
"enabled": true,
"discordClient": "discord",
"channelID": "",
"threshold": 6
},
{
"plugin": "DiscordDebug",
"enabled": false,
"discordClient": "discord",
"channelID": "",
"events": []
"command": "!placeholder",
"channelID": ""
},
{
"plugin": "DiscordRcon",
@ -189,39 +160,18 @@
"prependAdminNameInBroadcast": false
},
{
"plugin": "DiscordFOBHABExplosionDamage",
"plugin": "DiscordRoundWinner",
"enabled": true,
"discordClient": "discord",
"channelID": "",
"color": 16761867
},
{
"plugin": "PersistentEOSIDtoSteamID",
"enabled": true,
"database": "sqlite"
},
{
"plugin": "DiscordPlaceholder",
"enabled": true,
"discordClient": "discord",
"command": "!placeholder",
"channelID": ""
},
{
"plugin": "DiscordTeamkill",
"plugin": "DiscordRoundEnded",
"enabled": true,
"discordClient": "discord",
"channelID": "",
"color": 16761867,
"disableCBL": false
},
{
"plugin": "DiscordSquadCreated",
"enabled": false,
"discordClient": "discord",
"channelID": "",
"color": 16761867,
"useEmbed": true
"color": 16761867
},
{
"plugin": "DiscordServerStatus",
@ -233,6 +183,28 @@
"updateInterval": 60000,
"setBotStatus": true
},
{
"plugin": "DiscordSquadCreated",
"enabled": false,
"discordClient": "discord",
"channelID": "",
"color": 16761867,
"useEmbed": true
},
{
"plugin": "DiscordSubsystemRestarter",
"enabled": false,
"discordClient": "discord",
"role": ""
},
{
"plugin": "DiscordTeamkill",
"enabled": true,
"discordClient": "discord",
"channelID": "",
"color": 16761867,
"disableCBL": false
},
{
"plugin": "FogOfWar",
"enabled": false,
@ -244,6 +216,34 @@
"enabled": false,
"broadcasts": [],
"interval": 300000
},
{
"plugin": "PersistentEOSIDtoSteamID",
"enabled": true,
"database": "sqlite"
},
{
"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,
"websocketPort": "",
"securityToken": ""
},
{
"plugin": "TeamRandomizer",
"enabled": true,
"command": "randomize"
}
],
"logger": {

View File

@ -212,7 +212,7 @@ export default class SquadServer extends EventEmitter {
Logger.verbose(
'SquadServer',
1,
`Player connected ${data.playerSuffix} - SteamID: ${data.steamID} - EOSID: ${data.eosID}`
`Player connected ${data.playerSuffix} - SteamID: ${data.steamID} - EOSID: ${data.eosID} - IP: ${data.ip}`
);
data.player = await this.getPlayerByEOSID(data.eosID);