message: Only execute the script when the server is running a module
diff: #include "API/CAppManager.hpp"
  #include "API/CExoString.hpp"
  +#include "API/CServerExoApp.hpp"
  #include "API/Constants.hpp"
  #include "API/Functions.hpp"
  #include "API/Globals.hpp"
  @@ -352,10 +353,13 @@ void NWNXCore::CreateServerHandler(API::CAppManager* app)
  void NWNXCore::DestroyServerHandler(API::CAppManager* app)
  {
  if (auto shutdownScript = g_core->m_coreServices->m_config->Get<std::string>("SHUTDOWN_SCRIPT"))
  + {
  + if (API::Globals::AppManager()->m_pServerExoApp->GetServerMode() == 2)
  {
  LOG_NOTICE("Running module shutdown script: %s", shutdownScript->c_str());
  Utils::ExecuteScript(*shutdownScript, 0);
  }
  + }
  LOG_NOTICE("Shutting down NWNX.");
  g_core->Shutdown();
  