summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermessage.cpp
diff options
context:
space:
mode:
authorKent Quirk <q@lindenlab.com>2010-03-19 11:27:10 -0400
committerKent Quirk <q@lindenlab.com>2010-03-19 11:27:10 -0400
commit5e0be34c26f384a111063399b619c82b2a951dcd (patch)
tree6b04bc67970f06c517436eea2b803406915bf8a7 /indra/newview/llviewermessage.cpp
parentb84b0e71c12bb5ae7e9a6dafa1735a99f5975645 (diff)
parentd217adeede2d99ac6f48064388d91aa14ab9a4d2 (diff)
Merge
Diffstat (limited to 'indra/newview/llviewermessage.cpp')
-rw-r--r--indra/newview/llviewermessage.cpp26
1 files changed, 25 insertions, 1 deletions
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 32edbec822..7ecff4c2d8 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -1084,6 +1084,21 @@ LLOfferInfo::LLOfferInfo(const LLSD& sd)
mHost = LLHost(sd["sender"].asString());
}
+LLOfferInfo::LLOfferInfo(const LLOfferInfo& info)
+{
+ mIM = info.mIM;
+ mFromID = info.mFromID;
+ mFromGroup = info.mFromGroup;
+ mFromObject = info.mFromObject;
+ mTransactionID = info.mTransactionID;
+ mFolderID = info.mFolderID;
+ mObjectID = info.mObjectID;
+ mType = info.mType;
+ mFromName = info.mFromName;
+ mDesc = info.mDesc;
+ mHost = info.mHost;
+}
+
LLSD LLOfferInfo::asLLSD()
{
LLSD sd;
@@ -1575,7 +1590,12 @@ void inventory_offer_handler(LLOfferInfo* info)
}
else // Agent -> Agent Inventory Offer
{
+ payload["reusable"] = true;
+ p.responder = info;
// Note: sets inventory_offer_callback as the callback
+ // *TODO fix memory leak
+ // inventory_offer_callback() is not invoked if user received notification and
+ // closes viewer(without responding the notification)
p.substitutions(args).payload(payload).functor.function(boost::bind(&LLOfferInfo::inventory_offer_callback, info, _1, _2));
p.name = "UserGiveItem";
@@ -2303,6 +2323,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
payload["from_id"] = from_id;
payload["lure_id"] = session_id;
payload["godlike"] = FALSE;
+ payload["reusable"] = true;
LLNotificationsUtil::add("TeleportOffered", args, payload);
}
}
@@ -2371,6 +2392,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
}
else
{
+ payload["reusable"] = true;
args["[MESSAGE]"] = message;
LLNotificationsUtil::add("OfferFriendship", args, payload);
}
@@ -4513,7 +4535,7 @@ void process_money_balance_reply( LLMessageSystem* msg, void** )
// Each set of parenthesis will later be used to find arguments of message we generate
// in the end of this if- (.*) gives us name of money receiver, (\\d+)-amount of money we pay
// and ([^$]*)- reason of payment
- boost::regex expr("You paid (.*)L\\$(\\d+)\\s?([^$]*).");
+ boost::regex expr("You paid (?:.{0}|(.*) )L\\$(\\d+)\\s?([^$]*)\\.");
boost::match_results <std::string::const_iterator> matches;
if(boost::regex_match(desc, matches, expr))
{
@@ -5545,6 +5567,8 @@ bool handle_lure_callback(const LLSD& notification, const LLSD& response)
args["TO_NAME"] = target_name;
LLSD payload;
+
+ //*TODO please rewrite all keys to the same case, lower or upper
payload["from_id"] = target_id;
payload["SESSION_NAME"] = target_name;
payload["SUPPRESS_TOAST"] = true;