diff options
Diffstat (limited to 'indra/newview/llviewermessage.cpp')
-rw-r--r-- | indra/newview/llviewermessage.cpp | 32 |
1 files changed, 28 insertions, 4 deletions
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 0ca30d5f3d..7313463f1b 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -39,6 +39,7 @@ #include "llfloaterreg.h" #include "llfollowcamparams.h" #include "llinventorydefines.h" +#include "lllslconstants.h" #include "llregionhandle.h" #include "llsdserialize.h" #include "llteleportflags.h" @@ -638,7 +639,7 @@ bool join_group_response(const LLSD& notification, const LLSD& response) if(option == 0 && !group_id.isNull()) { // check for promotion or demotion. - S32 max_groups = MAX_AGENT_GROUPS; + S32 max_groups = gMaxAgentGroups; if(gAgent.isInGroup(group_id)) ++max_groups; if(gAgent.mGroups.count() < max_groups) @@ -3031,6 +3032,7 @@ void process_offer_callingcard(LLMessageSystem* msg, void**) } else { + args["NAME"] = source_name; LLNotificationsUtil::add("OfferCallingCard", args, payload); } } @@ -3345,6 +3347,8 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) // then this info is news to us. void process_teleport_start(LLMessageSystem *msg, void**) { + // on teleport, don't tell them about destination guide anymore + LLFirstUse::notUsingDestinationGuide(false); U32 teleport_flags = 0x0; msg->getU32("Info", "TeleportFlags", teleport_flags); @@ -3866,6 +3870,7 @@ void process_crossed_region(LLMessageSystem* msg, void**) return; } LL_INFOS("Messaging") << "process_crossed_region()" << LL_ENDL; + gAgentAvatarp->resetRegionCrossingTimer(); U32 sim_ip; msg->getIPAddrFast(_PREHASH_RegionData, _PREHASH_SimIP, sim_ip); @@ -6301,6 +6306,9 @@ bool handle_lure_callback(const LLSD& notification, const LLSD& response) payload["from_id"] = target_id; payload["SUPPRESS_TOAST"] = true; LLNotificationsUtil::add("TeleportOfferSent", args, payload); + + // Add the recepient to the recent people list. + LLRecentPeople::instance().add(target_id); } } gAgent.sendReliableMessage(); @@ -6434,8 +6442,22 @@ const char* SCRIPT_DIALOG_HEADER = "Script Dialog:\n"; bool callback_script_dialog(const LLSD& notification, const LLSD& response) { LLNotificationForm form(notification["form"]); - std::string button = LLNotification::getSelectedOptionName(response); - S32 button_idx = LLNotification::getSelectedOption(notification, response); + + std::string rtn_text; + S32 button_idx; + button_idx = LLNotification::getSelectedOption(notification, response); + if (response[TEXTBOX_MAGIC_TOKEN].isDefined()) + { + if (response[TEXTBOX_MAGIC_TOKEN].isString()) + rtn_text = response[TEXTBOX_MAGIC_TOKEN].asString(); + else + rtn_text.clear(); // bool marks empty string + } + else + { + rtn_text = LLNotification::getSelectedOptionName(response); + } + // Didn't click "Ignore" if (button_idx != -1) { @@ -6448,7 +6470,7 @@ bool callback_script_dialog(const LLSD& notification, const LLSD& response) msg->addUUID("ObjectID", notification["payload"]["object_id"].asUUID()); msg->addS32("ChatChannel", notification["payload"]["chat_channel"].asInteger()); msg->addS32("ButtonIndex", button_idx); - msg->addString("ButtonLabel", button); + msg->addString("ButtonLabel", rtn_text); msg->sendReliable(LLHost(notification["payload"]["sender"].asString())); } @@ -6669,6 +6691,8 @@ void process_initiate_download(LLMessageSystem* msg, void**) void process_script_teleport_request(LLMessageSystem* msg, void**) { + if (!gSavedSettings.getBOOL("ScriptsCanShowUI")) return; + std::string object_name; std::string sim_name; LLVector3 pos; |