From 2f573ea289fa90417263d7828cdc64bf7f9a24ce Mon Sep 17 00:00:00 2001 From: Darl Date: Wed, 14 May 2025 14:37:54 -0500 Subject: [PATCH] Add support for canceled restarts to region restart channel reporting --- indra/newview/llviewermessage.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 140d060144..91792f1848 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -6671,6 +6671,7 @@ void process_alert_core(const std::string& message, bool modal) if (text.substr(0, restart_cancelled.length()) == restart_cancelled) { LLFloaterRegionRestarting::close(); + fs_report_region_restart_to_channel(-1); // Announce region restart to a defined chat channel } std::string new_msg =LLNotifications::instance().getGlobalString(text); @@ -8729,7 +8730,14 @@ void fs_report_region_restart_to_channel(S32 seconds) msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); msg->nextBlockFast(_PREHASH_ChatData); - msg->addStringFast(_PREHASH_Message, "region_restart_in:" + llformat("%d", seconds)); + if(seconds >= 0) + { + msg->addStringFast(_PREHASH_Message, "region_restart_in:" + llformat("%d", seconds)); + } + else // Input is a negative number + { + msg->addStringFast(_PREHASH_Message, "region_restart_cancelled"); + } msg->addU8Fast(_PREHASH_Type, CHAT_TYPE_WHISPER); msg->addS32("Channel", channel); gAgent.sendReliableMessage();