[Follow] Automatically accept Teleport Requests/Offers from the leader

This commit is contained in:
Liru Færs
2020-01-13 02:20:33 -05:00
parent 34e0c722e7
commit 2ace698101

View File

@@ -3211,13 +3211,15 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
((IM_TELEPORT_REQUEST == dialog) && (RlvActions::autoAcceptTeleportRequest(from_id))) ); ((IM_TELEPORT_REQUEST == dialog) && (RlvActions::autoAcceptTeleportRequest(from_id))) );
// [/RLVa:KB] // [/RLVa:KB]
if (is_muted) bool following = gAgent.getAutoPilotLeaderID() == from_id;
if (!following && is_muted)
{ {
return; return;
} }
// else if (is_do_not_disturb) // else if (!following && is_do_not_disturb)
// [RLVa:KB] - Checked: 2013-11-08 (RLVa-1.4.9) // [RLVa:KB] - Checked: 2013-11-08 (RLVa-1.4.9)
else if ( (is_do_not_disturb) && (!fRlvAutoAccept) ) else if (!following && is_do_not_disturb && !fRlvAutoAccept )
// [/RLVa:KB] // [/RLVa:KB]
{ {
send_do_not_disturb_message(msg, from_id); send_do_not_disturb_message(msg, from_id);
@@ -3344,10 +3346,14 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
} }
*/ */
LLNotification::Params params(IM_LURE_USER == dialog ? "TeleportOffered" : "TeleportRequest"); LLNotification::Params params(IM_LURE_USER == dialog ? "TeleportOffered" : "TeleportRequest");
params.substitutions = args; params.substitutions = args;
params.payload = payload; params.payload = payload;
if (following)
{
LLNotifications::instance().forceResponse(LLNotification::Params(params.name).payload(payload), 0);
}
else
// [RLVa:KB] - Checked: 20103-11-08 (RLVa-1.4.9) // [RLVa:KB] - Checked: 20103-11-08 (RLVa-1.4.9)
if ( (rlv_handler_t::isEnabled()) && (fRlvAutoAccept) ) if ( (rlv_handler_t::isEnabled()) && (fRlvAutoAccept) )
{ {