From d1a4bd276a5e34ba40a611a2bb66c6f085504476 Mon Sep 17 00:00:00 2001 From: SeanWalsh95 Date: Tue, 22 Dec 2020 13:52:42 -0500 Subject: [PATCH 1/2] alter auto-kick-unassigned docs to be more clear --- README.md | 12 ++++++------ squad-server/plugins/auto-kick-unassigned.js | 20 ++++++++++++++------ 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index e2f209c..31e8cb4 100644 --- a/README.md +++ b/README.md @@ -213,32 +213,32 @@ The following is a list of plugins built into SquadJS, you can click their title
Unassigned - automatically removed

frequencyOfWarnings

Description
-

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

+

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

Default
30

unassignedTimer

Description
-

How long in minutes to wait before a player that is unassigned is kicked

+

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

Default
6

playerThreshold

Description
-

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

+

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

Default
93

roundStartDelay

Description
-

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

+

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

Default
15

ignoreAdmins

Description
-

Whether or not admins will be auto kicked for being unassigned

+

Default
false

ignoreWhitelist

Description
-

Whether or not players in the whitelist will be auto kicked for being unassigned

+

Default
false
diff --git a/squad-server/plugins/auto-kick-unassigned.js b/squad-server/plugins/auto-kick-unassigned.js index 74e25a5..af3e6d2 100644 --- a/squad-server/plugins/auto-kick-unassigned.js +++ b/squad-server/plugins/auto-kick-unassigned.js @@ -26,35 +26,43 @@ export default class AutoKickUnassigned extends BasePlugin { }, frequencyOfWarnings: { required: false, - description: 'How often in seconds should we warn the player about being unassigned?', + description: + 'How often in Seconds should we warn the player about being unassigned?', default: 30 }, unassignedTimer: { required: false, - description: 'How long in minutes to wait before a player that is unassigned is kicked', + description: 'How long in Minutes to wait before a unassigned player is kicked', default: 6 }, playerThreshold: { required: false, description: - 'Player count required for AutoKick to start kicking players to disable set to -1 to disable', + 'Player count required for AutoKick to start kicking players, set to -1 to disable', default: 93 }, roundStartDelay: { required: false, description: - 'Time delay in minutes from start of the round before AutoKick starts kicking again', + 'Time delay in Minutes from start of the round before AutoKick starts kicking again', default: 15 }, ignoreAdmins: { required: false, - description: 'Whether or not admins will be auto kicked for being unassigned', + description: + '', default: false }, ignoreWhitelist: { required: false, description: - 'Whether or not players in the whitelist will be auto kicked for being unassigned', + '', default: false } }; From 1dc32cb4b632702296241baf2991ea290c3fde03 Mon Sep 17 00:00:00 2001 From: SeanWalsh95 Date: Tue, 22 Dec 2020 17:12:30 -0500 Subject: [PATCH 2/2] Change config to always use Seconds --- README.md | 8 ++++---- config.json | 3 ++- squad-server/plugins/auto-kick-unassigned.js | 12 ++++++------ 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 31e8cb4..23a2be6 100644 --- a/README.md +++ b/README.md @@ -218,9 +218,9 @@ The following is a list of plugins built into SquadJS, you can click their title
30

unassignedTimer

Description
-

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

+

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

Default
-
6
+
360

playerThreshold

Description

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

@@ -228,9 +228,9 @@ The following is a list of plugins built into SquadJS, you can click their title
93

roundStartDelay

Description
-

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

+

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

Default
-
15
+
900

ignoreAdmins

Description

diff --git a/config.json b/config.json index 7875960..e153f63 100644 --- a/config.json +++ b/config.json @@ -71,8 +71,9 @@ "kickMessage": "Unassigned - automatically removed", "frequencyOfWarnings": 30, "unassignedTimer": 6, + "unassignedTimer": 360, "playerThreshold": 93, - "roundStartDelay": 15, + "roundStartDelay": 900, "ignoreAdmins": false, "ignoreWhitelist": false }, diff --git a/squad-server/plugins/auto-kick-unassigned.js b/squad-server/plugins/auto-kick-unassigned.js index af3e6d2..26812e9 100644 --- a/squad-server/plugins/auto-kick-unassigned.js +++ b/squad-server/plugins/auto-kick-unassigned.js @@ -32,8 +32,8 @@ export default class AutoKickUnassigned extends BasePlugin { }, unassignedTimer: { required: false, - description: 'How long in Minutes to wait before a unassigned player is kicked', - default: 6 + description: 'How long in Seconds to wait before a unassigned player is kicked', + default: 360 }, playerThreshold: { required: false, @@ -44,8 +44,8 @@ export default class AutoKickUnassigned extends BasePlugin { roundStartDelay: { required: false, description: - 'Time delay in Minutes from start of the round before AutoKick starts kicking again', - default: 15 + 'Time delay in Seconds from start of the round before AutoKick starts kicking again', + default: 900 }, ignoreAdmins: { required: false, @@ -85,9 +85,9 @@ export default class AutoKickUnassigned extends BasePlugin { this.admins = server.getAdminsWithPermission('canseeadminchat'); this.whitelist = server.getAdminsWithPermission('reserve'); - this.kickTimeout = options.unassignedTimer * 60 * 1000; + this.kickTimeout = options.unassignedTimer * 1000; this.warningInterval = options.frequencyOfWarnings * 1000; - this.gracePeriod = options.roundStartDelay * 60 * 1000; + this.gracePeriod = options.roundStartDelay * 1000; this.trackingListUpdateFrequency = 1 * 60 * 1000; // 1min this.cleanUpFrequency = 20 * 60 * 1000; // 20min