Always dump the modlist to discord webhook when committing the settings

This commit is contained in:
zontreck 2024-11-23 17:43:06 -07:00
parent c06176c900
commit c88065befd
3 changed files with 12 additions and 2 deletions

View file

@ -355,6 +355,16 @@ class C2SUploadSettingsPacket implements IPacket {
return PacketResponse.nil;
}
// Send a webhook with all the mods listed
String modListText = "";
for (var entry in settings.inst!.mods) {
modListText += "${entry.mod_name}\n";
}
modListText = modListText.trim();
DiscordHookHelper.sendWebHook(settings.inst!.discord,
DiscordHookProps.INACTIVE, "Mod List", modListText);
// Check if server is running, if not, stop immediately
// If server is running, schedule restart for 1 minute and send a alert to all players, then perform stop or restart depending on if running in Pterodactyl Compatibility mode
SessionData.shutdownMessage = "Server wrapper restart";