diff options
author | Andrew A. de Laix <alain@lindenlab.com> | 2011-06-20 15:48:08 -0700 |
---|---|---|
committer | Andrew A. de Laix <alain@lindenlab.com> | 2011-06-20 15:48:08 -0700 |
commit | 7b33ae4456c4d66770aa2df86094db57f25505f8 (patch) | |
tree | 578d851b0525ce0da5adfcfd5c5f7b314f56780f /indra/newview | |
parent | 7f6d49df43c660b9f5632ffb8a30f90ee718cac0 (diff) | |
parent | 0fb93246b36b356362e1899eab2d67c8931d9471 (diff) |
Automated merge with http://hg.secondlife.com/viewer-development
Diffstat (limited to 'indra/newview')
-rwxr-xr-x | indra/newview/llavataractions.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llviewermessage.cpp | 12 | ||||
-rwxr-xr-x | indra/newview/skins/default/xui/en/notifications.xml | 13 |
3 files changed, 29 insertions, 0 deletions
diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index cbbdcb2983..955f19c82c 100755 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -773,6 +773,10 @@ bool LLAvatarActions::canOfferTeleport(const LLUUID& id) // static bool LLAvatarActions::canOfferTeleport(const uuid_vec_t& ids) { + // We can't send more than 250 lures in a single message, so disable this + // button when there are too many id's selected. + if(ids.size() > 250) return false; + bool result = true; for (uuid_vec_t::const_iterator it = ids.begin(); it != ids.end(); ++it) { diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 7ab335314a..256363805b 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -6261,6 +6261,18 @@ void send_group_notice(const LLUUID& group_id, bool handle_lure_callback(const LLSD& notification, const LLSD& response) { + static const unsigned OFFER_RECIPIENT_LIMIT = 250; + if(notification["payload"]["ids"].size() > OFFER_RECIPIENT_LIMIT) + { + // More than OFFER_RECIPIENT_LIMIT targets will overload the message + // producing an llerror. + LLSD args; + args["OFFERS"] = notification["payload"]["ids"].size(); + args["LIMIT"] = static_cast<int>(OFFER_RECIPIENT_LIMIT); + LLNotificationsUtil::add("TooManyTeleportOffers", args); + return false; + } + std::string text = response["message"].asString(); LLSLURL slurl; LLAgentUI::buildSLURL(slurl); diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 09105c1d28..db1cee5d08 100755 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -3698,6 +3698,19 @@ Join me in [REGION] <notification icon="alertmodal.tga" + name="TooManyTeleportOffers" + type="alertmodal"> +You attempted to make [OFFERS] teleport offers +which exceeds the limit of [LIMIT]. + <tag>group</tag> + <tag>fail</tag> + <usetemplate + name="okbutton" + yestext="OK"/> + </notification> + + <notification + icon="alertmodal.tga" name="OfferTeleportFromGod" type="alertmodal"> God summon Resident to your location? |