STORM-1980/1983 Add time to region restarting message
parent
caaaa1e5e6
commit
ceb15e6ede
|
|
@ -5748,7 +5748,6 @@ bool handle_special_notification(std::string notificationID, LLSD& llsdBlock)
|
|||
std::string regionMaturity = LLViewerRegion::accessToString(regionAccess);
|
||||
LLStringUtil::toLower(regionMaturity);
|
||||
llsdBlock["REGIONMATURITY"] = regionMaturity;
|
||||
|
||||
bool returnValue = false;
|
||||
LLNotificationPtr maturityLevelNotification;
|
||||
std::string notifySuffix = "_Notify";
|
||||
|
|
@ -5918,6 +5917,7 @@ bool attempt_standard_notification(LLMessageSystem* msgsystem)
|
|||
(notificationID == "RegionEntryAccessBlocked") ||
|
||||
(notificationID == "LandClaimAccessBlocked") ||
|
||||
(notificationID == "LandBuyAccessBlocked")
|
||||
|
||||
)
|
||||
{
|
||||
/*---------------------------------------------------------------------
|
||||
|
|
@ -5959,7 +5959,23 @@ bool attempt_standard_notification(LLMessageSystem* msgsystem)
|
|||
snap_filename += SCREEN_HOME_FILENAME;
|
||||
gViewerWindow->saveSnapshot(snap_filename, gViewerWindow->getWindowWidthRaw(), gViewerWindow->getWindowHeightRaw(), FALSE, FALSE);
|
||||
}
|
||||
|
||||
|
||||
if (notificationID == "RegionRestartMinutes" ||
|
||||
notificationID == "RegionRestartSeconds")
|
||||
{
|
||||
// Get current UTC time, adjusted for the user's clock
|
||||
// being off.
|
||||
time_t utc_time;
|
||||
utc_time = time_corrected();
|
||||
std::string timeStr = LLTrans::getString("ViewerMessageTime");
|
||||
LLSD substitution;
|
||||
substitution["datetime"] = (S32) utc_time;
|
||||
LLStringUtil::format(timeStr, substitution);
|
||||
llsdBlock["TIME"] = timeStr;
|
||||
|
||||
send_sound_trigger(LLUUID(gSavedSettings.getString("UISndAlert")), 1.0f);
|
||||
}
|
||||
|
||||
LLNotificationsUtil::add(notificationID, llsdBlock);
|
||||
return true;
|
||||
}
|
||||
|
|
@ -6019,7 +6035,6 @@ void process_alert_message(LLMessageSystem *msgsystem, void **user_data)
|
|||
|
||||
std::string message;
|
||||
msgsystem->getStringFast(_PREHASH_AlertData, _PREHASH_Message, message);
|
||||
|
||||
process_special_alert_messages(message);
|
||||
|
||||
if (!attempt_standard_notification(msgsystem))
|
||||
|
|
@ -6043,7 +6058,6 @@ bool handle_not_age_verified_alert(const std::string &pAlertName)
|
|||
bool handle_special_alerts(const std::string &pAlertName)
|
||||
{
|
||||
bool isHandled = false;
|
||||
|
||||
if (LLStringUtil::compareStrings(pAlertName, "NotAgeVerified") == 0)
|
||||
{
|
||||
|
||||
|
|
@ -6079,28 +6093,10 @@ void process_alert_core(const std::string& message, BOOL modal)
|
|||
// System message is important, show in upper-right box not tip
|
||||
std::string text(message.substr(1));
|
||||
LLSD args;
|
||||
if (text.substr(0,17) == "RESTART_X_MINUTES")
|
||||
{
|
||||
S32 mins = 0;
|
||||
LLStringUtil::convertToS32(text.substr(18), mins);
|
||||
args["MINUTES"] = llformat("%d",mins);
|
||||
LLNotificationsUtil::add("RegionRestartMinutes", args);
|
||||
send_sound_trigger(LLUUID(gSavedSettings.getString("UISndAlert")), 1.0f);
|
||||
}
|
||||
else if (text.substr(0,17) == "RESTART_X_SECONDS")
|
||||
{
|
||||
S32 secs = 0;
|
||||
LLStringUtil::convertToS32(text.substr(18), secs);
|
||||
args["SECONDS"] = llformat("%d",secs);
|
||||
LLNotificationsUtil::add("RegionRestartSeconds", args);
|
||||
send_sound_trigger(LLUUID(gSavedSettings.getString("UISndAlert")), 1.0f);
|
||||
}
|
||||
else
|
||||
{
|
||||
std::string new_msg =LLNotifications::instance().getGlobalString(text);
|
||||
args["MESSAGE"] = new_msg;
|
||||
LLNotificationsUtil::add("SystemMessage", args);
|
||||
}
|
||||
|
||||
std::string new_msg =LLNotifications::instance().getGlobalString(text);
|
||||
args["MESSAGE"] = new_msg;
|
||||
LLNotificationsUtil::add("SystemMessage", args);
|
||||
}
|
||||
else if (modal)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -6887,7 +6887,7 @@ This will add a bookmark in your inventory so you can quickly IM this Resident.
|
|||
priority="high"
|
||||
sound="UISndAlert"
|
||||
type="notify">
|
||||
This region will restart in [MINUTES] minutes.
|
||||
[TIME] This region will restart in [MINUTES] minutes.
|
||||
If you stay in this region you will be logged out.
|
||||
</notification>
|
||||
|
||||
|
|
@ -6897,7 +6897,7 @@ If you stay in this region you will be logged out.
|
|||
priority="high"
|
||||
sound="UISndAlert"
|
||||
type="notify">
|
||||
This region will restart in [SECONDS] seconds.
|
||||
[TIME] This region will restart in [SECONDS] seconds.
|
||||
If you stay in this region you will be logged out.
|
||||
</notification>
|
||||
|
||||
|
|
|
|||
|
|
@ -2551,6 +2551,9 @@ Drag folders to this area and click "Send to Marketplace" to list them for sale
|
|||
<!-- panel preferences general -->
|
||||
<string name="DoNotDisturbModeResponseDefault">This resident has turned on 'Do Not Disturb' and will see your message later.</string>
|
||||
|
||||
<!-- viewermessage -->
|
||||
<string name="ViewerMessageTime">[hour12, datetime, slt]:[min, datetime, slt] [ampm, datetime, slt] [timezone,datetime, slt]</string>
|
||||
|
||||
<!-- Mute -->
|
||||
<string name="MuteByName">(By name)</string>
|
||||
<string name="MuteAgent">(Resident)</string>
|
||||
|
|
|
|||
Loading…
Reference in New Issue