summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorAndrew A. de Laix <alain@lindenlab.com>2011-06-15 09:23:46 -0700
committerAndrew A. de Laix <alain@lindenlab.com>2011-06-15 09:23:46 -0700
commit6f1fabf0e09662a2d0467fcc487ff6189fc5133c (patch)
tree37f32d16555fbb11e9203e86f2a83195ee39997a /indra/newview
parent12d9d1d3ef76518171ae87aae2467593218f8413 (diff)
Fix VWR-24099: warn user when trying to send too many teleport offers at one time.
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llviewermessage.cpp9
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml13
2 files changed, 22 insertions, 0 deletions
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 3832be727f..435b2e063d 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -6266,6 +6266,15 @@ void send_group_notice(const LLUUID& group_id,
bool handle_lure_callback(const LLSD& notification, const LLSD& response)
{
+ if(notification["payload"]["ids"].size() > 250)
+ {
+ // More than 250 targets will overload the message.
+ LLSD args;
+ args["OFFERS"] = notification["payload"]["ids"].size();
+ 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 ce96c488b4..21680772ba 100644
--- 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;
+250 are the most that can be done at one time
+ <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?