diff options
Diffstat (limited to 'indra/newview/llfloaterland.cpp')
-rwxr-xr-x | indra/newview/llfloaterland.cpp | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp index d01c089eaf..7621c35ed2 100755 --- a/indra/newview/llfloaterland.cpp +++ b/indra/newview/llfloaterland.cpp @@ -2781,10 +2781,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(); } } @@ -2833,10 +2839,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(); } } |