summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermessage.cpp
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-04-23 10:44:45 +0100
committerTofu Linden <tofu.linden@lindenlab.com>2010-04-23 10:44:45 +0100
commit4bec811062ddf9cef5f925c4f7f814392935b7e9 (patch)
treeca209e70a1adbfb7875e74d6ce36c56409f6e597 /indra/newview/llviewermessage.cpp
parentb99c90daf38765161eafec418d52493761baf872 (diff)
parentbb908fb73ee720898a22bda2119e3435992f0fef (diff)
merge from PE's viewer-trunk
Diffstat (limited to 'indra/newview/llviewermessage.cpp')
-rw-r--r--indra/newview/llviewermessage.cpp21
1 files changed, 13 insertions, 8 deletions
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 486158272d..ba0c8d464d 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -1035,21 +1035,26 @@ bool check_offer_throttle(const std::string& from_name, bool check_only)
{
// Use the name of the last item giver, who is probably the person
// spamming you.
- std::ostringstream message;
- message << LLAppViewer::instance()->getSecondLifeTitle();
+
+ LLStringUtil::format_map_t arg;
+ std::string log_msg;
+ std::ostringstream time ;
+ time<<OFFER_THROTTLE_TIME;
+
+ arg["APP_NAME"] = LLAppViewer::instance()->getSecondLifeTitle();
+ arg["TIME"] = time.str();
+
if (!from_name.empty())
{
- message << ": Items coming in too fast from " << from_name;
+ arg["FROM_NAME"] = from_name;
+ log_msg = LLTrans::getString("ItemsComingInTooFastFrom", arg);
}
else
{
- message << ": Items coming in too fast";
+ log_msg = LLTrans::getString("ItemsComingInTooFast", arg);
}
- message << ", automatic preview disabled for "
- << OFFER_THROTTLE_TIME << " seconds.";
//this is kinda important, so actually put it on screen
- std::string log_msg = message.str();
LLSD args;
args["MESSAGE"] = log_msg;
LLNotificationsUtil::add("SystemMessage", args);
@@ -2532,7 +2537,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
// Note: lie to Nearby Chat, pretending that this is NOT an IM, because
// IMs from obejcts don't open IM sessions.
LLNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance<LLNearbyChat>("nearby_chat", LLSD());
- if(nearby_chat)
+ if(SYSTEM_FROM != name && nearby_chat)
{
LLSD args;
args["owner_id"] = from_id;