diff --git a/indra/newview/app_settings/settings_per_account.xml b/indra/newview/app_settings/settings_per_account.xml index d5c721237..7e369cf26 100644 --- a/indra/newview/app_settings/settings_per_account.xml +++ b/indra/newview/app_settings/settings_per_account.xml @@ -216,31 +216,18 @@ - AscentInstantMessageResponseRepeat - - Comment - Whether to keep on resending the autoresponse every line they send - Persist - 1 - Type - Boolean - Value - 0 - - - AscentInstantMessageShowOnTyping - - Comment - Whether to perform the autorespond the moment they begin to type instead of waiting for an actual message - Persist - 1 - Type - Boolean - Value - 0 - - + AscentInstantMessageResponseRepeat + + Comment + Whether to keep on resending the autoresponse every line they send + Persist + 1 + Type + Boolean + Value + 0 + AutoresponseAnyone Comment @@ -438,7 +425,7 @@ Boolean Value 0 - + BusyModeResponseItemID Comment diff --git a/indra/newview/llgiveinventory.cpp b/indra/newview/llgiveinventory.cpp index 25885e68f..8cdcf5589 100644 --- a/indra/newview/llgiveinventory.cpp +++ b/indra/newview/llgiveinventory.cpp @@ -128,36 +128,31 @@ bool LLGiveInventory::isInventoryGiveAcceptable(const LLInventoryItem* item) { return false; } - - + bool acceptable = true; switch(item->getType()) { - case LLAssetType::AT_CALLINGCARD: - acceptable = false; - break; case LLAssetType::AT_OBJECT: - // - /*if(my_avatar->isWearingAttachment(item->getUUID())) + /* + if (get_is_item_worn(item->getUUID())) { acceptable = false; - }*/ - // + } + */ break; case LLAssetType::AT_BODYPART: case LLAssetType::AT_CLOTHING: { // /*bool copyable = false; - if(item->getPermissions().allowCopyBy(gAgent.getID())) copyable = true; + if(item->getPermissions().allowCopyBy(gAgentID)) copyable = true; - if(!copyable && gAgentWearables.isWearingItem(item->getUUID())) + if (!copyable || get_is_item_worn(item->getUUID())) { acceptable = false; }*/ // } - break; default: break; @@ -185,20 +180,16 @@ bool LLGiveInventory::isInventoryGroupGiveAcceptable(const LLInventoryItem* item bool acceptable = true; - switch(item->getType()) { - case LLAssetType::AT_CALLINGCARD: - acceptable = false; - break; - // - /*case LLAssetType::AT_OBJECT: + case LLAssetType::AT_OBJECT: + /* if(gAgentAvatarp->isWearingAttachment(item->getUUID())) { acceptable = false; - }* - break;*/ - // + } + */ + break; default: break; } @@ -245,11 +236,17 @@ void LLGiveInventory::doGiveInventoryCategory(const LLUUID& to_agent, const LLUUID& im_session_id) { - if (!cat) return; + if (!cat) + { + return; + } llinfos << "LLGiveInventory::giveInventoryCategory() - " << cat->getUUID() << llendl; - if (!isAgentAvatarValid()) return; + if (!isAgentAvatarValid()) + { + return; + } // Test out how many items are being given. LLViewerInventoryCategory::cat_array_t cats; @@ -275,17 +272,17 @@ void LLGiveInventory::doGiveInventoryCategory(const LLUUID& to_agent, LLNotificationsUtil::add("IncompleteInventory"); return; } - count = items.count() + cats.count(); - if(count > MAX_ITEMS) - { + count = items.count() + cats.count(); + if(count > MAX_ITEMS) + { LLNotificationsUtil::add("TooManyItems"); - return; - } - else if(count == 0) - { + return; + } + else if(count == 0) + { LLNotificationsUtil::add("NoItems"); - return; - } + return; + } else { if(0 == giveable.countNoCopy()) @@ -358,6 +355,7 @@ bool LLGiveInventory::handleCopyProtectedItem(const LLSD& notification, const LL S32 option = LLNotificationsUtil::getSelectedOption(notification, response); LLSD itmes = notification["payload"]["items"]; LLInventoryItem* item = NULL; + bool give_successful = true; switch(option) { case 0: // "Yes" @@ -376,15 +374,17 @@ bool LLGiveInventory::handleCopyProtectedItem(const LLSD& notification, const LL else { LLNotificationsUtil::add("CannotGiveItem"); + give_successful = false; } } break; default: // no, cancel, whatever, who cares, not yes. LLNotificationsUtil::add("TransactionCancelled"); + give_successful = false; break; } - return false; + return give_successful; } // static @@ -419,6 +419,7 @@ void LLGiveInventory::commitGiveInventoryItem(const LLUUID& to_agent, bucket, BUCKET_SIZE); gAgent.sendReliableMessage(); + // if (gSavedSettings.getBOOL("BroadcastViewerEffects")) { @@ -486,7 +487,10 @@ void LLGiveInventory::commitGiveInventoryCategory(const LLUUID& to_agent, const LLUUID& im_session_id) { -if(!cat) return; + if(!cat) + { + return; + } llinfos << "LLGiveInventory::commitGiveInventoryCategory() - " << cat->getUUID() << llendl; @@ -565,6 +569,7 @@ if(!cat) return; bucket_size); gAgent.sendReliableMessage(); delete[] bucket; + // if (gSavedSettings.getBOOL("BroadcastViewerEffects")) { @@ -585,4 +590,5 @@ if(!cat) return; logInventoryOffer(to_agent, im_session_id); } } + // EOF diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 37ed70519..1eb6244f6 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -2464,8 +2464,8 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) LLGiveInventory::doGiveInventoryItem(from_id, item, computed_session_id); if (show_autoresponded) { - gIMMgr->addMessage(computed_session_id, from_id, name, - llformat("%s %s \"%s\"", pns_name.c_str(), LLTrans::getString("IM_autoresponse_sent_item").c_str(), item->getName().c_str())); + gIMMgr->addMessage(computed_session_id, from_id, name, + llformat("%s %s \"%s\"", pns_name.c_str(), LLTrans::getString("IM_autoresponse_sent_item").c_str(), item->getName().c_str())); } } } @@ -2636,7 +2636,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) if (show_autoresponded) { gIMMgr->addMessage(computed_session_id, from_id, name, - llformat("%s %s \"%s\"", pns_name.c_str(), LLTrans::getString("IM_autoresponse_sent_item").c_str(), item->getName().c_str())); + llformat("%s %s \"%s\"", pns_name.c_str(), LLTrans::getString("IM_autoresponse_sent_item").c_str(), item->getName().c_str())); } } }