diff --git a/indra/newview/llimprocessing.cpp b/indra/newview/llimprocessing.cpp index 23f75553fb..1fb4b77094 100644 --- a/indra/newview/llimprocessing.cpp +++ b/indra/newview/llimprocessing.cpp @@ -1781,13 +1781,52 @@ void LLIMProcessing::processNewMessage(LLUUID from_id, // else { -// if (is_do_not_disturb) + // FS autoresponse feature + //if (is_do_not_disturb) + //{ + // send_do_not_disturb_message(gMessageSystem, from_id); + //} // [RLVa:KB] - Checked: RLVa-1.4.9 - if ( (is_do_not_disturb) && (!fRlvAutoAccept) ) + if (!fRlvAutoAccept) // [/RLVa:KB] { - send_do_not_disturb_message(gMessageSystem, from_id); + std::string my_name; + std::string response; + LLAgentUI::buildFullname(my_name); + if (is_do_not_disturb) + { + response = gSavedPerAccountSettings.getString("DoNotDisturbModeResponse"); + } + else if (is_autorespond_nonfriends && !is_friend) + { + response = gSavedPerAccountSettings.getString("FSAutorespondNonFriendsResponse"); + } + else if (is_autorespond) + { + response = gSavedPerAccountSettings.getString("FSAutorespondModeResponse"); + } + else if (is_afk && FSSendAwayAvatarResponse) + { + response = gSavedPerAccountSettings.getString("FSAwayAvatarResponse"); + } + + if (!response.empty()) + { + pack_instant_message( + gMessageSystem, + gAgentID, + FALSE, + gAgentSessionID, + from_id, + my_name, + response, + IM_ONLINE, + IM_DO_NOT_DISTURB_AUTO_RESPONSE, + LLUUID::null); + gAgent.sendReliableMessage(); + } } + // FS autoresponse feature LLVector3 pos, look_at; U64 region_handle(0);