new ServerManager()
Extends
Members
-
clientRCONClient
-
Methods
-
inherited _validateParameter(value, name, conditions)
-
Checks if a parameter satisfies specific conditions.
Name Type Description valueany The actual value of the parameter.
namestring The name of the parameter.
conditionsObject optional Conditions to be met.
Name Type Default Description definedboolean true optional Parameter must not be null or undefined.
nonEmptyStringboolean true optional Parameter must be a non-empty string.
positiveIntegerboolean false optional Parameter must be a positive integer.
integerboolean false optional Parameter must be an integer.
booleanboolean false optional Parameter must be a boolean.
-
inherited _validateResponse(response, additionalErrors){Object}
-
Validates RCON response by checking status code.
Name Type Description responseResponseMessage additionalErrorsObject Throws:
ErrorReturns:
Type Description Object -
asyncaddBannedWords(words){Promise.<void>}
-
Adds a word to the banned words list.
Name Type Description wordsArray.<string> Returns:
Type Description Promise.<void> -
asyncfetchAutoBalanceEnabled(){Promise.<boolean>}
-
Fetches the auto balance on/off status.
Returns:
Type Description Promise.<boolean> -
asyncfetchAutoBalanceThreshold(){Promise.<number>}
-
Fetches the auto balance threshold.
Returns:
Type Description Promise.<number> -
asyncfetchBannedWordsList(){Promise.<Array.<string>>}
-
Fetches all banned words.
Returns:
Type Description Promise.<Array.<string>> -
asyncfetchChangelist(){Promise.<string>}
-
Fetches the server changelist number.
Returns:
Type Description Promise.<string> -
asyncfetchConfig(){Promise.<ServerConfiguration>}
-
Fetches the server configuration.
Returns:
Type Description Promise.<ServerConfiguration> -
asyncfetchHighPingThreshold(){Promise.<number>}
-
Fetches the high ping threshold in milliseconds.
Returns:
Type Description Promise.<number> -
asyncfetchIdleKickDuration(){Promise.<number>}
-
Fetches the idle kick duration in minutes.
Returns:
Type Description Promise.<number> -
asyncfetchTeamSwitchCooldown(){Promise.<number>}
-
Fetches the team switch cooldown in minutes.
Returns:
Type Description Promise.<number> -
asyncfetchVoteKickEnabled(){Promise.<boolean>}
-
Fetches if vote kick is enabled.
Returns:
Type Description Promise.<boolean> -
asyncfetchVoteKickThresholds(){Promise.<void>}
-
Fetches the vote kick thresholds.
Returns:
Type Description Promise.<void> -
asyncremoveBannedWords(words){Promise.<void>}
-
Removes banned words from the server ban list.
Name Type Description wordsArray.<string> Returns:
Type Description Promise.<void> -
asyncremoveMatchTimer(gamemode){Promise.<void>}
-
Removes a custom timer for a gamemode.
Name Type Description gamemode"Warfare" | "Offensive" | "Skirmish" Returns:
Type Description Promise.<void> -
asyncremoveWarmupTimer(gamemode){Promise.<void>}
-
Removes a custom warmup timer for a gamemode.
Name Type Description gamemode"Warfare" | "Offensive" | "Skirmish" Returns:
Type Description Promise.<void> -
asyncresetVoteKickThresholds(){Promise.<void>}
-
Resets vote kick thresholds to an empty list.
Returns:
Type Description Promise.<void> -
asyncsetAutoBalanceEnabled(enable){Promise.<void>}
-
Enables/Disables auto balance.
Name Type Description enableboolean Returns:
Type Description Promise.<void> -
asyncsetAutoBalanceThreshold(threshold){Promise.<void>}
-
Set the threshold for auto balance to take effect.
Name Type Description thresholdnumber Player difference
Returns:
Type Description Promise.<void> -
asyncsetHighPingThreshold(threshold){Promise.<void>}
-
Sets high ping threshold.
Name Type Description thresholdnumber Threshold in milliseconds
Returns:
Type Description Promise.<void> -
asyncsetIdleKickDuration(duration){Promise.<void>}
-
Sets the idle kick duration.
Name Type Description durationnumber The duration in minutes.
Returns:
Type Description Promise.<void> -
asyncsetMatchTimer(gamemode, duration){Promise.<void>}
-
Set the match timer for gamemodes.
Name Type Description gamemode"Warfare" | "Offensive" | "Skirmish" durationnumber Duration in minutes
Returns:
Type Description Promise.<void> -
asyncsetMaxQueuedPlayers(count){Promise.<void>}
-
Sets the maximum queue count.
Name Type Description countnumber Between 1 and 6
Returns:
Type Description Promise.<void> -
asyncsetTeamSwitchCooldown(cooldown){Promise.<void>}
-
Set the team switch cooldown.
Name Type Description cooldownnumber Cooldown in minutes.
Returns:
Type Description Promise.<void> -
asyncsetVipSlotCount(count){Promise.<void>}
-
Sets the VIP slot count.
Name Type Description countnumber Returns:
Type Description Promise.<void> -
asyncsetVoteKickEnabled(enable){Promise.<void>}
-
Enables/disables vote kick.
Name Type Description enableboolean Returns:
Type Description Promise.<void> -
asyncsetVoteKickThresholds(thresholds){Promise.<void>}
-
Sets the vote kick thresholds.
Name Type Description thresholdsArray.<{playerCount: number, voteThreshold: number}> Array of threshold objects.
Returns:
Type Description Promise.<void> -
asyncsetWarmupTimer(gamemode, length){Promise.<void>}
-
Set the match timer for gamemodes.
Name Type Description gamemode"Warfare" | "Offensive" | "Skirmish" lengthnumber Length in minutes between 1 and 10
Returns:
Type Description Promise.<void> -
asyncsetWelcomeMessage(message){Promise.<void>}
-
Sets the welcome message for the server.
Name Type Description messagestring optional Returns:
Type Description Promise.<void>