aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra')
-rw-r--r--linden/indra/newview/llviewergenericmessage.cpp16
-rwxr-xr-xlinden/indra/newview/llviewermessage.cpp364
-rw-r--r--linden/indra/newview/wlfloatermanager.cpp37
-rw-r--r--linden/indra/newview/wlretrievesettings.cpp16
4 files changed, 216 insertions, 217 deletions
diff --git a/linden/indra/newview/llviewergenericmessage.cpp b/linden/indra/newview/llviewergenericmessage.cpp
index 8078888..536a803 100644
--- a/linden/indra/newview/llviewergenericmessage.cpp
+++ b/linden/indra/newview/llviewergenericmessage.cpp
@@ -1,12 +1,12 @@
1/** 1/**
2 * @file llviewergenericmessage.cpp 2 * @file llviewergenericmessage.cpp
3 * @brief Handle processing of "generic messages" which contain short lists of strings. 3 * @brief Handle processing of "generic messages" which contain short lists of strings.
4 * @author James Cook 4 * @author James Cook
5 * 5 *
6 * $LicenseInfo:firstyear=2007&license=viewergpl$ 6 * $LicenseInfo:firstyear=2007&license=viewergpl$
7 * 7 *
8 * Copyright (c) 2007-2009, Linden Research, Inc. 8 * Copyright (c) 2007-2009, Linden Research, Inc.
9 * 9 *
10 * Second Life Viewer Source Code 10 * Second Life Viewer Source Code
11 * The source code in this file ("Source Code") is provided by Linden Lab 11 * The source code in this file ("Source Code") is provided by Linden Lab
12 * to you under the terms of the GNU General Public License, version 2.0 12 * to you under the terms of the GNU General Public License, version 2.0
@@ -14,17 +14,17 @@
14 * ("Other License"), formally executed by you and Linden Lab. Terms of 14 * ("Other License"), formally executed by you and Linden Lab. Terms of
15 * the GPL can be found in doc/GPL-license.txt in this distribution, or 15 * the GPL can be found in doc/GPL-license.txt in this distribution, or
16 * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 16 * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
17 * 17 *
18 * There are special exceptions to the terms and conditions of the GPL as 18 * There are special exceptions to the terms and conditions of the GPL as
19 * it is applied to this Source Code. View the full text of the exception 19 * it is applied to this Source Code. View the full text of the exception
20 * in the file doc/FLOSS-exception.txt in this software distribution, or 20 * in the file doc/FLOSS-exception.txt in this software distribution, or
21 * online at 21 * online at
22 * http://secondlifegrid.net/programs/open_source/licensing/flossexception 22 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
23 * 23 *
24 * By copying, modifying or distributing this software, you acknowledge 24 * By copying, modifying or distributing this software, you acknowledge
25 * that you have read and understood your obligations described above, 25 * that you have read and understood your obligations described above,
26 * and agree to abide by those obligations. 26 * and agree to abide by those obligations.
27 * 27 *
28 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO 28 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
29 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, 29 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
30 * COMPLETENESS OR PERFORMANCE. 30 * COMPLETENESS OR PERFORMANCE.
@@ -84,7 +84,7 @@ void process_generic_message(LLMessageSystem* msg, void**)
84 msg->getUUID("AgentData", "AgentID", agent_id); 84 msg->getUUID("AgentData", "AgentID", agent_id);
85 std::string method; 85 std::string method;
86 msg->getStringFast(_PREHASH_MethodData, _PREHASH_Method, method); 86 msg->getStringFast(_PREHASH_MethodData, _PREHASH_Method, method);
87 87
88 // TODO: Use a proper dispatcher. 88 // TODO: Use a proper dispatcher.
89 if(method == "Windlight") 89 if(method == "Windlight")
90 { 90 {
@@ -106,7 +106,7 @@ void process_generic_message(LLMessageSystem* msg, void**)
106 106
107 if(!gGenericDispatcher.dispatch(request, invoice, strings)) 107 if(!gGenericDispatcher.dispatch(request, invoice, strings))
108 { 108 {
109 llwarns << "GenericMessage " << request << " failed to dispatch" 109 llwarns << "GenericMessage " << request << " failed to dispatch"
110 << llendl; 110 << llendl;
111 } 111 }
112 } 112 }
diff --git a/linden/indra/newview/llviewermessage.cpp b/linden/indra/newview/llviewermessage.cpp
index 9b1b00d..fc72147 100755
--- a/linden/indra/newview/llviewermessage.cpp
+++ b/linden/indra/newview/llviewermessage.cpp
@@ -1,12 +1,12 @@
1 1
2/** 2/**
3 * @file llviewermessage.cpp 3 * @file llviewermessage.cpp
4 * @brief Dumping ground for viewer-side message system callbacks. 4 * @brief Dumping ground for viewer-side message system callbacks.
5 * 5 *
6 * $LicenseInfo:firstyear=2002&license=viewergpl$ 6 * $LicenseInfo:firstyear=2002&license=viewergpl$
7 * 7 *
8 * Copyright (c) 2002-2009, Linden Research, Inc. 8 * Copyright (c) 2002-2009, Linden Research, Inc.
9 * 9 *
10 * Second Life Viewer Source Code 10 * Second Life Viewer Source Code
11 * The source code in this file ("Source Code") is provided by Linden Lab 11 * The source code in this file ("Source Code") is provided by Linden Lab
12 * to you under the terms of the GNU General Public License, version 2.0 12 * to you under the terms of the GNU General Public License, version 2.0
@@ -14,17 +14,17 @@
14 * ("Other License"), formally executed by you and Linden Lab. Terms of 14 * ("Other License"), formally executed by you and Linden Lab. Terms of
15 * the GPL can be found in doc/GPL-license.txt in this distribution, or 15 * the GPL can be found in doc/GPL-license.txt in this distribution, or
16 * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 16 * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
17 * 17 *
18 * There are special exceptions to the terms and conditions of the GPL as 18 * There are special exceptions to the terms and conditions of the GPL as
19 * it is applied to this Source Code. View the full text of the exception 19 * it is applied to this Source Code. View the full text of the exception
20 * in the file doc/FLOSS-exception.txt in this software distribution, or 20 * in the file doc/FLOSS-exception.txt in this software distribution, or
21 * online at 21 * online at
22 * http://secondlifegrid.net/programs/open_source/licensing/flossexception 22 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
23 * 23 *
24 * By copying, modifying or distributing this software, you acknowledge 24 * By copying, modifying or distributing this software, you acknowledge
25 * that you have read and understood your obligations described above, 25 * that you have read and understood your obligations described above,
26 * and agree to abide by those obligations. 26 * and agree to abide by those obligations.
27 * 27 *
28 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO 28 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
29 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, 29 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
30 * COMPLETENESS OR PERFORMANCE. 30 * COMPLETENESS OR PERFORMANCE.
@@ -37,7 +37,7 @@
37 37
38#include <deque> 38#include <deque>
39 39
40#include "llaudioengine.h" 40#include "llaudioengine.h"
41#include "indra_constants.h" 41#include "indra_constants.h"
42#include "lscript_byteformat.h" 42#include "lscript_byteformat.h"
43#include "mean_collision_data.h" 43#include "mean_collision_data.h"
@@ -196,8 +196,8 @@ const U32 OFFER_THROTTLE_MAX_COUNT=5; //number of items per time period
196const F32 OFFER_THROTTLE_TIME=10.f; //time period in seconds 196const F32 OFFER_THROTTLE_TIME=10.f; //time period in seconds
197 197
198//script permissions 198//script permissions
199const std::string SCRIPT_QUESTIONS[SCRIPT_PERMISSION_EOF] = 199const std::string SCRIPT_QUESTIONS[SCRIPT_PERMISSION_EOF] =
200 { 200 {
201 "ScriptTakeMoney", 201 "ScriptTakeMoney",
202 "ActOnControlInputs", 202 "ActOnControlInputs",
203 "RemapControlInputs", 203 "RemapControlInputs",
@@ -211,7 +211,7 @@ const std::string SCRIPT_QUESTIONS[SCRIPT_PERMISSION_EOF] =
211 "ControlYourCamera" 211 "ControlYourCamera"
212 }; 212 };
213 213
214const BOOL SCRIPT_QUESTION_IS_CAUTION[SCRIPT_PERMISSION_EOF] = 214const BOOL SCRIPT_QUESTION_IS_CAUTION[SCRIPT_PERMISSION_EOF] =
215{ 215{
216 TRUE, // ScriptTakeMoney, 216 TRUE, // ScriptTakeMoney,
217 FALSE, // ActOnControlInputs 217 FALSE, // ActOnControlInputs
@@ -463,7 +463,7 @@ void process_layer_data(LLMessageSystem *mesgsys, void **user_data)
463// char image_uuid_str[UUID_STR_SIZE]; /* Flawfinder: ignore */ 463// char image_uuid_str[UUID_STR_SIZE]; /* Flawfinder: ignore */
464// memcpy(image_uuid_str, pos_uuid+2, UUID_STR_SIZE-1); /* Flawfinder: ignore */ 464// memcpy(image_uuid_str, pos_uuid+2, UUID_STR_SIZE-1); /* Flawfinder: ignore */
465// image_uuid_str[UUID_STR_SIZE-1] = 0; 465// image_uuid_str[UUID_STR_SIZE-1] = 0;
466 466
467// LLUUID image_uuid(image_uuid_str); 467// LLUUID image_uuid(image_uuid_str);
468 468
469// LL_INFOS("Messaging") << "Found UUID: " << image_uuid << LL_ENDL; 469// LL_INFOS("Messaging") << "Found UUID: " << image_uuid << LL_ENDL;
@@ -538,7 +538,7 @@ void process_layer_data(LLMessageSystem *mesgsys, void **user_data)
538// else 538// else
539// { 539// {
540// LLFILE* fIn = LLFile::fopen(filename, "rb"); /* Flawfinder: ignore */ 540// LLFILE* fIn = LLFile::fopen(filename, "rb"); /* Flawfinder: ignore */
541// if (fIn) 541// if (fIn)
542// { 542// {
543// LLPointer<LLImageJ2C> ImageUtility = new LLImageJ2C; 543// LLPointer<LLImageJ2C> ImageUtility = new LLImageJ2C;
544// LLPointer<LLImageTGA> TargaUtility = new LLImageTGA; 544// LLPointer<LLImageTGA> TargaUtility = new LLImageTGA;
@@ -559,13 +559,13 @@ void process_layer_data(LLMessageSystem *mesgsys, void **user_data)
559 559
560// ImageUtility->updateData(); 560// ImageUtility->updateData();
561// ImageUtility->decode(image, 100000.0f); 561// ImageUtility->decode(image, 100000.0f);
562 562
563// TargaUtility->encode(image); 563// TargaUtility->encode(image);
564// U8 *data = TargaUtility->getData(); 564// U8 *data = TargaUtility->getData();
565// S32 data_size = TargaUtility->getDataSize(); 565// S32 data_size = TargaUtility->getDataSize();
566 566
567// std::string file_path = gDirUtilp->getDirName(filename); 567// std::string file_path = gDirUtilp->getDirName(filename);
568 568
569// std::string output_file = llformat("%s/image-%03d.tga", file_path.c_str(), image_num);//filename; 569// std::string output_file = llformat("%s/image-%03d.tga", file_path.c_str(), image_num);//filename;
570// //S32 name_len = output_file.length(); 570// //S32 name_len = output_file.length();
571// //strcpy(&output_file[name_len-3], "tga"); 571// //strcpy(&output_file[name_len-3], "tga");
@@ -753,10 +753,10 @@ private:
753 std::string mFromName; 753 std::string mFromName;
754}; 754};
755 755
756//unlike the FetchObserver for AgentOffer, we only make one 756//unlike the FetchObserver for AgentOffer, we only make one
757//instance of the AddedObserver for TaskOffers 757//instance of the AddedObserver for TaskOffers
758//and it never dies. We do this because we don't know the UUID of 758//and it never dies. We do this because we don't know the UUID of
759//task offers until they are accepted, so we don't wouldn't 759//task offers until they are accepted, so we don't wouldn't
760//know what to watch for, so instead we just watch for all additions. 760//know what to watch for, so instead we just watch for all additions.
761class LLOpenTaskOffer : public LLInventoryAddedObserver 761class LLOpenTaskOffer : public LLInventoryAddedObserver
762{ 762{
@@ -773,7 +773,7 @@ LLOpenTaskOffer* gNewInventoryObserver=NULL;
773 773
774void start_new_inventory_observer() 774void start_new_inventory_observer()
775{ 775{
776 if (!gNewInventoryObserver) //task offer observer 776 if (!gNewInventoryObserver) //task offer observer
777 { 777 {
778 // Observer is deleted by gInventory 778 // Observer is deleted by gInventory
779 gNewInventoryObserver = new LLOpenTaskOffer; 779 gNewInventoryObserver = new LLOpenTaskOffer;
@@ -832,7 +832,7 @@ protected:
832 832
833 833
834//Returns TRUE if we are OK, FALSE if we are throttled 834//Returns TRUE if we are OK, FALSE if we are throttled
835//Set check_only true if you want to know the throttle status 835//Set check_only true if you want to know the throttle status
836//without registering a hit 836//without registering a hit
837bool check_offer_throttle(const std::string& from_name, bool check_only) 837bool check_offer_throttle(const std::string& from_name, bool check_only)
838{ 838{
@@ -848,7 +848,7 @@ bool check_offer_throttle(const std::string& from_name, bool check_only)
848 { 848 {
849 return gThrottleTimer.hasExpired(); 849 return gThrottleTimer.hasExpired();
850 } 850 }
851 851
852 if(gThrottleTimer.checkExpirationAndReset(OFFER_THROTTLE_TIME)) 852 if(gThrottleTimer.checkExpirationAndReset(OFFER_THROTTLE_TIME))
853 { 853 {
854 LL_DEBUGS("Messaging") << "Throttle Expired" << LL_ENDL; 854 LL_DEBUGS("Messaging") << "Throttle Expired" << LL_ENDL;
@@ -894,7 +894,7 @@ bool check_offer_throttle(const std::string& from_name, bool check_only)
894 } 894 }
895 } 895 }
896} 896}
897 897
898void open_offer(const std::vector<LLUUID>& items, const std::string& from_name) 898void open_offer(const std::vector<LLUUID>& items, const std::string& from_name)
899{ 899{
900 std::vector<LLUUID>::const_iterator it = items.begin(); 900 std::vector<LLUUID>::const_iterator it = items.begin();
@@ -927,7 +927,7 @@ void open_offer(const std::vector<LLUUID>& items, const std::string& from_name)
927 // Don't show WindLight settings as notecards. 927 // Don't show WindLight settings as notecards.
928 if(!LLWLParamManager::isSettingsNotecard(item->getName())) 928 if(!LLWLParamManager::isSettingsNotecard(item->getName()))
929 { 929 {
930 open_notecard((LLViewerInventoryItem*)item, std::string("Note: ") + item->getName(), 930 open_notecard((LLViewerInventoryItem*)item, std::string("Note: ") + item->getName(),
931 LLUUID::null, show_keep_discard, LLUUID::null, FALSE); 931 LLUUID::null, show_keep_discard, LLUUID::null, FALSE);
932 } 932 }
933 break; 933 break;
@@ -943,7 +943,7 @@ void open_offer(const std::vector<LLUUID>& items, const std::string& from_name)
943 } 943 }
944 } 944 }
945 //highlight item, if it's not in the trash or lost+found 945 //highlight item, if it's not in the trash or lost+found
946 946
947 // Don't auto-open the inventory floater 947 // Don't auto-open the inventory floater
948 LLInventoryView* view = LLInventoryView::getActiveInventory(); 948 LLInventoryView* view = LLInventoryView::getActiveInventory();
949 if(!view) 949 if(!view)
@@ -1023,7 +1023,7 @@ void inventory_offer_mute_callback(const LLUUID& blocked_id,
1023 OfferMatcher(const LLUUID& to_block) : blocked_id(to_block) {} 1023 OfferMatcher(const LLUUID& to_block) : blocked_id(to_block) {}
1024 BOOL matches(const LLNotificationPtr notification) const 1024 BOOL matches(const LLNotificationPtr notification) const
1025 { 1025 {
1026 if(notification->getName() == "ObjectGiveItem" 1026 if(notification->getName() == "ObjectGiveItem"
1027 || notification->getName() == "ObjectGiveItemUnknownUser" 1027 || notification->getName() == "ObjectGiveItemUnknownUser"
1028 || notification->getName() == "UserGiveItem") 1028 || notification->getName() == "UserGiveItem")
1029 { 1029 {
@@ -1099,7 +1099,7 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD&
1099 std::string name; 1099 std::string name;
1100 gAgent.buildFullname(name); 1100 gAgent.buildFullname(name);
1101 msg->addStringFast(_PREHASH_FromAgentName, name); 1101 msg->addStringFast(_PREHASH_FromAgentName, name);
1102 msg->addStringFast(_PREHASH_Message, ""); 1102 msg->addStringFast(_PREHASH_Message, "");
1103 msg->addU32Fast(_PREHASH_ParentEstateID, 0); 1103 msg->addU32Fast(_PREHASH_ParentEstateID, 0);
1104 msg->addUUIDFast(_PREHASH_RegionID, LLUUID::null); 1104 msg->addUUIDFast(_PREHASH_RegionID, LLUUID::null);
1105 msg->addVector3Fast(_PREHASH_Position, gAgent.getPositionAgent()); 1105 msg->addVector3Fast(_PREHASH_Position, gAgent.getPositionAgent());
@@ -1159,9 +1159,9 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD&
1159 { 1159 {
1160 from_string = chatHistory_string = mFromName; 1160 from_string = chatHistory_string = mFromName;
1161 } 1161 }
1162 1162
1163 bool busy=FALSE; 1163 bool busy=FALSE;
1164 1164
1165 switch(button) 1165 switch(button)
1166 { 1166 {
1167 case IOR_ACCEPT: 1167 case IOR_ACCEPT:
@@ -1183,7 +1183,7 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD&
1183 // ACCEPT. The math for the dialog works, because the accept 1183 // ACCEPT. The math for the dialog works, because the accept
1184 // for inventory_offered, task_inventory_offer or 1184 // for inventory_offered, task_inventory_offer or
1185 // group_notice_inventory is 1 greater than the offer integer value. 1185 // group_notice_inventory is 1 greater than the offer integer value.
1186 // Generates IM_INVENTORY_ACCEPTED, IM_TASK_INVENTORY_ACCEPTED, 1186 // Generates IM_INVENTORY_ACCEPTED, IM_TASK_INVENTORY_ACCEPTED,
1187 // or IM_GROUP_NOTICE_INVENTORY_ACCEPTED 1187 // or IM_GROUP_NOTICE_INVENTORY_ACCEPTED
1188 msg->addU8Fast(_PREHASH_Dialog, (U8)(mIM + 1)); 1188 msg->addU8Fast(_PREHASH_Dialog, (U8)(mIM + 1));
1189 msg->addBinaryDataFast(_PREHASH_BinaryBucket, &(mFolderID.mData), 1189 msg->addBinaryDataFast(_PREHASH_BinaryBucket, &(mFolderID.mData),
@@ -1283,7 +1283,7 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD&
1283 LLFloaterChat::addChatHistory(chat); 1283 LLFloaterChat::addChatHistory(chat);
1284 1284
1285 // If it's from an agent, we have to fetch the item to throw 1285 // If it's from an agent, we have to fetch the item to throw
1286 // it away. If it's from a task or group, just denying the 1286 // it away. If it's from a task or group, just denying the
1287 // request will suffice to discard the item. 1287 // request will suffice to discard the item.
1288 if(IM_INVENTORY_OFFERED == mIM) 1288 if(IM_INVENTORY_OFFERED == mIM)
1289 { 1289 {
@@ -1301,7 +1301,7 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD&
1301 { 1301 {
1302 opener = discard_agent_offer; 1302 opener = discard_agent_offer;
1303 } 1303 }
1304 1304
1305 } 1305 }
1306 if (busy && (!mFromGroup && !mFromObject)) 1306 if (busy && (!mFromGroup && !mFromObject))
1307 { 1307 {
@@ -1333,7 +1333,7 @@ void inventory_offer_handler(LLOfferInfo* info, BOOL from_task)
1333 info->forceResponse(IOR_BUSY); 1333 info->forceResponse(IOR_BUSY);
1334 return; 1334 return;
1335 } 1335 }
1336 1336
1337 //If muted, don't even go through the messaging stuff. Just curtail the offer here. 1337 //If muted, don't even go through the messaging stuff. Just curtail the offer here.
1338 if (LLMuteList::getInstance()->isMuted(info->mFromID, info->mFromName)) 1338 if (LLMuteList::getInstance()->isMuted(info->mFromID, info->mFromName))
1339 { 1339 {
@@ -1372,7 +1372,7 @@ void inventory_offer_handler(LLOfferInfo* info, BOOL from_task)
1372 } 1372 }
1373// [/RLVa:KB] 1373// [/RLVa:KB]
1374 } 1374 }
1375 1375
1376 LLSD args; 1376 LLSD args;
1377 args["[OBJECTNAME]"] = msg; 1377 args["[OBJECTNAME]"] = msg;
1378 1378
@@ -1475,7 +1475,7 @@ static LLNotificationFunctorRegistration group_vote_callback_reg("GroupVote", gr
1475bool lure_callback(const LLSD& notification, const LLSD& response) 1475bool lure_callback(const LLSD& notification, const LLSD& response)
1476{ 1476{
1477 S32 option = 0; 1477 S32 option = 0;
1478 if (response.isInteger()) 1478 if (response.isInteger())
1479 { 1479 {
1480 option = response.asInteger(); 1480 option = response.asInteger();
1481 } 1481 }
@@ -1483,7 +1483,7 @@ bool lure_callback(const LLSD& notification, const LLSD& response)
1483 { 1483 {
1484 option = LLNotification::getSelectedOption(notification, response); 1484 option = LLNotification::getSelectedOption(notification, response);
1485 } 1485 }
1486 1486
1487 LLUUID from_id = notification["payload"]["from_id"].asUUID(); 1487 LLUUID from_id = notification["payload"]["from_id"].asUUID();
1488 LLUUID lure_id = notification["payload"]["lure_id"].asUUID(); 1488 LLUUID lure_id = notification["payload"]["lure_id"].asUUID();
1489 BOOL godlike = notification["payload"]["godlike"].asBoolean(); 1489 BOOL godlike = notification["payload"]["godlike"].asBoolean();
@@ -1543,7 +1543,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
1543 S32 binary_bucket_size; 1543 S32 binary_bucket_size;
1544 LLChat chat; 1544 LLChat chat;
1545 std::string buffer; 1545 std::string buffer;
1546 1546
1547 // *TODO:translate - need to fix the full name to first/last (maybe) 1547 // *TODO:translate - need to fix the full name to first/last (maybe)
1548 msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, from_id); 1548 msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, from_id);
1549 msg->getBOOLFast(_PREHASH_MessageBlock, _PREHASH_FromGroup, from_group); 1549 msg->getBOOLFast(_PREHASH_MessageBlock, _PREHASH_FromGroup, from_group);
@@ -1568,7 +1568,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
1568 BOOL is_owned_by_me = FALSE; 1568 BOOL is_owned_by_me = FALSE;
1569 1569
1570 LLUUID computed_session_id = LLIMMgr::computeSessionID(dialog,from_id); 1570 LLUUID computed_session_id = LLIMMgr::computeSessionID(dialog,from_id);
1571 1571
1572 chat.mMuted = is_muted && !is_linden; 1572 chat.mMuted = is_muted && !is_linden;
1573 chat.mFromID = from_id; 1573 chat.mFromID = from_id;
1574 chat.mFromName = name; 1574 chat.mFromName = name;
@@ -1596,7 +1596,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
1596 || dialog == IM_TYPING_STOP 1596 || dialog == IM_TYPING_STOP
1597 || dialog == IM_BUSY_AUTO_RESPONSE) 1597 || dialog == IM_BUSY_AUTO_RESPONSE)
1598 { 1598 {
1599 1599
1600 if(session_id != computed_session_id) 1600 if(session_id != computed_session_id)
1601 { 1601 {
1602 session_id = computed_session_id; 1602 session_id = computed_session_id;
@@ -1835,7 +1835,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
1835 } 1835 }
1836 } 1836 }
1837 //InstantMessageResponseItem< 1837 //InstantMessageResponseItem<
1838 1838
1839 } 1839 }
1840 } 1840 }
1841 } 1841 }
@@ -1855,10 +1855,10 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
1855 LLNotifications::instance().add("SystemMessageTip",args); 1855 LLNotifications::instance().add("SystemMessageTip",args);
1856 break; 1856 break;
1857 1857
1858 case IM_NOTHING_SPECIAL: 1858 case IM_NOTHING_SPECIAL:
1859 // Don't show dialog, just do IM 1859 // Don't show dialog, just do IM
1860 if (!gAgent.isGodlike() 1860 if (!gAgent.isGodlike()
1861 && gAgent.getRegion()->isPrelude() 1861 && gAgent.getRegion()->isPrelude()
1862 && to_id.isNull() ) 1862 && to_id.isNull() )
1863 { 1863 {
1864 // do nothing -- don't distract newbies in 1864 // do nothing -- don't distract newbies in
@@ -1875,11 +1875,11 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
1875// [/RLVa:KB] 1875// [/RLVa:KB]
1876// else if (offline == IM_ONLINE && !is_linden && is_busy && name != SYSTEM_FROM) 1876// else if (offline == IM_ONLINE && !is_linden && is_busy && name != SYSTEM_FROM)
1877// [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) 1877// [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g)
1878 else if ( (offline == IM_ONLINE && !is_linden && is_busy && name != SYSTEM_FROM) && 1878 else if ( (offline == IM_ONLINE && !is_linden && is_busy && name != SYSTEM_FROM) &&
1879 ( (!gRlvHandler.hasBehaviour(RLV_BHVR_RECVIM)) || (gRlvHandler.isException(RLV_BHVR_RECVIM, from_id))) ) 1879 ( (!gRlvHandler.hasBehaviour(RLV_BHVR_RECVIM)) || (gRlvHandler.isException(RLV_BHVR_RECVIM, from_id))) )
1880// [/RLVa:KB] 1880// [/RLVa:KB]
1881 { 1881 {
1882 // return a standard "busy" message, but only do it to online IM 1882 // return a standard "busy" message, but only do it to online IM
1883 // (i.e. not other auto responses and not store-and-forward IM) 1883 // (i.e. not other auto responses and not store-and-forward IM)
1884 if (!gIMMgr->hasSession(session_id)) 1884 if (!gIMMgr->hasSession(session_id))
1885 { 1885 {
@@ -1905,7 +1905,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
1905 // now store incoming IM in chat history 1905 // now store incoming IM in chat history
1906 1906
1907 buffer = separator_string + message.substr(message_offset); 1907 buffer = separator_string + message.substr(message_offset);
1908 1908
1909 LL_INFOS("Messaging") << "process_improved_im: session_id( " << session_id << " ), from_id( " << from_id << " )" << LL_ENDL; 1909 LL_INFOS("Messaging") << "process_improved_im: session_id( " << session_id << " ), from_id( " << from_id << " )" << LL_ENDL;
1910 1910
1911 // add to IM panel, but do not bother the user 1911 // add to IM panel, but do not bother the user
@@ -1936,7 +1936,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
1936 { 1936 {
1937// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-08 (RLVa-1.0.0e) 1937// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-08 (RLVa-1.0.0e)
1938 // Filter region messages that weren't sent by a Linden 1938 // Filter region messages that weren't sent by a Linden
1939 if ( (rlv_handler_t::isEnabled()) && (LLMuteList::getInstance()) && 1939 if ( (rlv_handler_t::isEnabled()) && (LLMuteList::getInstance()) &&
1940 (!LLMuteList::getInstance()->isLinden(name)) && (from_id != gAgent.getID()) ) 1940 (!LLMuteList::getInstance()->isLinden(name)) && (from_id != gAgent.getID()) )
1941 { 1941 {
1942 if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) 1942 if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC))
@@ -2051,7 +2051,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
2051 U8 item_name[DB_INV_ITEM_NAME_BUF_SIZE]; 2051 U8 item_name[DB_INV_ITEM_NAME_BUF_SIZE];
2052 }* notice_bin_bucket; 2052 }* notice_bin_bucket;
2053 2053
2054 // Make sure the binary bucket is big enough to hold the header 2054 // Make sure the binary bucket is big enough to hold the header
2055 // and a null terminated item name. 2055 // and a null terminated item name.
2056 if ( (binary_bucket_size < (S32)((sizeof(notice_bucket_header_t) + sizeof(U8)))) 2056 if ( (binary_bucket_size < (S32)((sizeof(notice_bucket_header_t) + sizeof(U8))))
2057 || (binary_bucket[binary_bucket_size - 1] != '\0') ) 2057 || (binary_bucket[binary_bucket_size - 1] != '\0') )
@@ -2072,7 +2072,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
2072 if (has_inventory) 2072 if (has_inventory)
2073 { 2073 {
2074 info = new LLOfferInfo; 2074 info = new LLOfferInfo;
2075 2075
2076 info->mIM = IM_GROUP_NOTICE; 2076 info->mIM = IM_GROUP_NOTICE;
2077 info->mFromID = from_id; 2077 info->mFromID = from_id;
2078 info->mFromGroup = from_group; 2078 info->mFromGroup = from_group;
@@ -2088,7 +2088,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
2088 info->mDesc = item_name; 2088 info->mDesc = item_name;
2089 info->mHost = msg->getSender(); 2089 info->mHost = msg->getSender();
2090 } 2090 }
2091 2091
2092 std::string str(message); 2092 std::string str(message);
2093 2093
2094 // Tokenize the string. 2094 // Tokenize the string.
@@ -2292,7 +2292,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
2292 LL_WARNS("Messaging") << "Received IM: IM_GROUP_ELECTION_DEPRECATED" << LL_ENDL; 2292 LL_WARNS("Messaging") << "Received IM: IM_GROUP_ELECTION_DEPRECATED" << LL_ENDL;
2293 } 2293 }
2294 break; 2294 break;
2295 2295
2296 case IM_SESSION_SEND: 2296 case IM_SESSION_SEND:
2297 { 2297 {
2298 if (!is_linden && is_busy) 2298 if (!is_linden && is_busy)
@@ -2354,7 +2354,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
2354 { 2354 {
2355 group_name = std::string((char*)binary_bucket); 2355 group_name = std::string((char*)binary_bucket);
2356 } 2356 }
2357 chat.mText = std::string("IM [") + group_name + std::string("] ") + name 2357 chat.mText = std::string("IM [") + group_name + std::string("] ") + name
2358 + separator_string + saved + message.substr(message_offset); 2358 + separator_string + saved + message.substr(message_offset);
2359 } 2359 }
2360 else 2360 else
@@ -2401,7 +2401,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
2401 } 2401 }
2402 2402
2403 std::string tempname = name; 2403 std::string tempname = name;
2404 2404
2405 size_t found = tempname.find(" "); 2405 size_t found = tempname.find(" ");
2406 while(found != std::string::npos) 2406 while(found != std::string::npos)
2407 { 2407 {
@@ -2413,7 +2413,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
2413 { 2413 {
2414 name = ">>"; 2414 name = ">>";
2415 chat.mFromName = name; 2415 chat.mFromName = name;
2416 2416
2417 } 2417 }
2418 2418
2419 std::ostringstream link; 2419 std::ostringstream link;
@@ -2465,14 +2465,14 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
2465 gIMMgr->addMessage(session_id, from_id, name, buffer); 2465 gIMMgr->addMessage(session_id, from_id, name, buffer);
2466 } 2466 }
2467 break; 2467 break;
2468 2468
2469 case IM_LURE_USER: 2469 case IM_LURE_USER:
2470 { 2470 {
2471 if (is_muted) 2471 if (is_muted)
2472 { 2472 {
2473 return; 2473 return;
2474 } 2474 }
2475 else if (is_busy) 2475 else if (is_busy)
2476 { 2476 {
2477 busy_message(msg,from_id); 2477 busy_message(msg,from_id);
2478 } 2478 }
@@ -2608,7 +2608,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
2608 } 2608 }
2609 2609
2610 std::string url; 2610 std::string url;
2611 2611
2612 url.assign((char*)binary_bucket, binary_bucket_size-1); 2612 url.assign((char*)binary_bucket, binary_bucket_size-1);
2613 args["MESSAGE"] = message; 2613 args["MESSAGE"] = message;
2614 args["URL"] = url; 2614 args["URL"] = url;
@@ -2658,11 +2658,11 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
2658 // as the database should already include the relationship. But it 2658 // as the database should already include the relationship. But it
2659 // doesn't hurt for dupes. 2659 // doesn't hurt for dupes.
2660 LLAvatarTracker::formFriendship(from_id); 2660 LLAvatarTracker::formFriendship(from_id);
2661 2661
2662 std::vector<std::string> strings; 2662 std::vector<std::string> strings;
2663 strings.push_back(from_id.asString()); 2663 strings.push_back(from_id.asString());
2664 send_generic_message("requestonlinenotification", strings); 2664 send_generic_message("requestonlinenotification", strings);
2665 2665
2666 args["NAME"] = name; 2666 args["NAME"] = name;
2667 LLNotifications::instance().add("FriendshipAccepted", args); 2667 LLNotifications::instance().add("FriendshipAccepted", args);
2668 } 2668 }
@@ -2682,7 +2682,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
2682 } 2682 }
2683} 2683}
2684 2684
2685void busy_message (LLMessageSystem* msg, LLUUID from_id) 2685void busy_message (LLMessageSystem* msg, LLUUID from_id)
2686{ 2686{
2687 if (gAgent.getBusy()) 2687 if (gAgent.getBusy())
2688 { 2688 {
@@ -2725,7 +2725,7 @@ bool callingcard_offer_callback(const LLSD& notification, const LLSD& response)
2725 msg->sendReliable(LLHost(notification["payload"]["sender"].asString())); 2725 msg->sendReliable(LLHost(notification["payload"]["sender"].asString()));
2726 break; 2726 break;
2727 case 1: 2727 case 1:
2728 // decline 2728 // decline
2729 msg->newMessageFast(_PREHASH_DeclineCallingCard); 2729 msg->newMessageFast(_PREHASH_DeclineCallingCard);
2730 msg->nextBlockFast(_PREHASH_AgentData); 2730 msg->nextBlockFast(_PREHASH_AgentData);
2731 msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); 2731 msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
@@ -2776,7 +2776,7 @@ void process_offer_callingcard(LLMessageSystem* msg, void**)
2776 2776
2777 if(!source_name.empty()) 2777 if(!source_name.empty())
2778 { 2778 {
2779 if (gAgent.getBusy() 2779 if (gAgent.getBusy()
2780 || LLMuteList::getInstance()->isMuted(source_id, source_name, LLMute::flagTextChat)) 2780 || LLMuteList::getInstance()->isMuted(source_id, source_name, LLMute::flagTextChat))
2781 { 2781 {
2782 // automatically decline offer 2782 // automatically decline offer
@@ -2833,13 +2833,13 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
2833 2833
2834 msg->getString("ChatData", "FromName", from_name); 2834 msg->getString("ChatData", "FromName", from_name);
2835 chat.mFromName = from_name; 2835 chat.mFromName = from_name;
2836 2836
2837 msg->getUUID("ChatData", "SourceID", from_id); 2837 msg->getUUID("ChatData", "SourceID", from_id);
2838 chat.mFromID = from_id; 2838 chat.mFromID = from_id;
2839 2839
2840 // Object owner for objects 2840 // Object owner for objects
2841 msg->getUUID("ChatData", "OwnerID", owner_id); 2841 msg->getUUID("ChatData", "OwnerID", owner_id);
2842 2842
2843 msg->getU8Fast(_PREHASH_ChatData, _PREHASH_SourceType, source_temp); 2843 msg->getU8Fast(_PREHASH_ChatData, _PREHASH_SourceType, source_temp);
2844 chat.mSourceType = (EChatSourceType)source_temp; 2844 chat.mSourceType = (EChatSourceType)source_temp;
2845 2845
@@ -2848,9 +2848,9 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
2848 2848
2849 msg->getU8Fast(_PREHASH_ChatData, _PREHASH_Audible, audible_temp); 2849 msg->getU8Fast(_PREHASH_ChatData, _PREHASH_Audible, audible_temp);
2850 chat.mAudible = (EChatAudible)audible_temp; 2850 chat.mAudible = (EChatAudible)audible_temp;
2851 2851
2852 chat.mTime = LLFrameTimer::getElapsedSeconds(); 2852 chat.mTime = LLFrameTimer::getElapsedSeconds();
2853 2853
2854 BOOL is_busy = gAgent.getBusy(); 2854 BOOL is_busy = gAgent.getBusy();
2855 2855
2856 BOOL is_muted = FALSE; 2856 BOOL is_muted = FALSE;
@@ -2858,7 +2858,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
2858 is_muted = LLMuteList::getInstance()->isMuted( 2858 is_muted = LLMuteList::getInstance()->isMuted(
2859 from_id, 2859 from_id,
2860 from_name, 2860 from_name,
2861 LLMute::flagTextChat) 2861 LLMute::flagTextChat)
2862 || LLMuteList::getInstance()->isMuted(owner_id, LLMute::flagTextChat); 2862 || LLMuteList::getInstance()->isMuted(owner_id, LLMute::flagTextChat);
2863 is_linden = chat.mSourceType != CHAT_SOURCE_OBJECT && 2863 is_linden = chat.mSourceType != CHAT_SOURCE_OBJECT &&
2864 LLMuteList::getInstance()->isLinden(from_name); 2864 LLMuteList::getInstance()->isLinden(from_name);
@@ -2868,9 +2868,9 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
2868 if (chatter) 2868 if (chatter)
2869 { 2869 {
2870 chat.mPosAgent = chatter->getPositionAgent(); 2870 chat.mPosAgent = chatter->getPositionAgent();
2871 2871
2872 // Make swirly things only for talking objects. (not script debug messages, though) 2872 // Make swirly things only for talking objects. (not script debug messages, though)
2873// if (chat.mSourceType == CHAT_SOURCE_OBJECT 2873// if (chat.mSourceType == CHAT_SOURCE_OBJECT
2874// && chat.mChatType != CHAT_TYPE_DEBUG_MSG) 2874// && chat.mChatType != CHAT_TYPE_DEBUG_MSG)
2875// [RLVa:KB] - Alternate: Snowglobe-1.2.4 | Checked: 2009-07-10 (RLVa-1.0.0g) 2875// [RLVa:KB] - Alternate: Snowglobe-1.2.4 | Checked: 2009-07-10 (RLVa-1.0.0g)
2876 // Don't show swirly things for llOwnerSay() chat here because we handle those further down 2876 // Don't show swirly things for llOwnerSay() chat here because we handle those further down
@@ -2882,7 +2882,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
2882 LLPointer<LLViewerPartSourceChat> psc = new LLViewerPartSourceChat(chatter->getPositionAgent()); 2882 LLPointer<LLViewerPartSourceChat> psc = new LLViewerPartSourceChat(chatter->getPositionAgent());
2883 psc->setSourceObject(chatter); 2883 psc->setSourceObject(chatter);
2884 psc->setColor(color); 2884 psc->setColor(color);
2885 //We set the particles to be owned by the object's owner, 2885 //We set the particles to be owned by the object's owner,
2886 //just in case they should be muted by the mute list 2886 //just in case they should be muted by the mute list
2887 psc->setOwnerUUID(owner_id); 2887 psc->setOwnerUUID(owner_id);
2888 LLViewerPartSim::getInstance()->addPartSource(psc); 2888 LLViewerPartSim::getInstance()->addPartSource(psc);
@@ -2892,7 +2892,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
2892 if (is_audible 2892 if (is_audible
2893 && (is_linden || (!is_muted && !is_busy))) 2893 && (is_linden || (!is_muted && !is_busy)))
2894 { 2894 {
2895 if (chat.mChatType != CHAT_TYPE_START 2895 if (chat.mChatType != CHAT_TYPE_START
2896 && chat.mChatType != CHAT_TYPE_STOP) 2896 && chat.mChatType != CHAT_TYPE_STOP)
2897 { 2897 {
2898 gAgent.heardChat(chat.mFromID); 2898 gAgent.heardChat(chat.mFromID);
@@ -2902,7 +2902,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
2902 is_owned_by_me = chatter->permYouOwner(); 2902 is_owned_by_me = chatter->permYouOwner();
2903 } 2903 }
2904 2904
2905 if(chat.mSourceType == CHAT_SOURCE_OBJECT 2905 if(chat.mSourceType == CHAT_SOURCE_OBJECT
2906 && chat.mChatType != CHAT_TYPE_DEBUG_MSG 2906 && chat.mChatType != CHAT_TYPE_DEBUG_MSG
2907 && !owner_id.isNull() 2907 && !owner_id.isNull()
2908 && owner_id != gAgent.getID()) 2908 && owner_id != gAgent.getID())
@@ -2964,7 +2964,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
2964 msg->getStringFast(_PREHASH_ChatData, _PREHASH_Message, mesg); 2964 msg->getStringFast(_PREHASH_ChatData, _PREHASH_Message, mesg);
2965 2965
2966// [RLVa:KB] - Checked: 2009-10-06 (RLVa-1.0.4d) | Modified: RLVa-1.0.4d 2966// [RLVa:KB] - Checked: 2009-10-06 (RLVa-1.0.4d) | Modified: RLVa-1.0.4d
2967 if ( (rlv_handler_t::isEnabled()) && 2967 if ( (rlv_handler_t::isEnabled()) &&
2968 (CHAT_TYPE_START != chat.mChatType) && (CHAT_TYPE_STOP != chat.mChatType) && (CHAT_TYPE_OWNER != chat.mChatType) ) 2968 (CHAT_TYPE_START != chat.mChatType) && (CHAT_TYPE_STOP != chat.mChatType) && (CHAT_TYPE_OWNER != chat.mChatType) )
2969 { 2969 {
2970 // NOTE: chatter can be NULL (may not have rezzed yet, or could be another avie's HUD attachment) 2970 // NOTE: chatter can be NULL (may not have rezzed yet, or could be another avie's HUD attachment)
@@ -2973,7 +2973,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
2973 // Filtering "rules": 2973 // Filtering "rules":
2974 // avatar => filter all avie text (unless it's this avie or they're an exemption) 2974 // avatar => filter all avie text (unless it's this avie or they're an exemption)
2975 // objects => filter everything except attachments this avie owns 2975 // objects => filter everything except attachments this avie owns
2976 if ( ( (CHAT_SOURCE_AGENT == chat.mSourceType) && (from_id != gAgent.getID()) ) || 2976 if ( ( (CHAT_SOURCE_AGENT == chat.mSourceType) && (from_id != gAgent.getID()) ) ||
2977 ( (CHAT_SOURCE_OBJECT == chat.mSourceType) && ((!is_owned_by_me) || (!is_attachment)) ) ) 2977 ( (CHAT_SOURCE_OBJECT == chat.mSourceType) && ((!is_owned_by_me) || (!is_attachment)) ) )
2978 { 2978 {
2979 if (!rlvIsEmote(mesg)) 2979 if (!rlvIsEmote(mesg))
@@ -2996,7 +2996,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
2996 { 2996 {
2997 if (chat.mFromID != gAgent.getID()) 2997 if (chat.mFromID != gAgent.getID())
2998 from_name = RlvStrings::getAnonym(from_name); 2998 from_name = RlvStrings::getAnonym(from_name);
2999 } 2999 }
3000 else 3000 else
3001 { 3001 {
3002 if ( (!is_owned_by_me) || (!is_attachment) ) 3002 if ( (!is_owned_by_me) || (!is_attachment) )
@@ -3038,7 +3038,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
3038 if (LLFloaterMap::getInstance()) 3038 if (LLFloaterMap::getInstance())
3039 { 3039 {
3040 PanelRadarEntry* entry = LLFloaterMap::getInstance()->getRadar()->getEntry(from_id); 3040 PanelRadarEntry* entry = LLFloaterMap::getInstance()->getRadar()->getEntry(from_id);
3041 if (entry) 3041 if (entry)
3042 { 3042 {
3043 entry->setStatus(RADAR_STATUS_TYPING); 3043 entry->setStatus(RADAR_STATUS_TYPING);
3044 } 3044 }
@@ -3059,7 +3059,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
3059 if (LLFloaterMap::getInstance()) 3059 if (LLFloaterMap::getInstance())
3060 { 3060 {
3061 PanelRadarEntry* entry = LLFloaterMap::getInstance()->getRadar()->getEntry(from_id); 3061 PanelRadarEntry* entry = LLFloaterMap::getInstance()->getRadar()->getEntry(from_id);
3062 if (entry) 3062 if (entry)
3063 { 3063 {
3064 entry->setStatus(RADAR_STATUS_NONE); 3064 entry->setStatus(RADAR_STATUS_NONE);
3065 } 3065 }
@@ -3076,7 +3076,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
3076 3076
3077 if (!is_muted && !is_busy) 3077 if (!is_muted && !is_busy)
3078 { 3078 {
3079 3079
3080 BOOL sUseChatBubbles = gSavedSettings.getBOOL("UseChatBubbles"); 3080 BOOL sUseChatBubbles = gSavedSettings.getBOOL("UseChatBubbles");
3081 if(sUseChatBubbles) 3081 if(sUseChatBubbles)
3082 { 3082 {
@@ -3162,7 +3162,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
3162 verb = " retained: @"; 3162 verb = " retained: @";
3163 mesg = strRetained; 3163 mesg = strRetained;
3164 } 3164 }
3165 else 3165 else
3166 { 3166 {
3167 verb = ": @"; 3167 verb = ": @";
3168 if (!strExecuted.empty()) 3168 if (!strExecuted.empty())
@@ -3183,7 +3183,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
3183 LLPointer<LLViewerPartSourceChat> psc = new LLViewerPartSourceChat(chatter->getPositionAgent()); 3183 LLPointer<LLViewerPartSourceChat> psc = new LLViewerPartSourceChat(chatter->getPositionAgent());
3184 psc->setSourceObject(chatter); 3184 psc->setSourceObject(chatter);
3185 psc->setColor(color); 3185 psc->setColor(color);
3186 //We set the particles to be owned by the object's owner, 3186 //We set the particles to be owned by the object's owner,
3187 //just in case they should be muted by the mute list 3187 //just in case they should be muted by the mute list
3188 psc->setOwnerUUID(owner_id); 3188 psc->setOwnerUUID(owner_id);
3189 LLViewerPartSim::getInstance()->addPartSource(psc); 3189 LLViewerPartSim::getInstance()->addPartSource(psc);
@@ -3211,7 +3211,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
3211 chat.mText += verb; 3211 chat.mText += verb;
3212 chat.mText += mesg; 3212 chat.mText += mesg;
3213 } 3213 }
3214 3214
3215 if (chatter) 3215 if (chatter)
3216 { 3216 {
3217 chat.mPosAgent = chatter->getPositionAgent(); 3217 chat.mPosAgent = chatter->getPositionAgent();
@@ -3230,9 +3230,9 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
3230 // T * * * F Yes Yes 3230 // T * * * F Yes Yes
3231 3231
3232 chat.mMuted = is_muted && !is_linden; 3232 chat.mMuted = is_muted && !is_linden;
3233 3233
3234 3234
3235 if (!visible_in_chat_bubble 3235 if (!visible_in_chat_bubble
3236 && (is_linden || !is_busy || is_owned_by_me)) 3236 && (is_linden || !is_busy || is_owned_by_me))
3237 { 3237 {
3238 // show on screen and add to history 3238 // show on screen and add to history
@@ -3248,10 +3248,10 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
3248 3248
3249 3249
3250// Simulator we're on is informing the viewer that the agent 3250// Simulator we're on is informing the viewer that the agent
3251// is starting to teleport (perhaps to another sim, perhaps to the 3251// is starting to teleport (perhaps to another sim, perhaps to the
3252// same sim). If we initiated the teleport process by sending some kind 3252// same sim). If we initiated the teleport process by sending some kind
3253// of TeleportRequest, then this info is redundant, but if the sim 3253// of TeleportRequest, then this info is redundant, but if the sim
3254// initiated the teleport (via a script call, being killed, etc.) 3254// initiated the teleport (via a script call, being killed, etc.)
3255// then this info is news to us. 3255// then this info is news to us.
3256void process_teleport_start(LLMessageSystem *msg, void**) 3256void process_teleport_start(LLMessageSystem *msg, void**)
3257{ 3257{
@@ -3278,7 +3278,7 @@ void process_teleport_start(LLMessageSystem *msg, void**)
3278 gTeleportDisplay = TRUE; 3278 gTeleportDisplay = TRUE;
3279 gAgent.setTeleportState( LLAgent::TELEPORT_START ); 3279 gAgent.setTeleportState( LLAgent::TELEPORT_START );
3280 make_ui_sound("UISndTeleportOut"); 3280 make_ui_sound("UISndTeleportOut");
3281 3281
3282 // Don't call LLFirstUse::useTeleport here because this could be 3282 // Don't call LLFirstUse::useTeleport here because this could be
3283 // due to being killed, which would send you home, not to a Telehub 3283 // due to being killed, which would send you home, not to a Telehub
3284 } 3284 }
@@ -3315,7 +3315,7 @@ void process_teleport_progress(LLMessageSystem* msg, void**)
3315 //if we don't find the coresponding mapping in our progress mappings 3315 //if we don't find the coresponding mapping in our progress mappings
3316 std::string message = buffer; 3316 std::string message = buffer;
3317 3317
3318 if (LLAgent::sTeleportProgressMessages.find(buffer) != 3318 if (LLAgent::sTeleportProgressMessages.find(buffer) !=
3319 LLAgent::sTeleportProgressMessages.end() ) 3319 LLAgent::sTeleportProgressMessages.end() )
3320 { 3320 {
3321 message = LLAgent::sTeleportProgressMessages[buffer]; 3321 message = LLAgent::sTeleportProgressMessages[buffer];
@@ -3376,7 +3376,7 @@ public:
3376 3376
3377 3377
3378 3378
3379class LLPostTeleportNotifiers : public LLEventTimer 3379class LLPostTeleportNotifiers : public LLEventTimer
3380{ 3380{
3381public: 3381public:
3382 LLPostTeleportNotifiers(); 3382 LLPostTeleportNotifiers();
@@ -3403,10 +3403,10 @@ BOOL LLPostTeleportNotifiers::tick()
3403 LLInventoryFetchDescendentsObserver::folder_ref_t folders; 3403 LLInventoryFetchDescendentsObserver::folder_ref_t folders;
3404 LLUUID folder_id; 3404 LLUUID folder_id;
3405 folder_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_CALLINGCARD); 3405 folder_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_CALLINGCARD);
3406 if(folder_id.notNull()) 3406 if(folder_id.notNull())
3407 folders.push_back(folder_id); 3407 folders.push_back(folder_id);
3408 folder_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_LANDMARK); 3408 folder_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_LANDMARK);
3409 if(folder_id.notNull()) 3409 if(folder_id.notNull())
3410 folders.push_back(folder_id); 3410 folders.push_back(folder_id);
3411 if(!folders.empty()) 3411 if(!folders.empty())
3412 { 3412 {
@@ -3462,7 +3462,7 @@ void process_teleport_finish(LLMessageSystem* msg, void**)
3462 msg->getU64Fast(_PREHASH_Info, _PREHASH_RegionHandle, region_handle); 3462 msg->getU64Fast(_PREHASH_Info, _PREHASH_RegionHandle, region_handle);
3463 U32 teleport_flags; 3463 U32 teleport_flags;
3464 msg->getU32Fast(_PREHASH_Info, _PREHASH_TeleportFlags, teleport_flags); 3464 msg->getU32Fast(_PREHASH_Info, _PREHASH_TeleportFlags, teleport_flags);
3465 3465
3466 U32 region_size_x = 256; 3466 U32 region_size_x = 256;
3467 msg->getU32Fast(_PREHASH_Info, _PREHASH_RegionSizeX, region_size_x); 3467 msg->getU32Fast(_PREHASH_Info, _PREHASH_RegionSizeX, region_size_x);
3468 U32 region_size_y = 256; 3468 U32 region_size_y = 256;
@@ -3474,17 +3474,17 @@ void process_teleport_finish(LLMessageSystem* msg, void**)
3474 region_size_x = 256; 3474 region_size_x = 256;
3475 region_size_y = 256; 3475 region_size_y = 256;
3476 } 3476 }
3477 3477
3478 std::string seedCap; 3478 std::string seedCap;
3479 msg->getStringFast(_PREHASH_Info, _PREHASH_SeedCapability, seedCap); 3479 msg->getStringFast(_PREHASH_Info, _PREHASH_SeedCapability, seedCap);
3480 3480
3481 // update home location if we are teleporting out of prelude - specific to teleporting to welcome area 3481 // update home location if we are teleporting out of prelude - specific to teleporting to welcome area
3482 if((teleport_flags & TELEPORT_FLAGS_SET_HOME_TO_TARGET) 3482 if((teleport_flags & TELEPORT_FLAGS_SET_HOME_TO_TARGET)
3483 && (!gAgent.isGodlike())) 3483 && (!gAgent.isGodlike()))
3484 { 3484 {
3485 gAgent.setHomePosRegion(region_handle, pos); 3485 gAgent.setHomePosRegion(region_handle, pos);
3486 3486
3487 // Create a timer that will send notices when teleporting is all finished. Since this is 3487 // Create a timer that will send notices when teleporting is all finished. Since this is
3488 // based on the LLEventTimer class, it will be managed by that class and not orphaned or leaked. 3488 // based on the LLEventTimer class, it will be managed by that class and not orphaned or leaked.
3489 new LLPostTeleportNotifiers(); 3489 new LLPostTeleportNotifiers();
3490 } 3490 }
@@ -3587,7 +3587,7 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**)
3587 msg->getVector3Fast(_PREHASH_Data, _PREHASH_LookAt, look_at); 3587 msg->getVector3Fast(_PREHASH_Data, _PREHASH_LookAt, look_at);
3588 U64 region_handle; 3588 U64 region_handle;
3589 msg->getU64Fast(_PREHASH_Data, _PREHASH_RegionHandle, region_handle); 3589 msg->getU64Fast(_PREHASH_Data, _PREHASH_RegionHandle, region_handle);
3590 3590
3591 std::string version_channel; 3591 std::string version_channel;
3592 msg->getString("SimData", "ChannelVersion", version_channel); 3592 msg->getString("SimData", "ChannelVersion", version_channel);
3593 3593
@@ -3609,8 +3609,8 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**)
3609 LL_WARNS("Messaging") << "current region " << gAgent.getRegion()->getOriginGlobal() << LL_ENDL; 3609 LL_WARNS("Messaging") << "current region " << gAgent.getRegion()->getOriginGlobal() << LL_ENDL;
3610 } 3610 }
3611 3611
3612 LL_WARNS("Messaging") << "Agent being sent to invalid home region: " 3612 LL_WARNS("Messaging") << "Agent being sent to invalid home region: "
3613 << x << ":" << y 3613 << x << ":" << y
3614 << " current pos " << gAgent.getPositionGlobal() 3614 << " current pos " << gAgent.getPositionGlobal()
3615 << LL_ENDL; 3615 << LL_ENDL;
3616 LLAppViewer::instance()->forceDisconnect("You were sent to an invalid region."); 3616 LLAppViewer::instance()->forceDisconnect("You were sent to an invalid region.");
@@ -3658,7 +3658,7 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**)
3658// if (avatarp) 3658// if (avatarp)
3659 { 3659 {
3660 // Chat the "back" SLURL. (DEV-4907) 3660 // Chat the "back" SLURL. (DEV-4907)
3661 // Show this in the console if DisableTeleportScreens is true 3661 // Show this in the console if DisableTeleportScreens is true
3662 // Why? Because it's nifty, that's why -- MC 3662 // Why? Because it's nifty, that's why -- MC
3663 LLChat chat("Teleport completed from " + gAgent.getTeleportSourceSLURL()); 3663 LLChat chat("Teleport completed from " + gAgent.getTeleportSourceSLURL());
3664 chat.mSourceType = CHAT_SOURCE_SYSTEM; 3664 chat.mSourceType = CHAT_SOURCE_SYSTEM;
@@ -3748,7 +3748,7 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**)
3748 { 3748 {
3749 avatarp->mFootPlane.clearVec(); 3749 avatarp->mFootPlane.clearVec();
3750 } 3750 }
3751 3751
3752 // send walk-vs-run status 3752 // send walk-vs-run status
3753 gAgent.sendWalkRun(gAgent.getRunning() || gAgent.getAlwaysRun()); 3753 gAgent.sendWalkRun(gAgent.getRunning() || gAgent.getAlwaysRun());
3754 3754
@@ -3805,7 +3805,7 @@ void process_crossed_region(LLMessageSystem* msg, void**)
3805 LLHost sim_host(sim_ip, sim_port); 3805 LLHost sim_host(sim_ip, sim_port);
3806 U64 region_handle; 3806 U64 region_handle;
3807 msg->getU64Fast(_PREHASH_RegionData, _PREHASH_RegionHandle, region_handle); 3807 msg->getU64Fast(_PREHASH_RegionData, _PREHASH_RegionHandle, region_handle);
3808 3808
3809 std::string seedCap; 3809 std::string seedCap;
3810 msg->getStringFast(_PREHASH_RegionData, _PREHASH_SeedCapability, seedCap); 3810 msg->getStringFast(_PREHASH_RegionData, _PREHASH_SeedCapability, seedCap);
3811 3811
@@ -3874,11 +3874,11 @@ void send_agent_update(BOOL force_send, BOOL send_reliable)
3874 const U8 DUP_MSGS = 1; // HACK! number of times to repeat data on motionless agent 3874 const U8 DUP_MSGS = 1; // HACK! number of times to repeat data on motionless agent
3875 3875
3876 // Store data on last sent update so that if no changes, no send 3876 // Store data on last sent update so that if no changes, no send
3877 static LLVector3 last_camera_pos_agent, 3877 static LLVector3 last_camera_pos_agent,
3878 last_camera_at, 3878 last_camera_at,
3879 last_camera_left, 3879 last_camera_left,
3880 last_camera_up; 3880 last_camera_up;
3881 3881
3882 static LLVector3 cam_center_chg, 3882 static LLVector3 cam_center_chg,
3883 cam_rot_chg; 3883 cam_rot_chg;
3884 3884
@@ -3931,13 +3931,13 @@ void send_agent_update(BOOL force_send, BOOL send_reliable)
3931 3931
3932 head_rot_chg = dot(last_head_rot, head_rotation); 3932 head_rot_chg = dot(last_head_rot, head_rotation);
3933 3933
3934 if (force_send || 3934 if (force_send ||
3935 (cam_center_chg.magVec() > TRANSLATE_THRESHOLD) || 3935 (cam_center_chg.magVec() > TRANSLATE_THRESHOLD) ||
3936 (head_rot_chg < THRESHOLD_HEAD_ROT_QDOT) || 3936 (head_rot_chg < THRESHOLD_HEAD_ROT_QDOT) ||
3937 (last_render_state != render_state) || 3937 (last_render_state != render_state) ||
3938 (cam_rot_chg.magVec() > ROTATION_THRESHOLD) || 3938 (cam_rot_chg.magVec() > ROTATION_THRESHOLD) ||
3939 control_flag_change != 0 || 3939 control_flag_change != 0 ||
3940 flag_change != 0) 3940 flag_change != 0)
3941 { 3941 {
3942/* 3942/*
3943 if (head_rot_chg < THRESHOLD_HEAD_ROT_QDOT) 3943 if (head_rot_chg < THRESHOLD_HEAD_ROT_QDOT)
@@ -3945,7 +3945,7 @@ void send_agent_update(BOOL force_send, BOOL send_reliable)
3945 //LL_INFOS("Messaging") << "head rot " << head_rotation << LL_ENDL; 3945 //LL_INFOS("Messaging") << "head rot " << head_rotation << LL_ENDL;
3946 LL_INFOS("Messaging") << "head_rot_chg = " << head_rot_chg << LL_ENDL; 3946 LL_INFOS("Messaging") << "head_rot_chg = " << head_rot_chg << LL_ENDL;
3947 } 3947 }
3948 if (cam_rot_chg.magVec() > ROTATION_THRESHOLD) 3948 if (cam_rot_chg.magVec() > ROTATION_THRESHOLD)
3949 { 3949 {
3950 LL_INFOS("Messaging") << "cam rot " << cam_rot_chg.magVec() << LL_ENDL; 3950 LL_INFOS("Messaging") << "cam rot " << cam_rot_chg.magVec() << LL_ENDL;
3951 } 3951 }
@@ -3976,8 +3976,8 @@ void send_agent_update(BOOL force_send, BOOL send_reliable)
3976 // some threshold from the last update, however this can break fine 3976 // some threshold from the last update, however this can break fine
3977 // adjustments when trying to aim an attached gun, so what we do here 3977 // adjustments when trying to aim an attached gun, so what we do here
3978 // (where we would normally skip sending an update when nothing has changed) 3978 // (where we would normally skip sending an update when nothing has changed)
3979 // is gradually reduce the threshold to allow a better update to 3979 // is gradually reduce the threshold to allow a better update to
3980 // eventually get sent... should update to within 0.5 degrees in less 3980 // eventually get sent... should update to within 0.5 degrees in less
3981 // than a second. 3981 // than a second.
3982 if (head_rot_chg < THRESHOLD_HEAD_ROT_QDOT + (MAX_HEAD_ROT_QDOT - THRESHOLD_HEAD_ROT_QDOT) * duplicate_count / AGENT_UPDATES_PER_SECOND) 3982 if (head_rot_chg < THRESHOLD_HEAD_ROT_QDOT + (MAX_HEAD_ROT_QDOT - THRESHOLD_HEAD_ROT_QDOT) * duplicate_count / AGENT_UPDATES_PER_SECOND)
3983 { 3983 {
@@ -4010,13 +4010,13 @@ void send_agent_update(BOOL force_send, BOOL send_reliable)
4010// { 4010// {
4011// LL_INFOS("Messaging") << "Sending camera center " << camera_pos_agent << LL_ENDL; 4011// LL_INFOS("Messaging") << "Sending camera center " << camera_pos_agent << LL_ENDL;
4012// } 4012// }
4013 4013
4014 msg->addVector3Fast(_PREHASH_CameraCenter, camera_pos_agent); 4014 msg->addVector3Fast(_PREHASH_CameraCenter, camera_pos_agent);
4015 msg->addVector3Fast(_PREHASH_CameraAtAxis, LLViewerCamera::getInstance()->getAtAxis()); 4015 msg->addVector3Fast(_PREHASH_CameraAtAxis, LLViewerCamera::getInstance()->getAtAxis());
4016 msg->addVector3Fast(_PREHASH_CameraLeftAxis, LLViewerCamera::getInstance()->getLeftAxis()); 4016 msg->addVector3Fast(_PREHASH_CameraLeftAxis, LLViewerCamera::getInstance()->getLeftAxis());
4017 msg->addVector3Fast(_PREHASH_CameraUpAxis, LLViewerCamera::getInstance()->getUpAxis()); 4017 msg->addVector3Fast(_PREHASH_CameraUpAxis, LLViewerCamera::getInstance()->getUpAxis());
4018 msg->addF32Fast(_PREHASH_Far, gAgent.mDrawDistance); 4018 msg->addF32Fast(_PREHASH_Far, gAgent.mDrawDistance);
4019 4019
4020 msg->addU32Fast(_PREHASH_ControlFlags, control_flags); 4020 msg->addU32Fast(_PREHASH_ControlFlags, control_flags);
4021 4021
4022 if (gDebugClicks) 4022 if (gDebugClicks)
@@ -4045,7 +4045,7 @@ void send_agent_update(BOOL force_send, BOOL send_reliable)
4045 4045
4046// LL_DEBUGS("Messaging") << "agent " << avatar_pos_agent << " cam " << camera_pos_agent << LL_ENDL; 4046// LL_DEBUGS("Messaging") << "agent " << avatar_pos_agent << " cam " << camera_pos_agent << LL_ENDL;
4047 4047
4048 // Copy the old data 4048 // Copy the old data
4049 last_head_rot = head_rotation; 4049 last_head_rot = head_rotation;
4050 last_render_state = render_state; 4050 last_render_state = render_state;
4051 last_camera_pos_agent = camera_pos_agent; 4051 last_camera_pos_agent = camera_pos_agent;
@@ -4064,7 +4064,7 @@ void send_agent_update(BOOL force_send, BOOL send_reliable)
4064extern U32 gObjectBits; 4064extern U32 gObjectBits;
4065 4065
4066void process_object_update(LLMessageSystem *mesgsys, void **user_data) 4066void process_object_update(LLMessageSystem *mesgsys, void **user_data)
4067{ 4067{
4068 LLMemType mt(LLMemType::MTYPE_OBJECT); 4068 LLMemType mt(LLMemType::MTYPE_OBJECT);
4069 // Update the data counters 4069 // Update the data counters
4070 if (mesgsys->getReceiveCompressedSize()) 4070 if (mesgsys->getReceiveCompressedSize())
@@ -4270,7 +4270,7 @@ void process_sound_trigger(LLMessageSystem *msg, void **)
4270 4270
4271 // Don't play sounds triggered by someone you muted. 4271 // Don't play sounds triggered by someone you muted.
4272 if (LLMuteList::getInstance()->isMuted(owner_id, LLMute::flagObjectSounds)) return; 4272 if (LLMuteList::getInstance()->isMuted(owner_id, LLMute::flagObjectSounds)) return;
4273 4273
4274 // Don't play sounds from an object you muted 4274 // Don't play sounds from an object you muted
4275 if (LLMuteList::getInstance()->isMuted(object_id)) return; 4275 if (LLMuteList::getInstance()->isMuted(object_id)) return;
4276 4276
@@ -4300,7 +4300,7 @@ void process_sound_trigger(LLMessageSystem *msg, void **)
4300 { 4300 {
4301 return; 4301 return;
4302 }*/ 4302 }*/
4303 4303
4304 gAudiop->triggerSound(sound_id, owner_id, gain, LLAudioEngine::AUDIO_TYPE_SFX, pos_global); 4304 gAudiop->triggerSound(sound_id, owner_id, gain, LLAudioEngine::AUDIO_TYPE_SFX, pos_global);
4305} 4305}
4306 4306
@@ -4324,10 +4324,10 @@ void process_preload_sound(LLMessageSystem *msg, void **user_data)
4324 4324
4325 if (LLMuteList::getInstance()->isMuted(object_id)) return; 4325 if (LLMuteList::getInstance()->isMuted(object_id)) return;
4326 if (LLMuteList::getInstance()->isMuted(owner_id, LLMute::flagObjectSounds)) return; 4326 if (LLMuteList::getInstance()->isMuted(owner_id, LLMute::flagObjectSounds)) return;
4327 4327
4328 LLAudioSource *sourcep = objectp->getAudioSource(owner_id); 4328 LLAudioSource *sourcep = objectp->getAudioSource(owner_id);
4329 if (!sourcep) return; 4329 if (!sourcep) return;
4330 4330
4331 LLAudioData *datap = gAudiop->getAudioData(sound_id); 4331 LLAudioData *datap = gAudiop->getAudioData(sound_id);
4332 4332
4333 // Note that I don't actually do any loading of the 4333 // Note that I don't actually do any loading of the
@@ -4341,7 +4341,7 @@ void process_preload_sound(LLMessageSystem *msg, void **user_data)
4341 { 4341 {
4342 return; 4342 return;
4343 }*/ 4343 }*/
4344 4344
4345 // Add audioData starts a transfer internally. 4345 // Add audioData starts a transfer internally.
4346 sourcep->addAudioData(datap, FALSE); 4346 sourcep->addAudioData(datap, FALSE);
4347} 4347}
@@ -4369,12 +4369,12 @@ void process_attached_sound(LLMessageSystem *msg, void **user_data)
4369 // we don't know about this object, just bail 4369 // we don't know about this object, just bail
4370 return; 4370 return;
4371 } 4371 }
4372 4372
4373 if (LLMuteList::getInstance()->isMuted(object_id)) return; 4373 if (LLMuteList::getInstance()->isMuted(object_id)) return;
4374 4374
4375 if (LLMuteList::getInstance()->isMuted(owner_id, LLMute::flagObjectSounds)) return; 4375 if (LLMuteList::getInstance()->isMuted(owner_id, LLMute::flagObjectSounds)) return;
4376 4376
4377 4377
4378 // Don't play sounds from a region with maturity above current agent maturity 4378 // Don't play sounds from a region with maturity above current agent maturity
4379 // Actually, let's -- MC 4379 // Actually, let's -- MC
4380 /*LLVector3d pos = objectp->getPositionGlobal(); 4380 /*LLVector3d pos = objectp->getPositionGlobal();
@@ -4382,7 +4382,7 @@ void process_attached_sound(LLMessageSystem *msg, void **user_data)
4382 { 4382 {
4383 return; 4383 return;
4384 }*/ 4384 }*/
4385 4385
4386 objectp->setAttachedSound(sound_id, owner_id, gain, flags); 4386 objectp->setAttachedSound(sound_id, owner_id, gain, flags);
4387} 4387}
4388 4388
@@ -4421,7 +4421,7 @@ void process_health_message(LLMessageSystem *mesgsys, void **user_data)
4421 4421
4422 4422
4423void process_sim_stats(LLMessageSystem *msg, void **user_data) 4423void process_sim_stats(LLMessageSystem *msg, void **user_data)
4424{ 4424{
4425 S32 count = msg->getNumberOfBlocks("Stat"); 4425 S32 count = msg->getNumberOfBlocks("Stat");
4426 for (S32 i = 0; i < count; ++i) 4426 for (S32 i = 0; i < count; ++i)
4427 { 4427 {
@@ -4570,7 +4570,7 @@ void process_sim_stats(LLMessageSystem *msg, void **user_data)
4570 BOOL was_flying = gAgent.getFlying(); 4570 BOOL was_flying = gAgent.getFlying();
4571 regionp->setRegionFlags(region_flags); 4571 regionp->setRegionFlags(region_flags);
4572 regionp->setMaxTasks(max_tasks_per_region); 4572 regionp->setMaxTasks(max_tasks_per_region);
4573 // HACK: This makes agents drop from the sky if the region is 4573 // HACK: This makes agents drop from the sky if the region is
4574 // set to no fly while people are still in the sim. 4574 // set to no fly while people are still in the sim.
4575 if (was_flying && regionp->getBlockFly()) 4575 if (was_flying && regionp->getBlockFly())
4576 { 4576 {
@@ -4587,7 +4587,7 @@ void process_avatar_animation(LLMessageSystem *mesgsys, void **user_data)
4587 LLUUID uuid; 4587 LLUUID uuid;
4588 S32 anim_sequence_id; 4588 S32 anim_sequence_id;
4589 LLVOAvatar *avatarp; 4589 LLVOAvatar *avatarp;
4590 4590
4591 mesgsys->getUUIDFast(_PREHASH_Sender, _PREHASH_ID, uuid); 4591 mesgsys->getUUIDFast(_PREHASH_Sender, _PREHASH_ID, uuid);
4592 4592
4593 //clear animation flags 4593 //clear animation flags
@@ -4604,7 +4604,7 @@ void process_avatar_animation(LLMessageSystem *mesgsys, void **user_data)
4604 S32 num_source_blocks = mesgsys->getNumberOfBlocksFast(_PREHASH_AnimationSourceList); 4604 S32 num_source_blocks = mesgsys->getNumberOfBlocksFast(_PREHASH_AnimationSourceList);
4605 4605
4606 avatarp->mSignaledAnimations.clear(); 4606 avatarp->mSignaledAnimations.clear();
4607 4607
4608 if (avatarp->isSelf()) 4608 if (avatarp->isSelf())
4609 { 4609 {
4610 LLUUID object_id; 4610 LLUUID object_id;
@@ -4614,7 +4614,7 @@ void process_avatar_animation(LLMessageSystem *mesgsys, void **user_data)
4614 mesgsys->getUUIDFast(_PREHASH_AnimationList, _PREHASH_AnimID, animation_id, i); 4614 mesgsys->getUUIDFast(_PREHASH_AnimationList, _PREHASH_AnimID, animation_id, i);
4615 mesgsys->getS32Fast(_PREHASH_AnimationList, _PREHASH_AnimSequenceID, anim_sequence_id, i); 4615 mesgsys->getS32Fast(_PREHASH_AnimationList, _PREHASH_AnimSequenceID, anim_sequence_id, i);
4616 4616
4617 LL_DEBUGS("Messaging") << "Animation id " << animation_id 4617 LL_DEBUGS("Messaging") << "Animation id " << animation_id
4618 << " from self using sequence id " << anim_sequence_id << LL_ENDL; 4618 << " from self using sequence id " << anim_sequence_id << LL_ENDL;
4619 4619
4620 avatarp->mSignaledAnimations[animation_id] = anim_sequence_id; 4620 avatarp->mSignaledAnimations[animation_id] = anim_sequence_id;
@@ -4622,7 +4622,7 @@ void process_avatar_animation(LLMessageSystem *mesgsys, void **user_data)
4622 if (i < num_source_blocks) 4622 if (i < num_source_blocks)
4623 { 4623 {
4624 mesgsys->getUUIDFast(_PREHASH_AnimationSourceList, _PREHASH_ObjectID, object_id, i); 4624 mesgsys->getUUIDFast(_PREHASH_AnimationSourceList, _PREHASH_ObjectID, object_id, i);
4625 4625
4626 LLViewerObject* object = gObjectList.findObject(object_id); 4626 LLViewerObject* object = gObjectList.findObject(object_id);
4627 if (object) 4627 if (object)
4628 { 4628 {
@@ -4654,8 +4654,8 @@ void process_avatar_animation(LLMessageSystem *mesgsys, void **user_data)
4654 mesgsys->getUUIDFast(_PREHASH_AnimationList, _PREHASH_AnimID, animation_id, i); 4654 mesgsys->getUUIDFast(_PREHASH_AnimationList, _PREHASH_AnimID, animation_id, i);
4655 mesgsys->getS32Fast(_PREHASH_AnimationList, _PREHASH_AnimSequenceID, anim_sequence_id, i); 4655 mesgsys->getS32Fast(_PREHASH_AnimationList, _PREHASH_AnimSequenceID, anim_sequence_id, i);
4656 avatarp->mSignaledAnimations[animation_id] = anim_sequence_id; 4656 avatarp->mSignaledAnimations[animation_id] = anim_sequence_id;
4657 LL_DEBUGS("Messaging") << "Received animation id " << animation_id 4657 LL_DEBUGS("Messaging") << "Received animation id " << animation_id
4658 << " from " << uuid 4658 << " from " << uuid
4659 << " using sequence id " << anim_sequence_id << LL_ENDL; 4659 << " using sequence id " << anim_sequence_id << LL_ENDL;
4660 } 4660 }
4661 } 4661 }
@@ -4730,7 +4730,7 @@ void process_avatar_sit_response(LLMessageSystem *mesgsys, void **user_data)
4730 { 4730 {
4731 gAgent.setSitCamera(sitObjectID, camera_eye, camera_at); 4731 gAgent.setSitCamera(sitObjectID, camera_eye, camera_at);
4732 } 4732 }
4733 4733
4734 gAgent.mForceMouselook = force_mouselook; 4734 gAgent.mForceMouselook = force_mouselook;
4735 4735
4736 LLViewerObject* object = gObjectList.findObject(sitObjectID); 4736 LLViewerObject* object = gObjectList.findObject(sitObjectID);
@@ -4826,7 +4826,7 @@ void process_set_follow_cam_properties(LLMessageSystem *mesgsys, void **user_dat
4826 LLFollowCamMgr::setFocusThreshold(source_id, value); 4826 LLFollowCamMgr::setFocusThreshold(source_id, value);
4827 break; 4827 break;
4828 case FOLLOWCAM_ACTIVE: 4828 case FOLLOWCAM_ACTIVE:
4829 //if 1, set using followcam,. 4829 //if 1, set using followcam,.
4830 LLFollowCamMgr::setCameraActive(source_id, value != 0.f); 4830 LLFollowCamMgr::setCameraActive(source_id, value != 0.f);
4831 break; 4831 break;
4832 case FOLLOWCAM_POSITION_X: 4832 case FOLLOWCAM_POSITION_X:
@@ -4878,7 +4878,7 @@ void process_set_follow_cam_properties(LLMessageSystem *mesgsys, void **user_dat
4878 LLFollowCamMgr::setFocusOffset(source_id, focus_offset); 4878 LLFollowCamMgr::setFocusOffset(source_id, focus_offset);
4879 } 4879 }
4880} 4880}
4881//end Ventrella 4881//end Ventrella
4882 4882
4883 4883
4884// Culled from newsim lltask.cpp 4884// Culled from newsim lltask.cpp
@@ -5070,7 +5070,7 @@ void process_money_balance_reply( LLMessageSystem* msg, void** )
5070bool handle_special_notification_callback(const LLSD& notification, const LLSD& response) 5070bool handle_special_notification_callback(const LLSD& notification, const LLSD& response)
5071{ 5071{
5072 S32 option = LLNotification::getSelectedOption(notification, response); 5072 S32 option = LLNotification::getSelectedOption(notification, response);
5073 5073
5074 if (0 == option) 5074 if (0 == option)
5075 { 5075 {
5076 // set the preference to the maturity of the region we're calling 5076 // set the preference to the maturity of the region we're calling
@@ -5079,7 +5079,7 @@ bool handle_special_notification_callback(const LLSD& notification, const LLSD&
5079 gAgent.sendMaturityPreferenceToServer(preferredMaturity); 5079 gAgent.sendMaturityPreferenceToServer(preferredMaturity);
5080 5080
5081 } 5081 }
5082 5082
5083 return false; 5083 return false;
5084} 5084}
5085 5085
@@ -5088,10 +5088,10 @@ bool handle_special_notification(std::string notificationID, LLSD& llsdBlock)
5088{ 5088{
5089 int regionAccess = llsdBlock["_region_access"].asInteger(); 5089 int regionAccess = llsdBlock["_region_access"].asInteger();
5090 llsdBlock["REGIONMATURITY"] = LLViewerRegion::accessToString(regionAccess); 5090 llsdBlock["REGIONMATURITY"] = LLViewerRegion::accessToString(regionAccess);
5091 5091
5092 // we're going to throw the LLSD in there in case anyone ever wants to use it 5092 // we're going to throw the LLSD in there in case anyone ever wants to use it
5093 LLNotifications::instance().add(notificationID+"_Notify", llsdBlock); 5093 LLNotifications::instance().add(notificationID+"_Notify", llsdBlock);
5094 5094
5095 if (regionAccess == SIM_ACCESS_MATURE) 5095 if (regionAccess == SIM_ACCESS_MATURE)
5096 { 5096 {
5097 if (gAgent.isTeen()) 5097 if (gAgent.isTeen())
@@ -5140,7 +5140,7 @@ bool attempt_standard_notification(LLMessageSystem* msgsystem)
5140 llwarns << "attempt_standard_notification: Attempted to read notification parameter data into LLSD but failed:" << llsdRaw << llendl; 5140 llwarns << "attempt_standard_notification: Attempted to read notification parameter data into LLSD but failed:" << llsdRaw << llendl;
5141 } 5141 }
5142 } 5142 }
5143 5143
5144 if ( 5144 if (
5145 (notificationID == "RegionEntryAccessBlocked") || 5145 (notificationID == "RegionEntryAccessBlocked") ||
5146 (notificationID == "LandClaimAccessBlocked") || 5146 (notificationID == "LandClaimAccessBlocked") ||
@@ -5151,32 +5151,32 @@ bool attempt_standard_notification(LLMessageSystem* msgsystem)
5151 (Commented so a grep will find the notification strings, since 5151 (Commented so a grep will find the notification strings, since
5152 we construct them on the fly; if you add additional notifications, 5152 we construct them on the fly; if you add additional notifications,
5153 please update the comment.) 5153 please update the comment.)
5154 5154
5155 Could throw any of the following notifications: 5155 Could throw any of the following notifications:
5156 5156
5157 RegionEntryAccessBlocked 5157 RegionEntryAccessBlocked
5158 RegionEntryAccessBlocked_Notify 5158 RegionEntryAccessBlocked_Notify
5159 RegionEntryAccessBlocked_Change 5159 RegionEntryAccessBlocked_Change
5160 RegionEntryAccessBlocked_KB 5160 RegionEntryAccessBlocked_KB
5161 LandClaimAccessBlocked 5161 LandClaimAccessBlocked
5162 LandClaimAccessBlocked_Notify 5162 LandClaimAccessBlocked_Notify
5163 LandClaimAccessBlocked_Change 5163 LandClaimAccessBlocked_Change
5164 LandClaimAccessBlocked_KB 5164 LandClaimAccessBlocked_KB
5165 LandBuyAccessBlocked 5165 LandBuyAccessBlocked
5166 LandBuyAccessBlocked_Notify 5166 LandBuyAccessBlocked_Notify
5167 LandBuyAccessBlocked_Change 5167 LandBuyAccessBlocked_Change
5168 LandBuyAccessBlocked_KB 5168 LandBuyAccessBlocked_KB
5169 5169
5170 -----------------------------------------------------------------------*/ 5170 -----------------------------------------------------------------------*/
5171 if (handle_special_notification(notificationID, llsdBlock)) 5171 if (handle_special_notification(notificationID, llsdBlock))
5172 { 5172 {
5173 return true; 5173 return true;
5174 } 5174 }
5175 } 5175 }
5176 5176
5177 LLNotifications::instance().add(notificationID, llsdBlock); 5177 LLNotifications::instance().add(notificationID, llsdBlock);
5178 return true; 5178 return true;
5179 } 5179 }
5180 return false; 5180 return false;
5181} 5181}
5182 5182
@@ -5186,7 +5186,7 @@ void process_agent_alert_message(LLMessageSystem* msgsystem, void** user_data)
5186 // make sure the cursor is back to the usual default since the 5186 // make sure the cursor is back to the usual default since the
5187 // alert is probably due to some kind of error. 5187 // alert is probably due to some kind of error.
5188 gViewerWindow->getWindow()->resetBusyCount(); 5188 gViewerWindow->getWindow()->resetBusyCount();
5189 5189
5190 if (!attempt_standard_notification(msgsystem)) 5190 if (!attempt_standard_notification(msgsystem))
5191 { 5191 {
5192 BOOL modal = FALSE; 5192 BOOL modal = FALSE;
@@ -5207,7 +5207,7 @@ void process_alert_message(LLMessageSystem *msgsystem, void **user_data)
5207 // make sure the cursor is back to the usual default since the 5207 // make sure the cursor is back to the usual default since the
5208 // alert is probably due to some kind of error. 5208 // alert is probably due to some kind of error.
5209 gViewerWindow->getWindow()->resetBusyCount(); 5209 gViewerWindow->getWindow()->resetBusyCount();
5210 5210
5211 if (!attempt_standard_notification(msgsystem)) 5211 if (!attempt_standard_notification(msgsystem))
5212 { 5212 {
5213 BOOL modal = FALSE; 5213 BOOL modal = FALSE;
@@ -5336,7 +5336,7 @@ void process_mean_collision_alert_message(LLMessageSystem *msgsystem, void **use
5336{ 5336{
5337 if (gAgent.inPrelude()) 5337 if (gAgent.inPrelude())
5338 { 5338 {
5339 // In prelude, bumping is OK. This dialog is rather confusing to 5339 // In prelude, bumping is OK. This dialog is rather confusing to
5340 // newbies, so we don't show it. Drop the packet on the floor. 5340 // newbies, so we don't show it. Drop the packet on the floor.
5341 return; 5341 return;
5342 } 5342 }
@@ -5393,7 +5393,7 @@ void process_frozen_message(LLMessageSystem *msgsystem, void **user_data)
5393 // alert is probably due to some kind of error. 5393 // alert is probably due to some kind of error.
5394 gViewerWindow->getWindow()->resetBusyCount(); 5394 gViewerWindow->getWindow()->resetBusyCount();
5395 BOOL b_frozen; 5395 BOOL b_frozen;
5396 5396
5397 msgsystem->getBOOL("FrozenData", "Data", b_frozen); 5397 msgsystem->getBOOL("FrozenData", "Data", b_frozen);
5398 5398
5399 // TODO: make being frozen change view 5399 // TODO: make being frozen change view
@@ -5412,8 +5412,8 @@ void process_economy_data(LLMessageSystem *msg, void** /*user_data*/)
5412 5412
5413 S32 upload_cost = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload(); 5413 S32 upload_cost = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload();
5414 5414
5415 LL_INFOS_ONCE("Messaging") << "EconomyData message arrived; upload cost is " 5415 LL_INFOS_ONCE("Messaging") << "EconomyData message arrived; upload cost is "
5416 << gHippoGridManager->getConnectedGrid()->getCurrencySymbol() 5416 << gHippoGridManager->getConnectedGrid()->getCurrencySymbol()
5417 << upload_cost << LL_ENDL; 5417 << upload_cost << LL_ENDL;
5418 5418
5419 LLFloaterImagePreview::setUploadAmount(upload_cost); 5419 LLFloaterImagePreview::setUploadAmount(upload_cost);
@@ -5436,13 +5436,13 @@ void notify_cautioned_script_question(const LLSD& notification, const LLSD& resp
5436 { 5436 {
5437 // check to see if the person we are asking 5437 // check to see if the person we are asking
5438 5438
5439 // "'[OBJECTNAME]', an object owned by '[OWNERNAME]', 5439 // "'[OBJECTNAME]', an object owned by '[OWNERNAME]',
5440 // located in [REGIONNAME] at [REGIONPOS], 5440 // located in [REGIONNAME] at [REGIONPOS],
5441 // has been <granted|denied> permission to: [PERMISSIONS]." 5441 // has been <granted|denied> permission to: [PERMISSIONS]."
5442 5442
5443 LLUIString notice(LLFloaterChat::getInstance()->getString(granted ? "ScriptQuestionCautionChatGranted" : "ScriptQuestionCautionChatDenied")); 5443 LLUIString notice(LLFloaterChat::getInstance()->getString(granted ? "ScriptQuestionCautionChatGranted" : "ScriptQuestionCautionChatDenied"));
5444 5444
5445 // always include the object name and owner name 5445 // always include the object name and owner name
5446 notice.setArg("[OBJECTNAME]", notification["payload"]["object_name"].asString()); 5446 notice.setArg("[OBJECTNAME]", notification["payload"]["object_name"].asString());
5447 notice.setArg("[OWNERNAME]", notification["payload"]["owner_name"].asString()); 5447 notice.setArg("[OWNERNAME]", notification["payload"]["owner_name"].asString());
5448 5448
@@ -5454,7 +5454,7 @@ void notify_cautioned_script_question(const LLSD& notification, const LLSD& resp
5454 { 5454 {
5455 // found the viewerobject, get it's position in its region 5455 // found the viewerobject, get it's position in its region
5456 LLVector3 objpos(viewobj->getPosition()); 5456 LLVector3 objpos(viewobj->getPosition());
5457 5457
5458 // try to lookup the name of the region the object is in 5458 // try to lookup the name of the region the object is in
5459 LLViewerRegion* viewregion = viewobj->getRegion(); 5459 LLViewerRegion* viewregion = viewobj->getRegion();
5460 if (viewregion) 5460 if (viewregion)
@@ -5481,7 +5481,7 @@ void notify_cautioned_script_question(const LLSD& notification, const LLSD& resp
5481 notice.setArg("[REGIONPOS]", "(unknown position)"); 5481 notice.setArg("[REGIONPOS]", "(unknown position)");
5482 } 5482 }
5483 5483
5484 // check each permission that was requested, and list each 5484 // check each permission that was requested, and list each
5485 // permission that has been flagged as a caution permission 5485 // permission that has been flagged as a caution permission
5486 BOOL caution = FALSE; 5486 BOOL caution = FALSE;
5487 S32 count = 0; 5487 S32 count = 0;
@@ -5533,7 +5533,7 @@ bool script_question_cb(const LLSD& notification, const LLSD& response)
5533 { 5533 {
5534 new_questions = 0; 5534 new_questions = 0;
5535 allowed = FALSE; 5535 allowed = FALSE;
5536 } 5536 }
5537 5537
5538 LLUUID task_id = notification["payload"]["task_id"].asUUID(); 5538 LLUUID task_id = notification["payload"]["task_id"].asUUID();
5539 LLUUID item_id = notification["payload"]["item_id"].asUUID(); 5539 LLUUID item_id = notification["payload"]["item_id"].asUUID();
@@ -5625,10 +5625,10 @@ void process_script_question(LLMessageSystem *msg, void **user_data)
5625 { 5625 {
5626 throttle_name = taskid.getString(); 5626 throttle_name = taskid.getString();
5627 } 5627 }
5628 5628
5629 // don't display permission requests if this object is muted 5629 // don't display permission requests if this object is muted
5630 if (LLMuteList::getInstance()->isMuted(taskid)) return; 5630 if (LLMuteList::getInstance()->isMuted(taskid)) return;
5631 5631
5632 // throttle excessive requests from any specific user's scripts 5632 // throttle excessive requests from any specific user's scripts
5633 typedef LLKeyThrottle<std::string> LLStringThrottle; 5633 typedef LLKeyThrottle<std::string> LLStringThrottle;
5634 static LLStringThrottle question_throttle( LLREQUEST_PERMISSION_THROTTLE_LIMIT, LLREQUEST_PERMISSION_THROTTLE_INTERVAL ); 5634 static LLStringThrottle question_throttle( LLREQUEST_PERMISSION_THROTTLE_LIMIT, LLREQUEST_PERMISSION_THROTTLE_INTERVAL );
@@ -5665,7 +5665,7 @@ void process_script_question(LLMessageSystem *msg, void **user_data)
5665 { 5665 {
5666 LLStringUtil::format_map_t args; 5666 LLStringUtil::format_map_t args;
5667 args["[CURRENCY]"] = gHippoGridManager->getConnectedGrid()->getCurrencySymbol(); 5667 args["[CURRENCY]"] = gHippoGridManager->getConnectedGrid()->getCurrencySymbol();
5668 5668
5669 count++; 5669 count++;
5670 script_question += " " + LLFloaterChat::getInstance()->getString(SCRIPT_QUESTIONS[i], args) + "\n"; 5670 script_question += " " + LLFloaterChat::getInstance()->getString(SCRIPT_QUESTIONS[i], args) + "\n";
5671 5671
@@ -6018,7 +6018,7 @@ void send_group_notice(const LLUUID& group_id,
6018 { 6018 {
6019 bucket_to_send = (U8*) EMPTY_BINARY_BUCKET; 6019 bucket_to_send = (U8*) EMPTY_BINARY_BUCKET;
6020 } 6020 }
6021 6021
6022 6022
6023 send_improved_im( 6023 send_improved_im(
6024 group_id, 6024 group_id,
@@ -6083,7 +6083,7 @@ void handle_lure(const LLUUID& invitee)
6083} 6083}
6084 6084
6085// Prompt for a message to the invited user. 6085// Prompt for a message to the invited user.
6086void handle_lure(LLDynamicArray<LLUUID>& ids) 6086void handle_lure(LLDynamicArray<LLUUID>& ids)
6087{ 6087{
6088 LLSD edit_args; 6088 LLSD edit_args;
6089// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-04 (RLVa-1.0.0a) 6089// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-04 (RLVa-1.0.0a)
@@ -6128,7 +6128,7 @@ void send_improved_im(const LLUUID& to_id,
6128 U8 offline, 6128 U8 offline,
6129 EInstantMessage dialog, 6129 EInstantMessage dialog,
6130 const LLUUID& id, 6130 const LLUUID& id,
6131 U32 timestamp, 6131 U32 timestamp,
6132 const U8* binary_bucket, 6132 const U8* binary_bucket,
6133 S32 binary_bucket_size) 6133 S32 binary_bucket_size)
6134{ 6134{
@@ -6187,7 +6187,7 @@ void process_user_info_reply(LLMessageSystem* msg, void**)
6187 LL_WARNS("Messaging") << "process_user_info_reply - " 6187 LL_WARNS("Messaging") << "process_user_info_reply - "
6188 << "wrong agent id." << LL_ENDL; 6188 << "wrong agent id." << LL_ENDL;
6189 } 6189 }
6190 6190
6191 BOOL im_via_email; 6191 BOOL im_via_email;
6192 msg->getBOOLFast(_PREHASH_UserData, _PREHASH_IMViaEMail, im_via_email); 6192 msg->getBOOLFast(_PREHASH_UserData, _PREHASH_IMViaEMail, im_via_email);
6193 std::string email; 6193 std::string email;
@@ -6241,7 +6241,7 @@ void process_script_dialog(LLMessageSystem* msg, void**)
6241 6241
6242 LLSD payload; 6242 LLSD payload;
6243 6243
6244 std::string message; 6244 std::string message;
6245 std::string first_name; 6245 std::string first_name;
6246 std::string last_name; 6246 std::string last_name;
6247 std::string title; 6247 std::string title;
@@ -6261,7 +6261,7 @@ void process_script_dialog(LLMessageSystem* msg, void**)
6261 { 6261 {
6262 std::vector<LLMute> mutes = LLMuteList::getInstance()->getMutes(); 6262 std::vector<LLMute> mutes = LLMuteList::getInstance()->getMutes();
6263 for (U32 i = 0; i < mutes.size(); i++) 6263 for (U32 i = 0; i < mutes.size(); i++)
6264 { 6264 {
6265 //this is almost like saying (mutes[i].mType != LLMute::Object), but more verbose ... -Kaku 6265 //this is almost like saying (mutes[i].mType != LLMute::Object), but more verbose ... -Kaku
6266 if ( 6266 if (
6267 ((mutes[i].mType == LLMute::AGENT) 6267 ((mutes[i].mType == LLMute::AGENT)
@@ -6524,7 +6524,7 @@ void process_script_teleport_request(LLMessageSystem* msg, void**)
6524 // remove above two lines and replace with below line 6524 // remove above two lines and replace with below line
6525 // to re-enable parcel browser for llMapDestination() 6525 // to re-enable parcel browser for llMapDestination()
6526 // LLURLDispatcher::dispatch(LLURLDispatcher::buildSLURL(sim_name, (S32)pos.mV[VX], (S32)pos.mV[VY], (S32)pos.mV[VZ]), FALSE); 6526 // LLURLDispatcher::dispatch(LLURLDispatcher::buildSLURL(sim_name, (S32)pos.mV[VX], (S32)pos.mV[VY], (S32)pos.mV[VZ]), FALSE);
6527 6527
6528} 6528}
6529 6529
6530void process_covenant_reply(LLMessageSystem* msg, void**) 6530void process_covenant_reply(LLMessageSystem* msg, void**)
@@ -6557,7 +6557,7 @@ void process_covenant_reply(LLMessageSystem* msg, void**)
6557 LLFloaterBuyLand::updateLastModified(last_modified); 6557 LLFloaterBuyLand::updateLastModified(last_modified);
6558 6558
6559 gCacheName->getName(estate_owner_id, callbackCacheEstateOwnerName); 6559 gCacheName->getName(estate_owner_id, callbackCacheEstateOwnerName);
6560 6560
6561 // load the actual covenant asset data 6561 // load the actual covenant asset data
6562 const BOOL high_priority = TRUE; 6562 const BOOL high_priority = TRUE;
6563 if (covenant_id.notNull()) 6563 if (covenant_id.notNull())
@@ -6595,7 +6595,7 @@ void callbackCacheEstateOwnerName(const LLUUID& id,
6595 BOOL is_group, void*) 6595 BOOL is_group, void*)
6596{ 6596{
6597 std::string name; 6597 std::string name;
6598 6598
6599 if (id.isNull()) 6599 if (id.isNull())
6600 { 6600 {
6601 name = "(none)"; 6601 name = "(none)";
@@ -6619,9 +6619,9 @@ void onCovenantLoadComplete(LLVFS *vfs,
6619 if(0 == status) 6619 if(0 == status)
6620 { 6620 {
6621 LLVFile file(vfs, asset_uuid, type, LLVFile::READ); 6621 LLVFile file(vfs, asset_uuid, type, LLVFile::READ);
6622 6622
6623 S32 file_length = file.getSize(); 6623 S32 file_length = file.getSize();
6624 6624
6625 char* buffer = new char[file_length+1]; 6625 char* buffer = new char[file_length+1];
6626 if (buffer == NULL) 6626 if (buffer == NULL)
6627 { 6627 {
@@ -6630,10 +6630,10 @@ void onCovenantLoadComplete(LLVFS *vfs,
6630 } 6630 }
6631 6631
6632 file.read((U8*)buffer, file_length); /* Flawfinder: ignore */ 6632 file.read((U8*)buffer, file_length); /* Flawfinder: ignore */
6633 6633
6634 // put a EOS at the end 6634 // put a EOS at the end
6635 buffer[file_length] = 0; 6635 buffer[file_length] = 0;
6636 6636
6637 if( (file_length > 19) && !strncmp( buffer, "Linden text version", 19 ) ) 6637 if( (file_length > 19) && !strncmp( buffer, "Linden text version", 19 ) )
6638 { 6638 {
6639 LLViewerTextEditor* editor = 6639 LLViewerTextEditor* editor =
@@ -6662,7 +6662,7 @@ void onCovenantLoadComplete(LLVFS *vfs,
6662 else 6662 else
6663 { 6663 {
6664 LLViewerStats::getInstance()->incStat( LLViewerStats::ST_DOWNLOAD_FAILED ); 6664 LLViewerStats::getInstance()->incStat( LLViewerStats::ST_DOWNLOAD_FAILED );
6665 6665
6666 if( LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE == status || 6666 if( LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE == status ||
6667 LL_ERR_FILE_EMPTY == status) 6667 LL_ERR_FILE_EMPTY == status)
6668 { 6668 {
@@ -6676,7 +6676,7 @@ void onCovenantLoadComplete(LLVFS *vfs,
6676 { 6676 {
6677 covenant_text = "Unable to load estate covenant at this time."; 6677 covenant_text = "Unable to load estate covenant at this time.";
6678 } 6678 }
6679 6679
6680 LL_WARNS("Messaging") << "Problem loading notecard: " << status << LL_ENDL; 6680 LL_WARNS("Messaging") << "Problem loading notecard: " << status << LL_ENDL;
6681 } 6681 }
6682 LLPanelEstateCovenant::updateCovenantText(covenant_text, asset_uuid); 6682 LLPanelEstateCovenant::updateCovenantText(covenant_text, asset_uuid);
@@ -6694,7 +6694,7 @@ void process_feature_disabled_message(LLMessageSystem* msg, void**)
6694 msg->getStringFast(_PREHASH_FailureInfo,_PREHASH_ErrorMessage, messageText,0); 6694 msg->getStringFast(_PREHASH_FailureInfo,_PREHASH_ErrorMessage, messageText,0);
6695 msg->getUUIDFast(_PREHASH_FailureInfo,_PREHASH_AgentID,agentID); 6695 msg->getUUIDFast(_PREHASH_FailureInfo,_PREHASH_AgentID,agentID);
6696 msg->getUUIDFast(_PREHASH_FailureInfo,_PREHASH_TransactionID,transactionID); 6696 msg->getUUIDFast(_PREHASH_FailureInfo,_PREHASH_TransactionID,transactionID);
6697 6697
6698 LL_WARNS("Messaging") << "Blacklisted Feature Response:" << messageText << LL_ENDL; 6698 LL_WARNS("Messaging") << "Blacklisted Feature Response:" << messageText << LL_ENDL;
6699} 6699}
6700 6700
diff --git a/linden/indra/newview/wlfloatermanager.cpp b/linden/indra/newview/wlfloatermanager.cpp
index 63abe14..0b81d7e 100644
--- a/linden/indra/newview/wlfloatermanager.cpp
+++ b/linden/indra/newview/wlfloatermanager.cpp
@@ -1,11 +1,11 @@
1/** 1/**
2* @file wlfloaterwindlightsend.cpp 2* @file wlfloaterwindlightsend.cpp
3* @brief WLFloaterWindLightSend class definition 3* @brief WLFloaterWindLightSend class definition
4* 4*
5* $LicenseInfo:firstyear=2007&license=viewergpl$ 5* $LicenseInfo:firstyear=2007&license=viewergpl$
6* 6*
7* Copyright (c) 2007-2009, Linden Research, Inc. 7* Copyright (c) 2007-2009, Linden Research, Inc.
8* 8*
9* Second Life Viewer Source Code 9* Second Life Viewer Source Code
10* The source code in this file ("Source Code") is provided by Linden Lab 10* The source code in this file ("Source Code") is provided by Linden Lab
11* to you under the terms of the GNU General Public License, version 2.0 11* to you under the terms of the GNU General Public License, version 2.0
@@ -13,17 +13,17 @@
13* ("Other License"), formally executed by you and Linden Lab. Terms of 13* ("Other License"), formally executed by you and Linden Lab. Terms of
14* the GPL can be found in doc/GPL-license.txt in this distribution, or 14* the GPL can be found in doc/GPL-license.txt in this distribution, or
15* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 15* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
16* 16*
17* There are special exceptions to the terms and conditions of the GPL as 17* There are special exceptions to the terms and conditions of the GPL as
18* it is applied to this Source Code. View the full text of the exception 18* it is applied to this Source Code. View the full text of the exception
19* in the file doc/FLOSS-exception.txt in this software distribution, or 19* in the file doc/FLOSS-exception.txt in this software distribution, or
20* online at 20* online at
21* http://secondlifegrid.net/programs/open_source/licensing/flossexception 21* http://secondlifegrid.net/programs/open_source/licensing/flossexception
22* 22*
23* By copying, modifying or distributing this software, you acknowledge 23* By copying, modifying or distributing this software, you acknowledge
24* that you have read and understood your obligations described above, 24* that you have read and understood your obligations described above,
25* and agree to abide by those obligations. 25* and agree to abide by those obligations.
26* 26*
27* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO 27* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
28* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, 28* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
29* COMPLETENESS OR PERFORMANCE. 29* COMPLETENESS OR PERFORMANCE.
@@ -75,12 +75,12 @@
75 75
76#undef max 76#undef max
77WLFloaterManager* WLFloaterManager::sWindLight; 77WLFloaterManager* WLFloaterManager::sWindLight;
78std::map<std::string, LLWLParamSet*> WLFloaterManager::mWLParamList; 78std::map<std::string, LLWLParamSet*> WLFloaterManager::mWLParamList;
79std::map<std::string, LLWaterParamSet*> WLFloaterManager::mWaterParamList; 79std::map<std::string, LLWaterParamSet*> WLFloaterManager::mWaterParamList;
80std::map<std::string, LLUUID*> WLFloaterManager::mWaterNormalParamList; 80std::map<std::string, LLUUID*> WLFloaterManager::mWaterNormalParamList;
81std::map<std::string, LLSD> WLFloaterManager::mMinAltParamList; 81std::map<std::string, LLSD> WLFloaterManager::mMinAltParamList;
82std::map<std::string, LLSD> WLFloaterManager::mMaxAltParamList; 82std::map<std::string, LLSD> WLFloaterManager::mMaxAltParamList;
83std::map<std::string, LLSD> WLFloaterManager::mFadeParamList; 83std::map<std::string, LLSD> WLFloaterManager::mFadeParamList;
84 84
85WLFloaterManager::WLFloaterManager() : LLFloater(std::string("windlight manager floater")) 85WLFloaterManager::WLFloaterManager() : LLFloater(std::string("windlight manager floater"))
86{ 86{
@@ -233,10 +233,10 @@ void WLFloaterManager::onSetToCurrent(void* userData)
233 if(name == "(Region Settings)") 233 if(name == "(Region Settings)")
234 { 234 {
235 type = 0; 235 type = 0;
236 } 236 }
237 237
238 if(mSky != NULL && mWater != NULL && mWaterNormal != NULL) 238 if(mSky != NULL && mWater != NULL && mWaterNormal != NULL)
239 WLFloaterWindLightSend::SendSettings(false, type, NULL, *mSky, *mWater, fade, minAlt, maxAlt, *mWaterNormal); 239 WLFloaterWindLightSend::SendSettings(false, type, NULL, *mSky, *mWater, fade, minAlt, maxAlt, *mWaterNormal);
240} 240}
241void WLFloaterManager::onRemove(void* userData) 241void WLFloaterManager::onRemove(void* userData)
242{ 242{
@@ -258,7 +258,7 @@ void WLFloaterManager::onRemove(void* userData)
258 } 258 }
259 259
260 if(mSky != NULL && mWater != NULL && mWaterNormal != NULL) 260 if(mSky != NULL && mWater != NULL && mWaterNormal != NULL)
261 WLFloaterWindLightSend::SendSettings(true, type, false, *mSky, *mWater, fade, minAlt, maxAlt, *mWaterNormal); 261 WLFloaterWindLightSend::SendSettings(true, type, false, *mSky, *mWater, fade, minAlt, maxAlt, *mWaterNormal);
262} 262}
263 263
264 264
@@ -269,13 +269,12 @@ void WLFloaterManager::UpdateFloater()
269 LLComboBox* comboBox = mgr->getChild<LLComboBox>("WLSettingsCombo"); 269 LLComboBox* comboBox = mgr->getChild<LLComboBox>("WLSettingsCombo");
270 comboBox->clear(); 270 comboBox->clear();
271 comboBox->removeall(); 271 comboBox->removeall();
272 std::map<std::string, LLWLParamSet*>::iterator mIt = 272 std::map<std::string, LLWLParamSet*>::iterator mIt =
273 WLFloaterManager::instance()->mWLParamList.begin(); 273 WLFloaterManager::instance()->mWLParamList.begin();
274 for(; mIt != WLFloaterManager::instance()->mWLParamList.end(); mIt++) 274 for(; mIt != WLFloaterManager::instance()->mWLParamList.end(); mIt++)
275 { 275 {
276 comboBox->add(mIt->first); 276 comboBox->add(mIt->first);
277 } 277 }
278 //Reorder them 278 //Reorder them
279 comboBox->sortByName(); 279 comboBox->sortByName();
280} 280}
281
diff --git a/linden/indra/newview/wlretrievesettings.cpp b/linden/indra/newview/wlretrievesettings.cpp
index afa84f2..3fd3084 100644
--- a/linden/indra/newview/wlretrievesettings.cpp
+++ b/linden/indra/newview/wlretrievesettings.cpp
@@ -1,11 +1,11 @@
1/** 1/**
2* @file wlfloaterwindlightsend.cpp 2* @file wlfloaterwindlightsend.cpp
3* @brief WLFloaterWindLightSend class definition 3* @brief WLFloaterWindLightSend class definition
4* 4*
5* $LicenseInfo:firstyear=2007&license=viewergpl$ 5* $LicenseInfo:firstyear=2007&license=viewergpl$
6* 6*
7* Copyright (c) 2007-2009, Linden Research, Inc. 7* Copyright (c) 2007-2009, Linden Research, Inc.
8* 8*
9* Second Life Viewer Source Code 9* Second Life Viewer Source Code
10* The source code in this file ("Source Code") is provided by Linden Lab 10* The source code in this file ("Source Code") is provided by Linden Lab
11* to you under the terms of the GNU General Public License, version 2.0 11* to you under the terms of the GNU General Public License, version 2.0
@@ -13,17 +13,17 @@
13* ("Other License"), formally executed by you and Linden Lab. Terms of 13* ("Other License"), formally executed by you and Linden Lab. Terms of
14* the GPL can be found in doc/GPL-license.txt in this distribution, or 14* the GPL can be found in doc/GPL-license.txt in this distribution, or
15* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 15* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
16* 16*
17* There are special exceptions to the terms and conditions of the GPL as 17* There are special exceptions to the terms and conditions of the GPL as
18* it is applied to this Source Code. View the full text of the exception 18* it is applied to this Source Code. View the full text of the exception
19* in the file doc/FLOSS-exception.txt in this software distribution, or 19* in the file doc/FLOSS-exception.txt in this software distribution, or
20* online at 20* online at
21* http://secondlifegrid.net/programs/open_source/licensing/flossexception 21* http://secondlifegrid.net/programs/open_source/licensing/flossexception
22* 22*
23* By copying, modifying or distributing this software, you acknowledge 23* By copying, modifying or distributing this software, you acknowledge
24* that you have read and understood your obligations described above, 24* that you have read and understood your obligations described above,
25* and agree to abide by those obligations. 25* and agree to abide by those obligations.
26* 26*
27* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO 27* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
28* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, 28* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
29* COMPLETENESS OR PERFORMANCE. 29* COMPLETENESS OR PERFORMANCE.
@@ -93,7 +93,7 @@ void retrieveWindlightSettings::result(const LLSD& content)
93 for(LLSD::array_const_iterator wls = content["WindLight"].beginArray(); 93 for(LLSD::array_const_iterator wls = content["WindLight"].beginArray();
94 wls != content["WindLight"].endArray(); 94 wls != content["WindLight"].endArray();
95 ++wls) 95 ++wls)
96 { 96 {
97 LLSD windLightLLSD = *wls; 97 LLSD windLightLLSD = *wls;
98 LLWaterParamSet* mWater; 98 LLWaterParamSet* mWater;
99 LLWLParamSet* mSky; 99 LLWLParamSet* mSky;
@@ -235,4 +235,4 @@ void retrieveWindlightSettings::error(U32 status, const std::string& reason)
235{ 235{
236 LL_INFOS("Inventory") << "retrieveWindlightSettings::error " 236 LL_INFOS("Inventory") << "retrieveWindlightSettings::error "
237 << status << ": " << reason << LL_ENDL; 237 << status << ": " << reason << LL_ENDL;
238} \ No newline at end of file 238}