summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermessage.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2016-05-06 10:28:42 -0400
committerOz Linden <oz@lindenlab.com>2016-05-06 10:28:42 -0400
commit950c41d184b340a7a3370c2cbda5d1eed9a17b0b (patch)
tree373912394af6834d7d56258becf46954244b8423 /indra/newview/llviewermessage.cpp
parent20198b750d02c769ab6845226f98ce6e5dd1f20b (diff)
parent7f5e6cea124e1193b199a3eabd50bdab96340c13 (diff)
merge 4.0.4-release and MAINT-5974
Diffstat (limited to 'indra/newview/llviewermessage.cpp')
-rw-r--r--indra/newview/llviewermessage.cpp29
1 files changed, 28 insertions, 1 deletions
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index e6095acf27..92df3866f7 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -2322,6 +2322,20 @@ static void god_message_name_cb(const LLAvatarName& av_name, LLChat chat, std::s
}
}
+const std::string NOT_ONLINE_MSG("User not online - message will be stored and delivered later.");
+const std::string NOT_ONLINE_INVENTORY("User not online - inventory has been saved.");
+void translate_if_needed(std::string& message)
+{
+ if (message == NOT_ONLINE_MSG)
+ {
+ message = LLTrans::getString("not_online_msg");
+ }
+ else if (message == NOT_ONLINE_INVENTORY)
+ {
+ message = LLTrans::getString("not_online_inventory");
+ }
+}
+
void process_improved_im(LLMessageSystem *msg, void **user_data)
{
LLUUID from_id;
@@ -2386,6 +2400,11 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
chat.mFromID = from_id;
chat.mFromName = name;
chat.mSourceType = (from_id.isNull() || (name == std::string(SYSTEM_FROM))) ? CHAT_SOURCE_SYSTEM : CHAT_SOURCE_AGENT;
+
+ if (chat.mSourceType == CHAT_SOURCE_SYSTEM)
+ { // Translate server message if required (MAINT-6109)
+ translate_if_needed(message);
+ }
LLViewerObject *source = gObjectList.findObject(session_id); //Session ID is probably the wrong thing.
if (source)
@@ -5558,6 +5577,10 @@ static void process_money_balance_reply_extended(LLMessageSystem* msg)
bool you_paid_someone = (source_id == gAgentID);
if (you_paid_someone)
{
+ if(!gSavedSettings.getBOOL("NotifyMoneySpend"))
+ {
+ return;
+ }
args["NAME"] = dest_slurl;
is_name_group = is_dest_group;
name_id = dest_id;
@@ -5595,6 +5618,10 @@ static void process_money_balance_reply_extended(LLMessageSystem* msg)
}
else {
// ...someone paid you
+ if(!gSavedSettings.getBOOL("NotifyMoneyReceived"))
+ {
+ return;
+ }
args["NAME"] = source_slurl;
is_name_group = is_source_group;
name_id = source_id;
@@ -7380,7 +7407,7 @@ void callback_load_url_name(const LLUUID& id, const std::string& full_name, bool
args["URL"] = load_url_info["url"].asString();
args["MESSAGE"] = load_url_info["message"].asString();;
args["OBJECTNAME"] = load_url_info["object_name"].asString();
- args["NAME"] = owner_name;
+ args["NAME_SLURL"] = LLSLURL(is_group ? "group" : "agent", id, "about").getSLURLString();
LLNotificationsUtil::add("LoadWebPage", args, load_url_info);
}