Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move DisableRejoinAtMaxPlayers from Settings to Variables #1634

Merged
merged 6 commits into from
Oct 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions Loader/Config/Settings.luau
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,6 @@ settings.AutoClean = false -- Will auto clean workspace of things li
settings.AutoCleanDelay = 60 -- Time between auto cleans
settings.AutoBackup = false -- Run :backupmap automatically when the server starts. To restore the map, run :restoremap
settings.ReJail = false -- If true then when a player rejoins they'll go back into jail. Or if the moderator leaves everybody gets unjailed
settings.DisableRejoinAtMaxPlayers = false -- If true, disables rejoin when max players is reached to avoid an exploit that allows more players than the max amount.

settings.Console = true -- Whether the command console is enabled
settings.Console_AdminsOnly = false -- If true, only admins will be able to access the console
Expand Down Expand Up @@ -474,7 +473,6 @@ descs.SongHint = [[ Display a hint with the current song name and ID when a song
descs.TopBarShift = [[ By default hints and notifs will appear from the top edge of the window. Set this to true if you don't want hints/notifications to appear in that region. ]]
descs.DefaultTheme = [[ Theme to be used as a replacement for "Default". The new replacement theme can still use "Default" as its Base_Theme however any other theme that references "Default" as its redirects to this theme. ]]
descs.ReJail = [[ If true then when a player rejoins they'll go back into jail. Or if the moderator leaves everybody gets unjailed ]]
descs.DisableRejoinAtMaxPlayers = [[ If true, disables rejoin when max players is reached to avoid an exploit that allows more players than the max amount. ]]

descs.Messages = [[ A list of notification messages to show HeadAdmins and above on join ]]

Expand Down Expand Up @@ -592,7 +590,6 @@ order = {
"TopBarShift";
"DefaultTheme";
"ReJail";
"DisableRejoinAtMaxPlayers";
"";
"AutoClean";
"AutoCleanDelay";
Expand Down
2 changes: 1 addition & 1 deletion MainModule/Server/Commands/Players.luau
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ return function(Vargs, env)
NoStudio = true; -- Commands which cannot be used in Roblox Studio (e.g. commands which use TeleportService)
AdminLevel = "Players";
Function = function(plr: Player, args: {string})
assert(#(service.Players:GetPlayers()) < service.Players.MaxPlayers or not Settings.DisableRejoinAtMaxPlayers, "Cannot rejoin while server is at max capacity.")
assert(#(service.Players:GetPlayers()) < service.Players.MaxPlayers or not Variables.DisableRejoinAtMaxPlayers, "Cannot rejoin while server is at max capacity.")
service.TeleportService:TeleportAsync(game.PlaceId, {plr}, service.New("TeleportOptions", {
ServerInstanceId = game.JobId
}))
Expand Down
2 changes: 2 additions & 0 deletions MainModule/Server/Core/Variables.luau
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ return function(Vargs, GetEnv)

Variables.BanMessage = Settings.BanMessage
Variables.LockMessage = Settings.LockMessage
Variables.DisableRejoinAtMaxPlayers = Settings.DisableRejoinAtMaxPlayers or Variables.DisableRejoinAtMaxPlayers

for _, v in Settings.MusicList or {} do table.insert(Variables.MusicList, v) end
for _, v in Settings.InsertList or {} do table.insert(Variables.InsertList, v) end
Expand Down Expand Up @@ -67,6 +68,7 @@ return function(Vargs, GetEnv)
WebPanel_Initiated = false,
HTTPCheckUrl = "https://www.google.com/humans.txt",
IPInfoUrl = "https://ipinfo.io/json",
DisableRejoinAtMaxPlayers = false,
AnimatedFaces = {
-- R15 (Hopefully)
14719428401, 12936561806, 12936887700, 12937016609, 12937135097, 12939014597, 12945364777, 12945456452, 14374800823, 14367118483, 13674780763,
Expand Down
3 changes: 0 additions & 3 deletions MainModule/Server/Dependencies/DefaultSettings.luau
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,6 @@ settings.AutoClean = false -- Will auto clean workspace of things li
settings.AutoCleanDelay = 60 -- Time between auto cleans
settings.AutoBackup = false -- Run :backupmap automatically when the server starts. To restore the map, run :restoremap
settings.ReJail = false -- If true then when a player rejoins they'll go back into jail. Or if the moderator leaves everybody gets unjailed
settings.DisableRejoinAtMaxPlayers = false -- If true, disables rejoin when max players is reached to avoid an exploit that allows more players than the max amount.

settings.Console = true -- Whether the command console is enabled
settings.Console_AdminsOnly = false -- If true, only admins will be able to access the console
Expand Down Expand Up @@ -474,7 +473,6 @@ descs.CodeExecution = [[ Enables the use of code execution in Adonis; Scripting
descs.SongHint = [[ Display a hint with the current song name and ID when a song is played via :music ]]
descs.TopBarShift = [[ By default hints and notifs will appear from the top edge of the window. Set this to true if you don't want hints/notifications to appear in that region. ]]
descs.ReJail = [[ If true then when a player rejoins they'll go back into jail. Or if the moderator leaves everybody gets unjailed ]]
descs.DisableRejoinAtMaxPlayers = [[ If true, disables rejoin when max players is reached to avoid an exploit that allows more players than the max amount. ]]

descs.Messages = [[ A list of notification messages to show HeadAdmins and above on join ]]

Expand Down Expand Up @@ -592,7 +590,6 @@ order = {
"SongHint";
"TopBarShift";
"ReJail";
"DisableRejoinAtMaxPlayers";
"";
"AutoClean";
"AutoCleanDelay";
Expand Down
Loading