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

Make cleanup and oldlogs saving respect silentstartup #1714

Merged
merged 2 commits into from
Nov 17, 2024
Merged
Changes from 1 commit
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
Next Next commit
Make cleanup respect silentstartup
  • Loading branch information
ccuser44 authored Nov 13, 2024
commit c54aad9cf0a4e59958d9300d9a71aa302b78de40
9 changes: 7 additions & 2 deletions MainModule/Server/Server.luau
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,10 @@ local function LoadPackage(package, folder, runNow)
end;

local function CleanUp(reason)
print(`Beginning Adonis cleanup & shutdown process due to {reason}...`)
if not server.Data or not server.Data.SilentStartup then
print(`Beginning Adonis cleanup & shutdown process due to {reason}...`)
end

local data = service.UnWrap(server.Data)
if type(data) == "table" and typeof(service.UnWrap(data.Config)) == "Instance" then
local Settings: ModuleScript = service.UnWrap(data.Config):FindFirstChild("Settings")
Expand Down Expand Up @@ -277,7 +280,9 @@ local function CleanUp(reason)
pcall(server.Core.DisconnectEvent)
end

print("Unloading complete")
if not server.Data or not server.Data.SilentStartup then
print("Unloading complete")
end
end;

server = {
Expand Down
Loading