summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterland.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2014-09-05 15:36:32 -0400
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2014-09-05 15:36:32 -0400
commit0621810ab1060e615f7464b0b4d1407a5abf144d (patch)
treedb461db24d4bcae9293d6167edb49955feb41bb1 /indra/newview/llfloaterland.cpp
parentdeddf0f3d97ed1ab6c8dc9f1592c5e4c4a4a273a (diff)
parentc053dbe02c301b92c151eb835f6c770b61a46859 (diff)
merge
Diffstat (limited to 'indra/newview/llfloaterland.cpp')
-rwxr-xr-xindra/newview/llfloaterland.cpp24
1 files changed, 18 insertions, 6 deletions
diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp
index 7213064746..c094eb3180 100755
--- a/indra/newview/llfloaterland.cpp
+++ b/indra/newview/llfloaterland.cpp
@@ -2776,10 +2776,16 @@ void LLPanelLandAccess::callbackAvatarCBAccess(const uuid_vec_t& ids)
{
LLUUID id = ids[0];
LLParcel* parcel = mParcel->getParcel();
- if (parcel)
+ if (parcel && parcel->addToAccessList(id, 0))
{
- parcel->addToAccessList(id, 0);
- LLViewerParcelMgr::getInstance()->sendParcelAccessListUpdate(AL_ACCESS);
+ U32 lists_to_update = AL_ACCESS;
+ // agent was successfully added to access list
+ // but we also need to check ban list to ensure that agent will not be in two lists simultaneously
+ if(parcel->removeFromBanList(id))
+ {
+ lists_to_update |= AL_BAN;
+ }
+ LLViewerParcelMgr::getInstance()->sendParcelAccessListUpdate(lists_to_update);
refresh();
}
}
@@ -2828,10 +2834,16 @@ void LLPanelLandAccess::callbackAvatarCBBanned(const uuid_vec_t& ids)
{
LLUUID id = ids[0];
LLParcel* parcel = mParcel->getParcel();
- if (parcel)
+ if (parcel && parcel->addToBanList(id, 0))
{
- parcel->addToBanList(id, 0);
- LLViewerParcelMgr::getInstance()->sendParcelAccessListUpdate(AL_BAN);
+ U32 lists_to_update = AL_BAN;
+ // agent was successfully added to ban list
+ // but we also need to check access list to ensure that agent will not be in two lists simultaneously
+ if (parcel->removeFromAccessList(id))
+ {
+ lists_to_update |= AL_ACCESS;
+ }
+ LLViewerParcelMgr::getInstance()->sendParcelAccessListUpdate(lists_to_update);
refresh();
}
}