diff options
Diffstat (limited to 'indra/newview/llviewermessage.cpp')
-rw-r--r-- | indra/newview/llviewermessage.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index e50c8ee9f0..982f1980f1 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -5531,6 +5531,17 @@ void notify_cautioned_script_question(const LLSD& notification, const LLSD& resp void script_question_mute(const LLUUID& item_id, const std::string& object_name); +bool unknown_script_question_cb(const LLSD& notification, const LLSD& response) +{ + // Only care if they muted the object here. + if ( response["Mute"] ) // mute + { + LLUUID task_id = notification["payload"]["task_id"].asUUID(); + script_question_mute(task_id,notification["payload"]["object_name"].asString()); + } + return false; +} + void experiencePermissionBlock(LLUUID experience, LLSD result) { LLSD permission; @@ -5636,7 +5647,8 @@ void script_question_mute(const LLUUID& task_id, const std::string& object_name) bool matches(const LLNotificationPtr notification) const { if (notification->getName() == "ScriptQuestionCaution" - || notification->getName() == "ScriptQuestion") + || notification->getName() == "ScriptQuestion" + /*|| notification->getName() == "UnknownScriptQuestion"*/) { return (notification->getPayload()["task_id"].asUUID() == blocked_id); } @@ -5653,6 +5665,7 @@ void script_question_mute(const LLUUID& task_id, const std::string& object_name) static LLNotificationFunctorRegistration script_question_cb_reg_1("ScriptQuestion", script_question_cb); static LLNotificationFunctorRegistration script_question_cb_reg_2("ScriptQuestionCaution", script_question_cb); static LLNotificationFunctorRegistration script_question_cb_reg_3("ScriptQuestionExperience", script_question_cb); +//static LLNotificationFunctorRegistration unknown_script_question_cb_reg("UnknownScriptQuestion", unknown_script_question_cb); void process_script_experience_details(const LLSD& experience_details, LLSD args, LLSD payload) { @@ -5762,6 +5775,8 @@ void process_script_question(LLMessageSystem *msg, void **user_data) } } + script_question += "\n"; + args["QUESTIONS"] = script_question; if (known_questions != questions) |