aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llviewermessage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/llviewermessage.cpp')
-rw-r--r--[-rwxr-xr-x]linden/indra/newview/llviewermessage.cpp370
1 files changed, 181 insertions, 189 deletions
diff --git a/linden/indra/newview/llviewermessage.cpp b/linden/indra/newview/llviewermessage.cpp
index 9a0cf47..10d701d 100755..100644
--- 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"
@@ -65,7 +65,7 @@
65#include "lltimer.h" 65#include "lltimer.h"
66#include "llmd5.h" 66#include "llmd5.h"
67 67
68#include "lightshare.h" 68#include "llettherebelight.h"
69#include "llagent.h" 69#include "llagent.h"
70#include "llcallingcard.h" 70#include "llcallingcard.h"
71#include "llconsole.h" 71#include "llconsole.h"
@@ -132,6 +132,7 @@
132#include "llvlmanager.h" 132#include "llvlmanager.h"
133#include "llvoavatar.h" 133#include "llvoavatar.h"
134#include "llvotextbubble.h" 134#include "llvotextbubble.h"
135#include "llwlparammanager.h"
135#include "llweb.h" 136#include "llweb.h"
136#include "llworld.h" 137#include "llworld.h"
137#include "pipeline.h" 138#include "pipeline.h"
@@ -151,7 +152,6 @@
151 152
152#include "hippogridmanager.h" 153#include "hippogridmanager.h"
153#include "hippolimits.h" 154#include "hippolimits.h"
154#include "wlsettingsmanager.h"
155 155
156#if LL_WINDOWS // For Windows specific error handler 156#if LL_WINDOWS // For Windows specific error handler
157#include "llwindebug.h" // For the invalid message handler 157#include "llwindebug.h" // For the invalid message handler
@@ -199,8 +199,8 @@ const U32 OFFER_THROTTLE_MAX_COUNT=5; //number of items per time period
199const F32 OFFER_THROTTLE_TIME=10.f; //time period in seconds 199const F32 OFFER_THROTTLE_TIME=10.f; //time period in seconds
200 200
201//script permissions 201//script permissions
202const std::string SCRIPT_QUESTIONS[SCRIPT_PERMISSION_EOF] = 202const std::string SCRIPT_QUESTIONS[SCRIPT_PERMISSION_EOF] =
203 { 203 {
204 "ScriptTakeMoney", 204 "ScriptTakeMoney",
205 "ActOnControlInputs", 205 "ActOnControlInputs",
206 "RemapControlInputs", 206 "RemapControlInputs",
@@ -214,7 +214,7 @@ const std::string SCRIPT_QUESTIONS[SCRIPT_PERMISSION_EOF] =
214 "ControlYourCamera" 214 "ControlYourCamera"
215 }; 215 };
216 216
217const BOOL SCRIPT_QUESTION_IS_CAUTION[SCRIPT_PERMISSION_EOF] = 217const BOOL SCRIPT_QUESTION_IS_CAUTION[SCRIPT_PERMISSION_EOF] =
218{ 218{
219 TRUE, // ScriptTakeMoney, 219 TRUE, // ScriptTakeMoney,
220 FALSE, // ActOnControlInputs 220 FALSE, // ActOnControlInputs
@@ -466,7 +466,7 @@ void process_layer_data(LLMessageSystem *mesgsys, void **user_data)
466// char image_uuid_str[UUID_STR_SIZE]; /* Flawfinder: ignore */ 466// char image_uuid_str[UUID_STR_SIZE]; /* Flawfinder: ignore */
467// memcpy(image_uuid_str, pos_uuid+2, UUID_STR_SIZE-1); /* Flawfinder: ignore */ 467// memcpy(image_uuid_str, pos_uuid+2, UUID_STR_SIZE-1); /* Flawfinder: ignore */
468// image_uuid_str[UUID_STR_SIZE-1] = 0; 468// image_uuid_str[UUID_STR_SIZE-1] = 0;
469 469
470// LLUUID image_uuid(image_uuid_str); 470// LLUUID image_uuid(image_uuid_str);
471 471
472// LL_INFOS("Messaging") << "Found UUID: " << image_uuid << LL_ENDL; 472// LL_INFOS("Messaging") << "Found UUID: " << image_uuid << LL_ENDL;
@@ -541,7 +541,7 @@ void process_layer_data(LLMessageSystem *mesgsys, void **user_data)
541// else 541// else
542// { 542// {
543// LLFILE* fIn = LLFile::fopen(filename, "rb"); /* Flawfinder: ignore */ 543// LLFILE* fIn = LLFile::fopen(filename, "rb"); /* Flawfinder: ignore */
544// if (fIn) 544// if (fIn)
545// { 545// {
546// LLPointer<LLImageJ2C> ImageUtility = new LLImageJ2C; 546// LLPointer<LLImageJ2C> ImageUtility = new LLImageJ2C;
547// LLPointer<LLImageTGA> TargaUtility = new LLImageTGA; 547// LLPointer<LLImageTGA> TargaUtility = new LLImageTGA;
@@ -562,13 +562,13 @@ void process_layer_data(LLMessageSystem *mesgsys, void **user_data)
562 562
563// ImageUtility->updateData(); 563// ImageUtility->updateData();
564// ImageUtility->decode(image, 100000.0f); 564// ImageUtility->decode(image, 100000.0f);
565 565
566// TargaUtility->encode(image); 566// TargaUtility->encode(image);
567// U8 *data = TargaUtility->getData(); 567// U8 *data = TargaUtility->getData();
568// S32 data_size = TargaUtility->getDataSize(); 568// S32 data_size = TargaUtility->getDataSize();
569 569
570// std::string file_path = gDirUtilp->getDirName(filename); 570// std::string file_path = gDirUtilp->getDirName(filename);
571 571
572// std::string output_file = llformat("%s/image-%03d.tga", file_path.c_str(), image_num);//filename; 572// std::string output_file = llformat("%s/image-%03d.tga", file_path.c_str(), image_num);//filename;
573// //S32 name_len = output_file.length(); 573// //S32 name_len = output_file.length();
574// //strcpy(&output_file[name_len-3], "tga"); 574// //strcpy(&output_file[name_len-3], "tga");
@@ -657,7 +657,6 @@ void send_sound_trigger(const LLUUID& sound_id, F32 gain)
657bool join_group_response(const LLSD& notification, const LLSD& response) 657bool join_group_response(const LLSD& notification, const LLSD& response)
658{ 658{
659 S32 option = LLNotification::getSelectedOption(notification, response); 659 S32 option = LLNotification::getSelectedOption(notification, response);
660 BOOL delete_context_data = TRUE;
661 bool accept_invite = false; 660 bool accept_invite = false;
662 661
663 LLUUID group_id = notification["payload"]["group_id"].asUUID(); 662 LLUUID group_id = notification["payload"]["group_id"].asUUID();
@@ -686,7 +685,6 @@ bool join_group_response(const LLSD& notification, const LLSD& response)
686 } 685 }
687 else 686 else
688 { 687 {
689 delete_context_data = FALSE;
690 LLSD args; 688 LLSD args;
691 args["NAME"] = name; 689 args["NAME"] = name;
692 args["INVITE"] = message; 690 args["INVITE"] = message;
@@ -700,7 +698,6 @@ bool join_group_response(const LLSD& notification, const LLSD& response)
700 // sure the user is sure they want to join. 698 // sure the user is sure they want to join.
701 if (fee > 0) 699 if (fee > 0)
702 { 700 {
703 delete_context_data = FALSE;
704 LLSD args; 701 LLSD args;
705 args["COST"] = llformat("%d", fee); 702 args["COST"] = llformat("%d", fee);
706 args["CURRENCY"] = gHippoGridManager->getConnectedGrid()->getCurrencySymbol(); 703 args["CURRENCY"] = gHippoGridManager->getConnectedGrid()->getCurrencySymbol();
@@ -756,10 +753,10 @@ private:
756 std::string mFromName; 753 std::string mFromName;
757}; 754};
758 755
759//unlike the FetchObserver for AgentOffer, we only make one 756//unlike the FetchObserver for AgentOffer, we only make one
760//instance of the AddedObserver for TaskOffers 757//instance of the AddedObserver for TaskOffers
761//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
762//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
763//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.
764class LLOpenTaskOffer : public LLInventoryAddedObserver 761class LLOpenTaskOffer : public LLInventoryAddedObserver
765{ 762{
@@ -776,7 +773,7 @@ LLOpenTaskOffer* gNewInventoryObserver=NULL;
776 773
777void start_new_inventory_observer() 774void start_new_inventory_observer()
778{ 775{
779 if (!gNewInventoryObserver) //task offer observer 776 if (!gNewInventoryObserver) //task offer observer
780 { 777 {
781 // Observer is deleted by gInventory 778 // Observer is deleted by gInventory
782 gNewInventoryObserver = new LLOpenTaskOffer; 779 gNewInventoryObserver = new LLOpenTaskOffer;
@@ -835,7 +832,7 @@ protected:
835 832
836 833
837//Returns TRUE if we are OK, FALSE if we are throttled 834//Returns TRUE if we are OK, FALSE if we are throttled
838//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
839//without registering a hit 836//without registering a hit
840bool check_offer_throttle(const std::string& from_name, bool check_only) 837bool check_offer_throttle(const std::string& from_name, bool check_only)
841{ 838{
@@ -851,7 +848,7 @@ bool check_offer_throttle(const std::string& from_name, bool check_only)
851 { 848 {
852 return gThrottleTimer.hasExpired(); 849 return gThrottleTimer.hasExpired();
853 } 850 }
854 851
855 if(gThrottleTimer.checkExpirationAndReset(OFFER_THROTTLE_TIME)) 852 if(gThrottleTimer.checkExpirationAndReset(OFFER_THROTTLE_TIME))
856 { 853 {
857 LL_DEBUGS("Messaging") << "Throttle Expired" << LL_ENDL; 854 LL_DEBUGS("Messaging") << "Throttle Expired" << LL_ENDL;
@@ -897,7 +894,7 @@ bool check_offer_throttle(const std::string& from_name, bool check_only)
897 } 894 }
898 } 895 }
899} 896}
900 897
901void 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)
902{ 899{
903 std::vector<LLUUID>::const_iterator it = items.begin(); 900 std::vector<LLUUID>::const_iterator it = items.begin();
@@ -928,11 +925,9 @@ void open_offer(const std::vector<LLUUID>& items, const std::string& from_name)
928 { 925 {
929 case LLAssetType::AT_NOTECARD: 926 case LLAssetType::AT_NOTECARD:
930 // Don't show WindLight settings as notecards. 927 // Don't show WindLight settings as notecards.
931 // *TODO: centralise all these damned .wl/.ww checks somewhere. 928 if(!LLWLParamManager::isSettingsNotecard(item->getName()))
932 if((item->getName().length() > 2 && item->getName().compare(item->getName().length() - 3, 3, ".wl") != 0) &&
933 (item->getName().compare(item->getName().length() - 3, 3, ".ww") != 0))
934 { 929 {
935 open_notecard((LLViewerInventoryItem*)item, std::string("Note: ") + item->getName(), 930 open_notecard((LLViewerInventoryItem*)item, std::string("Note: ") + item->getName(),
936 LLUUID::null, show_keep_discard, LLUUID::null, FALSE); 931 LLUUID::null, show_keep_discard, LLUUID::null, FALSE);
937 } 932 }
938 break; 933 break;
@@ -948,7 +943,7 @@ void open_offer(const std::vector<LLUUID>& items, const std::string& from_name)
948 } 943 }
949 } 944 }
950 //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
951 946
952 // Don't auto-open the inventory floater 947 // Don't auto-open the inventory floater
953 LLInventoryView* view = LLInventoryView::getActiveInventory(); 948 LLInventoryView* view = LLInventoryView::getActiveInventory();
954 if(!view) 949 if(!view)
@@ -1028,7 +1023,7 @@ void inventory_offer_mute_callback(const LLUUID& blocked_id,
1028 OfferMatcher(const LLUUID& to_block) : blocked_id(to_block) {} 1023 OfferMatcher(const LLUUID& to_block) : blocked_id(to_block) {}
1029 BOOL matches(const LLNotificationPtr notification) const 1024 BOOL matches(const LLNotificationPtr notification) const
1030 { 1025 {
1031 if(notification->getName() == "ObjectGiveItem" 1026 if(notification->getName() == "ObjectGiveItem"
1032 || notification->getName() == "ObjectGiveItemUnknownUser" 1027 || notification->getName() == "ObjectGiveItemUnknownUser"
1033 || notification->getName() == "UserGiveItem") 1028 || notification->getName() == "UserGiveItem")
1034 { 1029 {
@@ -1104,7 +1099,7 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD&
1104 std::string name; 1099 std::string name;
1105 gAgent.buildFullname(name); 1100 gAgent.buildFullname(name);
1106 msg->addStringFast(_PREHASH_FromAgentName, name); 1101 msg->addStringFast(_PREHASH_FromAgentName, name);
1107 msg->addStringFast(_PREHASH_Message, ""); 1102 msg->addStringFast(_PREHASH_Message, "");
1108 msg->addU32Fast(_PREHASH_ParentEstateID, 0); 1103 msg->addU32Fast(_PREHASH_ParentEstateID, 0);
1109 msg->addUUIDFast(_PREHASH_RegionID, LLUUID::null); 1104 msg->addUUIDFast(_PREHASH_RegionID, LLUUID::null);
1110 msg->addVector3Fast(_PREHASH_Position, gAgent.getPositionAgent()); 1105 msg->addVector3Fast(_PREHASH_Position, gAgent.getPositionAgent());
@@ -1164,9 +1159,9 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD&
1164 { 1159 {
1165 from_string = chatHistory_string = mFromName; 1160 from_string = chatHistory_string = mFromName;
1166 } 1161 }
1167 1162
1168 bool busy=FALSE; 1163 bool busy=FALSE;
1169 1164
1170 switch(button) 1165 switch(button)
1171 { 1166 {
1172 case IOR_ACCEPT: 1167 case IOR_ACCEPT:
@@ -1188,7 +1183,7 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD&
1188 // ACCEPT. The math for the dialog works, because the accept 1183 // ACCEPT. The math for the dialog works, because the accept
1189 // for inventory_offered, task_inventory_offer or 1184 // for inventory_offered, task_inventory_offer or
1190 // group_notice_inventory is 1 greater than the offer integer value. 1185 // group_notice_inventory is 1 greater than the offer integer value.
1191 // Generates IM_INVENTORY_ACCEPTED, IM_TASK_INVENTORY_ACCEPTED, 1186 // Generates IM_INVENTORY_ACCEPTED, IM_TASK_INVENTORY_ACCEPTED,
1192 // or IM_GROUP_NOTICE_INVENTORY_ACCEPTED 1187 // or IM_GROUP_NOTICE_INVENTORY_ACCEPTED
1193 msg->addU8Fast(_PREHASH_Dialog, (U8)(mIM + 1)); 1188 msg->addU8Fast(_PREHASH_Dialog, (U8)(mIM + 1));
1194 msg->addBinaryDataFast(_PREHASH_BinaryBucket, &(mFolderID.mData), 1189 msg->addBinaryDataFast(_PREHASH_BinaryBucket, &(mFolderID.mData),
@@ -1288,7 +1283,7 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD&
1288 LLFloaterChat::addChatHistory(chat); 1283 LLFloaterChat::addChatHistory(chat);
1289 1284
1290 // 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
1291 // 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
1292 // request will suffice to discard the item. 1287 // request will suffice to discard the item.
1293 if(IM_INVENTORY_OFFERED == mIM) 1288 if(IM_INVENTORY_OFFERED == mIM)
1294 { 1289 {
@@ -1306,7 +1301,7 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD&
1306 { 1301 {
1307 opener = discard_agent_offer; 1302 opener = discard_agent_offer;
1308 } 1303 }
1309 1304
1310 } 1305 }
1311 if (busy && (!mFromGroup && !mFromObject)) 1306 if (busy && (!mFromGroup && !mFromObject))
1312 { 1307 {
@@ -1338,7 +1333,7 @@ void inventory_offer_handler(LLOfferInfo* info, BOOL from_task)
1338 info->forceResponse(IOR_BUSY); 1333 info->forceResponse(IOR_BUSY);
1339 return; 1334 return;
1340 } 1335 }
1341 1336
1342 //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.
1343 if (LLMuteList::getInstance()->isMuted(info->mFromID, info->mFromName)) 1338 if (LLMuteList::getInstance()->isMuted(info->mFromID, info->mFromName))
1344 { 1339 {
@@ -1377,7 +1372,7 @@ void inventory_offer_handler(LLOfferInfo* info, BOOL from_task)
1377 } 1372 }
1378// [/RLVa:KB] 1373// [/RLVa:KB]
1379 } 1374 }
1380 1375
1381 LLSD args; 1376 LLSD args;
1382 args["[OBJECTNAME]"] = msg; 1377 args["[OBJECTNAME]"] = msg;
1383 1378
@@ -1480,7 +1475,7 @@ static LLNotificationFunctorRegistration group_vote_callback_reg("GroupVote", gr
1480bool lure_callback(const LLSD& notification, const LLSD& response) 1475bool lure_callback(const LLSD& notification, const LLSD& response)
1481{ 1476{
1482 S32 option = 0; 1477 S32 option = 0;
1483 if (response.isInteger()) 1478 if (response.isInteger())
1484 { 1479 {
1485 option = response.asInteger(); 1480 option = response.asInteger();
1486 } 1481 }
@@ -1488,7 +1483,7 @@ bool lure_callback(const LLSD& notification, const LLSD& response)
1488 { 1483 {
1489 option = LLNotification::getSelectedOption(notification, response); 1484 option = LLNotification::getSelectedOption(notification, response);
1490 } 1485 }
1491 1486
1492 LLUUID from_id = notification["payload"]["from_id"].asUUID(); 1487 LLUUID from_id = notification["payload"]["from_id"].asUUID();
1493 LLUUID lure_id = notification["payload"]["lure_id"].asUUID(); 1488 LLUUID lure_id = notification["payload"]["lure_id"].asUUID();
1494 BOOL godlike = notification["payload"]["godlike"].asBoolean(); 1489 BOOL godlike = notification["payload"]["godlike"].asBoolean();
@@ -1548,7 +1543,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
1548 S32 binary_bucket_size; 1543 S32 binary_bucket_size;
1549 LLChat chat; 1544 LLChat chat;
1550 std::string buffer; 1545 std::string buffer;
1551 1546
1552 // *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)
1553 msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, from_id); 1548 msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, from_id);
1554 msg->getBOOLFast(_PREHASH_MessageBlock, _PREHASH_FromGroup, from_group); 1549 msg->getBOOLFast(_PREHASH_MessageBlock, _PREHASH_FromGroup, from_group);
@@ -1573,7 +1568,6 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
1573 BOOL is_owned_by_me = FALSE; 1568 BOOL is_owned_by_me = FALSE;
1574 1569
1575 LLUUID computed_session_id = LLIMMgr::computeSessionID(dialog,from_id); 1570 LLUUID computed_session_id = LLIMMgr::computeSessionID(dialog,from_id);
1576
1577 chat.mMuted = is_muted && !is_god; 1571 chat.mMuted = is_muted && !is_god;
1578 chat.mFromID = from_id; 1572 chat.mFromID = from_id;
1579 chat.mFromName = name; 1573 chat.mFromName = name;
@@ -1722,7 +1716,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
1722 || dialog == IM_TYPING_STOP 1716 || dialog == IM_TYPING_STOP
1723 || dialog == IM_BUSY_AUTO_RESPONSE) 1717 || dialog == IM_BUSY_AUTO_RESPONSE)
1724 { 1718 {
1725 1719
1726 if(session_id != computed_session_id) 1720 if(session_id != computed_session_id)
1727 { 1721 {
1728 session_id = computed_session_id; 1722 session_id = computed_session_id;
@@ -1961,7 +1955,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
1961 } 1955 }
1962 } 1956 }
1963 //InstantMessageResponseItem< 1957 //InstantMessageResponseItem<
1964 1958
1965 } 1959 }
1966 } 1960 }
1967 } 1961 }
@@ -1981,10 +1975,10 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
1981 LLNotifications::instance().add("SystemMessageTip",args); 1975 LLNotifications::instance().add("SystemMessageTip",args);
1982 break; 1976 break;
1983 1977
1984 case IM_NOTHING_SPECIAL: 1978 case IM_NOTHING_SPECIAL:
1985 // Don't show dialog, just do IM 1979 // Don't show dialog, just do IM
1986 if (!gAgent.isGodlike() 1980 if (!gAgent.isGodlike()
1987 && gAgent.getRegion()->isPrelude() 1981 && gAgent.getRegion()->isPrelude()
1988 && to_id.isNull() ) 1982 && to_id.isNull() )
1989 { 1983 {
1990 // do nothing -- don't distract newbies in 1984 // do nothing -- don't distract newbies in
@@ -2005,7 +1999,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
2005 ( (!gRlvHandler.hasBehaviour(RLV_BHVR_RECVIM)) || (gRlvHandler.isException(RLV_BHVR_RECVIM, from_id))) ) 1999 ( (!gRlvHandler.hasBehaviour(RLV_BHVR_RECVIM)) || (gRlvHandler.isException(RLV_BHVR_RECVIM, from_id))) )
2006// [/RLVa:KB] 2000// [/RLVa:KB]
2007 { 2001 {
2008 // return a standard "busy" message, but only do it to online IM 2002 // return a standard "busy" message, but only do it to online IM
2009 // (i.e. not other auto responses and not store-and-forward IM) 2003 // (i.e. not other auto responses and not store-and-forward IM)
2010 if (!gIMMgr->hasSession(session_id)) 2004 if (!gIMMgr->hasSession(session_id))
2011 { 2005 {
@@ -2031,7 +2025,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
2031 // now store incoming IM in chat history 2025 // now store incoming IM in chat history
2032 2026
2033 buffer = separator_string + message.substr(message_offset); 2027 buffer = separator_string + message.substr(message_offset);
2034 2028
2035 LL_INFOS("Messaging") << "process_improved_im: session_id( " << session_id << " ), from_id( " << from_id << " )" << LL_ENDL; 2029 LL_INFOS("Messaging") << "process_improved_im: session_id( " << session_id << " ), from_id( " << from_id << " )" << LL_ENDL;
2036 2030
2037 // add to IM panel, but do not bother the user 2031 // add to IM panel, but do not bother the user
@@ -2177,7 +2171,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
2177 U8 item_name[DB_INV_ITEM_NAME_BUF_SIZE]; 2171 U8 item_name[DB_INV_ITEM_NAME_BUF_SIZE];
2178 }* notice_bin_bucket; 2172 }* notice_bin_bucket;
2179 2173
2180 // Make sure the binary bucket is big enough to hold the header 2174 // Make sure the binary bucket is big enough to hold the header
2181 // and a null terminated item name. 2175 // and a null terminated item name.
2182 if ( (binary_bucket_size < (S32)((sizeof(notice_bucket_header_t) + sizeof(U8)))) 2176 if ( (binary_bucket_size < (S32)((sizeof(notice_bucket_header_t) + sizeof(U8))))
2183 || (binary_bucket[binary_bucket_size - 1] != '\0') ) 2177 || (binary_bucket[binary_bucket_size - 1] != '\0') )
@@ -2198,7 +2192,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
2198 if (has_inventory) 2192 if (has_inventory)
2199 { 2193 {
2200 info = new LLOfferInfo; 2194 info = new LLOfferInfo;
2201 2195
2202 info->mIM = IM_GROUP_NOTICE; 2196 info->mIM = IM_GROUP_NOTICE;
2203 info->mFromID = from_id; 2197 info->mFromID = from_id;
2204 info->mFromGroup = from_group; 2198 info->mFromGroup = from_group;
@@ -2214,7 +2208,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
2214 info->mDesc = item_name; 2208 info->mDesc = item_name;
2215 info->mHost = msg->getSender(); 2209 info->mHost = msg->getSender();
2216 } 2210 }
2217 2211
2218 std::string str(message); 2212 std::string str(message);
2219 2213
2220 // Tokenize the string. 2214 // Tokenize the string.
@@ -2418,7 +2412,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
2418 LL_WARNS("Messaging") << "Received IM: IM_GROUP_ELECTION_DEPRECATED" << LL_ENDL; 2412 LL_WARNS("Messaging") << "Received IM: IM_GROUP_ELECTION_DEPRECATED" << LL_ENDL;
2419 } 2413 }
2420 break; 2414 break;
2421 2415
2422 case IM_SESSION_SEND: 2416 case IM_SESSION_SEND:
2423 { 2417 {
2424 if (!is_god && is_busy) 2418 if (!is_god && is_busy)
@@ -2480,7 +2474,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
2480 { 2474 {
2481 group_name = std::string((char*)binary_bucket); 2475 group_name = std::string((char*)binary_bucket);
2482 } 2476 }
2483 chat.mText = std::string("IM [") + group_name + std::string("] ") + name 2477 chat.mText = std::string("IM [") + group_name + std::string("] ") + name
2484 + separator_string + saved + message.substr(message_offset); 2478 + separator_string + saved + message.substr(message_offset);
2485 } 2479 }
2486 else 2480 else
@@ -2527,7 +2521,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
2527 } 2521 }
2528 2522
2529 std::string tempname = name; 2523 std::string tempname = name;
2530 2524
2531 size_t found = tempname.find(" "); 2525 size_t found = tempname.find(" ");
2532 while(found != std::string::npos) 2526 while(found != std::string::npos)
2533 { 2527 {
@@ -2539,7 +2533,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
2539 { 2533 {
2540 name = ">>"; 2534 name = ">>";
2541 chat.mFromName = name; 2535 chat.mFromName = name;
2542 2536
2543 } 2537 }
2544 2538
2545 std::ostringstream link; 2539 std::ostringstream link;
@@ -2591,14 +2585,14 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
2591 gIMMgr->addMessage(session_id, from_id, name, buffer); 2585 gIMMgr->addMessage(session_id, from_id, name, buffer);
2592 } 2586 }
2593 break; 2587 break;
2594 2588
2595 case IM_LURE_USER: 2589 case IM_LURE_USER:
2596 { 2590 {
2597 if (is_muted) 2591 if (is_muted)
2598 { 2592 {
2599 return; 2593 return;
2600 } 2594 }
2601 else if (is_busy) 2595 else if (is_busy)
2602 { 2596 {
2603 busy_message(msg,from_id); 2597 busy_message(msg,from_id);
2604 } 2598 }
@@ -2734,7 +2728,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
2734 } 2728 }
2735 2729
2736 std::string url; 2730 std::string url;
2737 2731
2738 url.assign((char*)binary_bucket, binary_bucket_size-1); 2732 url.assign((char*)binary_bucket, binary_bucket_size-1);
2739 args["MESSAGE"] = message; 2733 args["MESSAGE"] = message;
2740 args["URL"] = url; 2734 args["URL"] = url;
@@ -2784,11 +2778,11 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
2784 // as the database should already include the relationship. But it 2778 // as the database should already include the relationship. But it
2785 // doesn't hurt for dupes. 2779 // doesn't hurt for dupes.
2786 LLAvatarTracker::formFriendship(from_id); 2780 LLAvatarTracker::formFriendship(from_id);
2787 2781
2788 std::vector<std::string> strings; 2782 std::vector<std::string> strings;
2789 strings.push_back(from_id.asString()); 2783 strings.push_back(from_id.asString());
2790 send_generic_message("requestonlinenotification", strings); 2784 send_generic_message("requestonlinenotification", strings);
2791 2785
2792 args["NAME"] = name; 2786 args["NAME"] = name;
2793 LLNotifications::instance().add("FriendshipAccepted", args); 2787 LLNotifications::instance().add("FriendshipAccepted", args);
2794 } 2788 }
@@ -2808,7 +2802,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
2808 } 2802 }
2809} 2803}
2810 2804
2811void busy_message (LLMessageSystem* msg, LLUUID from_id) 2805void busy_message (LLMessageSystem* msg, LLUUID from_id)
2812{ 2806{
2813 if (gAgent.getBusy()) 2807 if (gAgent.getBusy())
2814 { 2808 {
@@ -2851,7 +2845,7 @@ bool callingcard_offer_callback(const LLSD& notification, const LLSD& response)
2851 msg->sendReliable(LLHost(notification["payload"]["sender"].asString())); 2845 msg->sendReliable(LLHost(notification["payload"]["sender"].asString()));
2852 break; 2846 break;
2853 case 1: 2847 case 1:
2854 // decline 2848 // decline
2855 msg->newMessageFast(_PREHASH_DeclineCallingCard); 2849 msg->newMessageFast(_PREHASH_DeclineCallingCard);
2856 msg->nextBlockFast(_PREHASH_AgentData); 2850 msg->nextBlockFast(_PREHASH_AgentData);
2857 msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); 2851 msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
@@ -2902,7 +2896,7 @@ void process_offer_callingcard(LLMessageSystem* msg, void**)
2902 2896
2903 if(!source_name.empty()) 2897 if(!source_name.empty())
2904 { 2898 {
2905 if (gAgent.getBusy() 2899 if (gAgent.getBusy()
2906 || LLMuteList::getInstance()->isMuted(source_id, source_name, LLMute::flagTextChat)) 2900 || LLMuteList::getInstance()->isMuted(source_id, source_name, LLMute::flagTextChat))
2907 { 2901 {
2908 // automatically decline offer 2902 // automatically decline offer
@@ -2959,13 +2953,13 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
2959 2953
2960 msg->getString("ChatData", "FromName", from_name); 2954 msg->getString("ChatData", "FromName", from_name);
2961 chat.mFromName = from_name; 2955 chat.mFromName = from_name;
2962 2956
2963 msg->getUUID("ChatData", "SourceID", from_id); 2957 msg->getUUID("ChatData", "SourceID", from_id);
2964 chat.mFromID = from_id; 2958 chat.mFromID = from_id;
2965 2959
2966 // Object owner for objects 2960 // Object owner for objects
2967 msg->getUUID("ChatData", "OwnerID", owner_id); 2961 msg->getUUID("ChatData", "OwnerID", owner_id);
2968 2962
2969 msg->getU8Fast(_PREHASH_ChatData, _PREHASH_SourceType, source_temp); 2963 msg->getU8Fast(_PREHASH_ChatData, _PREHASH_SourceType, source_temp);
2970 chat.mSourceType = (EChatSourceType)source_temp; 2964 chat.mSourceType = (EChatSourceType)source_temp;
2971 2965
@@ -2974,9 +2968,9 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
2974 2968
2975 msg->getU8Fast(_PREHASH_ChatData, _PREHASH_Audible, audible_temp); 2969 msg->getU8Fast(_PREHASH_ChatData, _PREHASH_Audible, audible_temp);
2976 chat.mAudible = (EChatAudible)audible_temp; 2970 chat.mAudible = (EChatAudible)audible_temp;
2977 2971
2978 chat.mTime = LLFrameTimer::getElapsedSeconds(); 2972 chat.mTime = LLFrameTimer::getElapsedSeconds();
2979 2973
2980 BOOL is_busy = gAgent.getBusy(); 2974 BOOL is_busy = gAgent.getBusy();
2981 2975
2982 BOOL is_muted = FALSE; 2976 BOOL is_muted = FALSE;
@@ -2984,7 +2978,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
2984 is_muted = LLMuteList::getInstance()->isMuted( 2978 is_muted = LLMuteList::getInstance()->isMuted(
2985 from_id, 2979 from_id,
2986 from_name, 2980 from_name,
2987 LLMute::flagTextChat) 2981 LLMute::flagTextChat)
2988 || LLMuteList::getInstance()->isMuted(owner_id, LLMute::flagTextChat); 2982 || LLMuteList::getInstance()->isMuted(owner_id, LLMute::flagTextChat);
2989 is_god = chat.mSourceType != CHAT_SOURCE_OBJECT && 2983 is_god = chat.mSourceType != CHAT_SOURCE_OBJECT &&
2990 LLMuteList::getInstance()->isGod(from_name); 2984 LLMuteList::getInstance()->isGod(from_name);
@@ -2994,9 +2988,9 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
2994 if (chatter) 2988 if (chatter)
2995 { 2989 {
2996 chat.mPosAgent = chatter->getPositionAgent(); 2990 chat.mPosAgent = chatter->getPositionAgent();
2997 2991
2998 // Make swirly things only for talking objects. (not script debug messages, though) 2992 // Make swirly things only for talking objects. (not script debug messages, though)
2999// if (chat.mSourceType == CHAT_SOURCE_OBJECT 2993// if (chat.mSourceType == CHAT_SOURCE_OBJECT
3000// && chat.mChatType != CHAT_TYPE_DEBUG_MSG) 2994// && chat.mChatType != CHAT_TYPE_DEBUG_MSG)
3001// [RLVa:KB] - Alternate: Snowglobe-1.2.4 | Checked: 2009-07-10 (RLVa-1.0.0g) 2995// [RLVa:KB] - Alternate: Snowglobe-1.2.4 | Checked: 2009-07-10 (RLVa-1.0.0g)
3002 // Don't show swirly things for llOwnerSay() chat here because we handle those further down 2996 // Don't show swirly things for llOwnerSay() chat here because we handle those further down
@@ -3008,7 +3002,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
3008 LLPointer<LLViewerPartSourceChat> psc = new LLViewerPartSourceChat(chatter->getPositionAgent()); 3002 LLPointer<LLViewerPartSourceChat> psc = new LLViewerPartSourceChat(chatter->getPositionAgent());
3009 psc->setSourceObject(chatter); 3003 psc->setSourceObject(chatter);
3010 psc->setColor(color); 3004 psc->setColor(color);
3011 //We set the particles to be owned by the object's owner, 3005 //We set the particles to be owned by the object's owner,
3012 //just in case they should be muted by the mute list 3006 //just in case they should be muted by the mute list
3013 psc->setOwnerUUID(owner_id); 3007 psc->setOwnerUUID(owner_id);
3014 LLViewerPartSim::getInstance()->addPartSource(psc); 3008 LLViewerPartSim::getInstance()->addPartSource(psc);
@@ -3018,7 +3012,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
3018 if (is_audible 3012 if (is_audible
3019 && (is_god || (!is_muted && !is_busy))) 3013 && (is_god || (!is_muted && !is_busy)))
3020 { 3014 {
3021 if (chat.mChatType != CHAT_TYPE_START 3015 if (chat.mChatType != CHAT_TYPE_START
3022 && chat.mChatType != CHAT_TYPE_STOP) 3016 && chat.mChatType != CHAT_TYPE_STOP)
3023 { 3017 {
3024 gAgent.heardChat(chat.mFromID); 3018 gAgent.heardChat(chat.mFromID);
@@ -3028,7 +3022,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
3028 is_owned_by_me = chatter->permYouOwner(); 3022 is_owned_by_me = chatter->permYouOwner();
3029 } 3023 }
3030 3024
3031 if(chat.mSourceType == CHAT_SOURCE_OBJECT 3025 if(chat.mSourceType == CHAT_SOURCE_OBJECT
3032 && chat.mChatType != CHAT_TYPE_DEBUG_MSG 3026 && chat.mChatType != CHAT_TYPE_DEBUG_MSG
3033 && !owner_id.isNull() 3027 && !owner_id.isNull()
3034 && owner_id != gAgent.getID()) 3028 && owner_id != gAgent.getID())
@@ -3090,7 +3084,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
3090 msg->getStringFast(_PREHASH_ChatData, _PREHASH_Message, mesg); 3084 msg->getStringFast(_PREHASH_ChatData, _PREHASH_Message, mesg);
3091 3085
3092// [RLVa:KB] - Checked: 2009-10-06 (RLVa-1.0.4d) | Modified: RLVa-1.0.4d 3086// [RLVa:KB] - Checked: 2009-10-06 (RLVa-1.0.4d) | Modified: RLVa-1.0.4d
3093 if ( (rlv_handler_t::isEnabled()) && 3087 if ( (rlv_handler_t::isEnabled()) &&
3094 (CHAT_TYPE_START != chat.mChatType) && (CHAT_TYPE_STOP != chat.mChatType) && (CHAT_TYPE_OWNER != chat.mChatType) ) 3088 (CHAT_TYPE_START != chat.mChatType) && (CHAT_TYPE_STOP != chat.mChatType) && (CHAT_TYPE_OWNER != chat.mChatType) )
3095 { 3089 {
3096 // NOTE: chatter can be NULL (may not have rezzed yet, or could be another avie's HUD attachment) 3090 // NOTE: chatter can be NULL (may not have rezzed yet, or could be another avie's HUD attachment)
@@ -3099,7 +3093,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
3099 // Filtering "rules": 3093 // Filtering "rules":
3100 // avatar => filter all avie text (unless it's this avie or they're an exemption) 3094 // avatar => filter all avie text (unless it's this avie or they're an exemption)
3101 // objects => filter everything except attachments this avie owns 3095 // objects => filter everything except attachments this avie owns
3102 if ( ( (CHAT_SOURCE_AGENT == chat.mSourceType) && (from_id != gAgent.getID()) ) || 3096 if ( ( (CHAT_SOURCE_AGENT == chat.mSourceType) && (from_id != gAgent.getID()) ) ||
3103 ( (CHAT_SOURCE_OBJECT == chat.mSourceType) && ((!is_owned_by_me) || (!is_attachment)) ) ) 3097 ( (CHAT_SOURCE_OBJECT == chat.mSourceType) && ((!is_owned_by_me) || (!is_attachment)) ) )
3104 { 3098 {
3105 if (!rlvIsEmote(mesg)) 3099 if (!rlvIsEmote(mesg))
@@ -3122,7 +3116,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
3122 { 3116 {
3123 if (chat.mFromID != gAgent.getID()) 3117 if (chat.mFromID != gAgent.getID())
3124 from_name = RlvStrings::getAnonym(from_name); 3118 from_name = RlvStrings::getAnonym(from_name);
3125 } 3119 }
3126 else 3120 else
3127 { 3121 {
3128 if ( (!is_owned_by_me) || (!is_attachment) ) 3122 if ( (!is_owned_by_me) || (!is_attachment) )
@@ -3164,7 +3158,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
3164 if (LLFloaterMap::getInstance()) 3158 if (LLFloaterMap::getInstance())
3165 { 3159 {
3166 PanelRadarEntry* entry = LLFloaterMap::getInstance()->getRadar()->getEntry(from_id); 3160 PanelRadarEntry* entry = LLFloaterMap::getInstance()->getRadar()->getEntry(from_id);
3167 if (entry) 3161 if (entry)
3168 { 3162 {
3169 entry->setStatus(RADAR_STATUS_TYPING); 3163 entry->setStatus(RADAR_STATUS_TYPING);
3170 } 3164 }
@@ -3185,7 +3179,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
3185 if (LLFloaterMap::getInstance()) 3179 if (LLFloaterMap::getInstance())
3186 { 3180 {
3187 PanelRadarEntry* entry = LLFloaterMap::getInstance()->getRadar()->getEntry(from_id); 3181 PanelRadarEntry* entry = LLFloaterMap::getInstance()->getRadar()->getEntry(from_id);
3188 if (entry) 3182 if (entry)
3189 { 3183 {
3190 entry->setStatus(RADAR_STATUS_NONE); 3184 entry->setStatus(RADAR_STATUS_NONE);
3191 } 3185 }
@@ -3202,7 +3196,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
3202 3196
3203 if (!is_muted && !is_busy) 3197 if (!is_muted && !is_busy)
3204 { 3198 {
3205 3199
3206 BOOL sUseChatBubbles = gSavedSettings.getBOOL("UseChatBubbles"); 3200 BOOL sUseChatBubbles = gSavedSettings.getBOOL("UseChatBubbles");
3207 if(sUseChatBubbles) 3201 if(sUseChatBubbles)
3208 { 3202 {
@@ -3288,7 +3282,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
3288 verb = " retained: @"; 3282 verb = " retained: @";
3289 mesg = strRetained; 3283 mesg = strRetained;
3290 } 3284 }
3291 else 3285 else
3292 { 3286 {
3293 verb = ": @"; 3287 verb = ": @";
3294 if (!strExecuted.empty()) 3288 if (!strExecuted.empty())
@@ -3309,7 +3303,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
3309 LLPointer<LLViewerPartSourceChat> psc = new LLViewerPartSourceChat(chatter->getPositionAgent()); 3303 LLPointer<LLViewerPartSourceChat> psc = new LLViewerPartSourceChat(chatter->getPositionAgent());
3310 psc->setSourceObject(chatter); 3304 psc->setSourceObject(chatter);
3311 psc->setColor(color); 3305 psc->setColor(color);
3312 //We set the particles to be owned by the object's owner, 3306 //We set the particles to be owned by the object's owner,
3313 //just in case they should be muted by the mute list 3307 //just in case they should be muted by the mute list
3314 psc->setOwnerUUID(owner_id); 3308 psc->setOwnerUUID(owner_id);
3315 LLViewerPartSim::getInstance()->addPartSource(psc); 3309 LLViewerPartSim::getInstance()->addPartSource(psc);
@@ -3337,7 +3331,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
3337 chat.mText += verb; 3331 chat.mText += verb;
3338 chat.mText += mesg; 3332 chat.mText += mesg;
3339 } 3333 }
3340 3334
3341 if (chatter) 3335 if (chatter)
3342 { 3336 {
3343 chat.mPosAgent = chatter->getPositionAgent(); 3337 chat.mPosAgent = chatter->getPositionAgent();
@@ -3374,10 +3368,10 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
3374 3368
3375 3369
3376// Simulator we're on is informing the viewer that the agent 3370// Simulator we're on is informing the viewer that the agent
3377// is starting to teleport (perhaps to another sim, perhaps to the 3371// is starting to teleport (perhaps to another sim, perhaps to the
3378// same sim). If we initiated the teleport process by sending some kind 3372// same sim). If we initiated the teleport process by sending some kind
3379// of TeleportRequest, then this info is redundant, but if the sim 3373// of TeleportRequest, then this info is redundant, but if the sim
3380// initiated the teleport (via a script call, being killed, etc.) 3374// initiated the teleport (via a script call, being killed, etc.)
3381// then this info is news to us. 3375// then this info is news to us.
3382void process_teleport_start(LLMessageSystem *msg, void**) 3376void process_teleport_start(LLMessageSystem *msg, void**)
3383{ 3377{
@@ -3404,7 +3398,7 @@ void process_teleport_start(LLMessageSystem *msg, void**)
3404 gTeleportDisplay = TRUE; 3398 gTeleportDisplay = TRUE;
3405 gAgent.setTeleportState( LLAgent::TELEPORT_START ); 3399 gAgent.setTeleportState( LLAgent::TELEPORT_START );
3406 make_ui_sound("UISndTeleportOut"); 3400 make_ui_sound("UISndTeleportOut");
3407 3401
3408 // Don't call LLFirstUse::useTeleport here because this could be 3402 // Don't call LLFirstUse::useTeleport here because this could be
3409 // due to being killed, which would send you home, not to a Telehub 3403 // due to being killed, which would send you home, not to a Telehub
3410 } 3404 }
@@ -3441,7 +3435,7 @@ void process_teleport_progress(LLMessageSystem* msg, void**)
3441 //if we don't find the coresponding mapping in our progress mappings 3435 //if we don't find the coresponding mapping in our progress mappings
3442 std::string message = buffer; 3436 std::string message = buffer;
3443 3437
3444 if (LLAgent::sTeleportProgressMessages.find(buffer) != 3438 if (LLAgent::sTeleportProgressMessages.find(buffer) !=
3445 LLAgent::sTeleportProgressMessages.end() ) 3439 LLAgent::sTeleportProgressMessages.end() )
3446 { 3440 {
3447 message = LLAgent::sTeleportProgressMessages[buffer]; 3441 message = LLAgent::sTeleportProgressMessages[buffer];
@@ -3502,7 +3496,7 @@ public:
3502 3496
3503 3497
3504 3498
3505class LLPostTeleportNotifiers : public LLEventTimer 3499class LLPostTeleportNotifiers : public LLEventTimer
3506{ 3500{
3507public: 3501public:
3508 LLPostTeleportNotifiers(); 3502 LLPostTeleportNotifiers();
@@ -3529,10 +3523,10 @@ BOOL LLPostTeleportNotifiers::tick()
3529 LLInventoryFetchDescendentsObserver::folder_ref_t folders; 3523 LLInventoryFetchDescendentsObserver::folder_ref_t folders;
3530 LLUUID folder_id; 3524 LLUUID folder_id;
3531 folder_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_CALLINGCARD); 3525 folder_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_CALLINGCARD);
3532 if(folder_id.notNull()) 3526 if(folder_id.notNull())
3533 folders.push_back(folder_id); 3527 folders.push_back(folder_id);
3534 folder_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_LANDMARK); 3528 folder_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_LANDMARK);
3535 if(folder_id.notNull()) 3529 if(folder_id.notNull())
3536 folders.push_back(folder_id); 3530 folders.push_back(folder_id);
3537 if(!folders.empty()) 3531 if(!folders.empty())
3538 { 3532 {
@@ -3588,7 +3582,7 @@ void process_teleport_finish(LLMessageSystem* msg, void**)
3588 msg->getU64Fast(_PREHASH_Info, _PREHASH_RegionHandle, region_handle); 3582 msg->getU64Fast(_PREHASH_Info, _PREHASH_RegionHandle, region_handle);
3589 U32 teleport_flags; 3583 U32 teleport_flags;
3590 msg->getU32Fast(_PREHASH_Info, _PREHASH_TeleportFlags, teleport_flags); 3584 msg->getU32Fast(_PREHASH_Info, _PREHASH_TeleportFlags, teleport_flags);
3591 3585
3592 U32 region_size_x = 256; 3586 U32 region_size_x = 256;
3593 msg->getU32Fast(_PREHASH_Info, _PREHASH_RegionSizeX, region_size_x); 3587 msg->getU32Fast(_PREHASH_Info, _PREHASH_RegionSizeX, region_size_x);
3594 U32 region_size_y = 256; 3588 U32 region_size_y = 256;
@@ -3600,17 +3594,17 @@ void process_teleport_finish(LLMessageSystem* msg, void**)
3600 region_size_x = 256; 3594 region_size_x = 256;
3601 region_size_y = 256; 3595 region_size_y = 256;
3602 } 3596 }
3603 3597
3604 std::string seedCap; 3598 std::string seedCap;
3605 msg->getStringFast(_PREHASH_Info, _PREHASH_SeedCapability, seedCap); 3599 msg->getStringFast(_PREHASH_Info, _PREHASH_SeedCapability, seedCap);
3606 3600
3607 // update home location if we are teleporting out of prelude - specific to teleporting to welcome area 3601 // update home location if we are teleporting out of prelude - specific to teleporting to welcome area
3608 if((teleport_flags & TELEPORT_FLAGS_SET_HOME_TO_TARGET) 3602 if((teleport_flags & TELEPORT_FLAGS_SET_HOME_TO_TARGET)
3609 && (!gAgent.isGodlike())) 3603 && (!gAgent.isGodlike()))
3610 { 3604 {
3611 gAgent.setHomePosRegion(region_handle, pos); 3605 gAgent.setHomePosRegion(region_handle, pos);
3612 3606
3613 // Create a timer that will send notices when teleporting is all finished. Since this is 3607 // Create a timer that will send notices when teleporting is all finished. Since this is
3614 // based on the LLEventTimer class, it will be managed by that class and not orphaned or leaked. 3608 // based on the LLEventTimer class, it will be managed by that class and not orphaned or leaked.
3615 new LLPostTeleportNotifiers(); 3609 new LLPostTeleportNotifiers();
3616 } 3610 }
@@ -3674,8 +3668,7 @@ void process_teleport_finish(LLMessageSystem* msg, void**)
3674// gViewerWindow->setShowProgress(TRUE); 3668// gViewerWindow->setShowProgress(TRUE);
3675 3669
3676 // Tell the LightShare handler that we have changed regions. 3670 // Tell the LightShare handler that we have changed regions.
3677 WindlightMessage::resetRegion(); 3671 LightShare::resetRegion();
3678 WLSettingsManager::wlresetRegion();
3679} 3672}
3680 3673
3681// stuff we have to do every time we get an AvatarInitComplete from a sim 3674// stuff we have to do every time we get an AvatarInitComplete from a sim
@@ -3713,7 +3706,7 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**)
3713 msg->getVector3Fast(_PREHASH_Data, _PREHASH_LookAt, look_at); 3706 msg->getVector3Fast(_PREHASH_Data, _PREHASH_LookAt, look_at);
3714 U64 region_handle; 3707 U64 region_handle;
3715 msg->getU64Fast(_PREHASH_Data, _PREHASH_RegionHandle, region_handle); 3708 msg->getU64Fast(_PREHASH_Data, _PREHASH_RegionHandle, region_handle);
3716 3709
3717 std::string version_channel; 3710 std::string version_channel;
3718 msg->getString("SimData", "ChannelVersion", version_channel); 3711 msg->getString("SimData", "ChannelVersion", version_channel);
3719 3712
@@ -3735,8 +3728,8 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**)
3735 LL_WARNS("Messaging") << "current region " << gAgent.getRegion()->getOriginGlobal() << LL_ENDL; 3728 LL_WARNS("Messaging") << "current region " << gAgent.getRegion()->getOriginGlobal() << LL_ENDL;
3736 } 3729 }
3737 3730
3738 LL_WARNS("Messaging") << "Agent being sent to invalid home region: " 3731 LL_WARNS("Messaging") << "Agent being sent to invalid home region: "
3739 << x << ":" << y 3732 << x << ":" << y
3740 << " current pos " << gAgent.getPositionGlobal() 3733 << " current pos " << gAgent.getPositionGlobal()
3741 << LL_ENDL; 3734 << LL_ENDL;
3742 LLAppViewer::instance()->forceDisconnect("You were sent to an invalid region."); 3735 LLAppViewer::instance()->forceDisconnect("You were sent to an invalid region.");
@@ -3784,7 +3777,7 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**)
3784// if (avatarp) 3777// if (avatarp)
3785 { 3778 {
3786 // Chat the "back" SLURL. (DEV-4907) 3779 // Chat the "back" SLURL. (DEV-4907)
3787 // Show this in the console if DisableTeleportScreens is true 3780 // Show this in the console if DisableTeleportScreens is true
3788 // Why? Because it's nifty, that's why -- MC 3781 // Why? Because it's nifty, that's why -- MC
3789 LLChat chat("Teleport completed from " + gAgent.getTeleportSourceSLURL()); 3782 LLChat chat("Teleport completed from " + gAgent.getTeleportSourceSLURL());
3790 chat.mSourceType = CHAT_SOURCE_SYSTEM; 3783 chat.mSourceType = CHAT_SOURCE_SYSTEM;
@@ -3874,7 +3867,7 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**)
3874 { 3867 {
3875 avatarp->mFootPlane.clearVec(); 3868 avatarp->mFootPlane.clearVec();
3876 } 3869 }
3877 3870
3878 // send walk-vs-run status 3871 // send walk-vs-run status
3879 gAgent.sendWalkRun(gAgent.getRunning() || gAgent.getAlwaysRun()); 3872 gAgent.sendWalkRun(gAgent.getRunning() || gAgent.getAlwaysRun());
3880 3873
@@ -3931,7 +3924,7 @@ void process_crossed_region(LLMessageSystem* msg, void**)
3931 LLHost sim_host(sim_ip, sim_port); 3924 LLHost sim_host(sim_ip, sim_port);
3932 U64 region_handle; 3925 U64 region_handle;
3933 msg->getU64Fast(_PREHASH_RegionData, _PREHASH_RegionHandle, region_handle); 3926 msg->getU64Fast(_PREHASH_RegionData, _PREHASH_RegionHandle, region_handle);
3934 3927
3935 std::string seedCap; 3928 std::string seedCap;
3936 msg->getStringFast(_PREHASH_RegionData, _PREHASH_SeedCapability, seedCap); 3929 msg->getStringFast(_PREHASH_RegionData, _PREHASH_SeedCapability, seedCap);
3937 3930
@@ -3953,8 +3946,7 @@ void process_crossed_region(LLMessageSystem* msg, void**)
3953 regionp->setSeedCapability(seedCap); 3946 regionp->setSeedCapability(seedCap);
3954 3947
3955 // Tell the LightShare handler that we have changed regions. 3948 // Tell the LightShare handler that we have changed regions.
3956 WindlightMessage::resetRegion(); 3949 LightShare::resetRegion();
3957 WLSettingsManager::wlresetRegion();
3958} 3950}
3959 3951
3960 3952
@@ -4000,11 +3992,11 @@ void send_agent_update(BOOL force_send, BOOL send_reliable)
4000 const U8 DUP_MSGS = 1; // HACK! number of times to repeat data on motionless agent 3992 const U8 DUP_MSGS = 1; // HACK! number of times to repeat data on motionless agent
4001 3993
4002 // Store data on last sent update so that if no changes, no send 3994 // Store data on last sent update so that if no changes, no send
4003 static LLVector3 last_camera_pos_agent, 3995 static LLVector3 last_camera_pos_agent,
4004 last_camera_at, 3996 last_camera_at,
4005 last_camera_left, 3997 last_camera_left,
4006 last_camera_up; 3998 last_camera_up;
4007 3999
4008 static LLVector3 cam_center_chg, 4000 static LLVector3 cam_center_chg,
4009 cam_rot_chg; 4001 cam_rot_chg;
4010 4002
@@ -4057,13 +4049,13 @@ void send_agent_update(BOOL force_send, BOOL send_reliable)
4057 4049
4058 head_rot_chg = dot(last_head_rot, head_rotation); 4050 head_rot_chg = dot(last_head_rot, head_rotation);
4059 4051
4060 if (force_send || 4052 if (force_send ||
4061 (cam_center_chg.magVec() > TRANSLATE_THRESHOLD) || 4053 (cam_center_chg.magVec() > TRANSLATE_THRESHOLD) ||
4062 (head_rot_chg < THRESHOLD_HEAD_ROT_QDOT) || 4054 (head_rot_chg < THRESHOLD_HEAD_ROT_QDOT) ||
4063 (last_render_state != render_state) || 4055 (last_render_state != render_state) ||
4064 (cam_rot_chg.magVec() > ROTATION_THRESHOLD) || 4056 (cam_rot_chg.magVec() > ROTATION_THRESHOLD) ||
4065 control_flag_change != 0 || 4057 control_flag_change != 0 ||
4066 flag_change != 0) 4058 flag_change != 0)
4067 { 4059 {
4068/* 4060/*
4069 if (head_rot_chg < THRESHOLD_HEAD_ROT_QDOT) 4061 if (head_rot_chg < THRESHOLD_HEAD_ROT_QDOT)
@@ -4071,7 +4063,7 @@ void send_agent_update(BOOL force_send, BOOL send_reliable)
4071 //LL_INFOS("Messaging") << "head rot " << head_rotation << LL_ENDL; 4063 //LL_INFOS("Messaging") << "head rot " << head_rotation << LL_ENDL;
4072 LL_INFOS("Messaging") << "head_rot_chg = " << head_rot_chg << LL_ENDL; 4064 LL_INFOS("Messaging") << "head_rot_chg = " << head_rot_chg << LL_ENDL;
4073 } 4065 }
4074 if (cam_rot_chg.magVec() > ROTATION_THRESHOLD) 4066 if (cam_rot_chg.magVec() > ROTATION_THRESHOLD)
4075 { 4067 {
4076 LL_INFOS("Messaging") << "cam rot " << cam_rot_chg.magVec() << LL_ENDL; 4068 LL_INFOS("Messaging") << "cam rot " << cam_rot_chg.magVec() << LL_ENDL;
4077 } 4069 }
@@ -4102,8 +4094,8 @@ void send_agent_update(BOOL force_send, BOOL send_reliable)
4102 // some threshold from the last update, however this can break fine 4094 // some threshold from the last update, however this can break fine
4103 // adjustments when trying to aim an attached gun, so what we do here 4095 // adjustments when trying to aim an attached gun, so what we do here
4104 // (where we would normally skip sending an update when nothing has changed) 4096 // (where we would normally skip sending an update when nothing has changed)
4105 // is gradually reduce the threshold to allow a better update to 4097 // is gradually reduce the threshold to allow a better update to
4106 // eventually get sent... should update to within 0.5 degrees in less 4098 // eventually get sent... should update to within 0.5 degrees in less
4107 // than a second. 4099 // than a second.
4108 if (head_rot_chg < THRESHOLD_HEAD_ROT_QDOT + (MAX_HEAD_ROT_QDOT - THRESHOLD_HEAD_ROT_QDOT) * duplicate_count / AGENT_UPDATES_PER_SECOND) 4100 if (head_rot_chg < THRESHOLD_HEAD_ROT_QDOT + (MAX_HEAD_ROT_QDOT - THRESHOLD_HEAD_ROT_QDOT) * duplicate_count / AGENT_UPDATES_PER_SECOND)
4109 { 4101 {
@@ -4136,13 +4128,13 @@ void send_agent_update(BOOL force_send, BOOL send_reliable)
4136// { 4128// {
4137// LL_INFOS("Messaging") << "Sending camera center " << camera_pos_agent << LL_ENDL; 4129// LL_INFOS("Messaging") << "Sending camera center " << camera_pos_agent << LL_ENDL;
4138// } 4130// }
4139 4131
4140 msg->addVector3Fast(_PREHASH_CameraCenter, camera_pos_agent); 4132 msg->addVector3Fast(_PREHASH_CameraCenter, camera_pos_agent);
4141 msg->addVector3Fast(_PREHASH_CameraAtAxis, LLViewerCamera::getInstance()->getAtAxis()); 4133 msg->addVector3Fast(_PREHASH_CameraAtAxis, LLViewerCamera::getInstance()->getAtAxis());
4142 msg->addVector3Fast(_PREHASH_CameraLeftAxis, LLViewerCamera::getInstance()->getLeftAxis()); 4134 msg->addVector3Fast(_PREHASH_CameraLeftAxis, LLViewerCamera::getInstance()->getLeftAxis());
4143 msg->addVector3Fast(_PREHASH_CameraUpAxis, LLViewerCamera::getInstance()->getUpAxis()); 4135 msg->addVector3Fast(_PREHASH_CameraUpAxis, LLViewerCamera::getInstance()->getUpAxis());
4144 msg->addF32Fast(_PREHASH_Far, gAgent.mDrawDistance); 4136 msg->addF32Fast(_PREHASH_Far, gAgent.mDrawDistance);
4145 4137
4146 msg->addU32Fast(_PREHASH_ControlFlags, control_flags); 4138 msg->addU32Fast(_PREHASH_ControlFlags, control_flags);
4147 4139
4148 if (gDebugClicks) 4140 if (gDebugClicks)
@@ -4171,7 +4163,7 @@ void send_agent_update(BOOL force_send, BOOL send_reliable)
4171 4163
4172// LL_DEBUGS("Messaging") << "agent " << avatar_pos_agent << " cam " << camera_pos_agent << LL_ENDL; 4164// LL_DEBUGS("Messaging") << "agent " << avatar_pos_agent << " cam " << camera_pos_agent << LL_ENDL;
4173 4165
4174 // Copy the old data 4166 // Copy the old data
4175 last_head_rot = head_rotation; 4167 last_head_rot = head_rotation;
4176 last_render_state = render_state; 4168 last_render_state = render_state;
4177 last_camera_pos_agent = camera_pos_agent; 4169 last_camera_pos_agent = camera_pos_agent;
@@ -4190,7 +4182,7 @@ void send_agent_update(BOOL force_send, BOOL send_reliable)
4190extern U32 gObjectBits; 4182extern U32 gObjectBits;
4191 4183
4192void process_object_update(LLMessageSystem *mesgsys, void **user_data) 4184void process_object_update(LLMessageSystem *mesgsys, void **user_data)
4193{ 4185{
4194 LLMemType mt(LLMemType::MTYPE_OBJECT); 4186 LLMemType mt(LLMemType::MTYPE_OBJECT);
4195 // Update the data counters 4187 // Update the data counters
4196 if (mesgsys->getReceiveCompressedSize()) 4188 if (mesgsys->getReceiveCompressedSize())
@@ -4396,7 +4388,7 @@ void process_sound_trigger(LLMessageSystem *msg, void **)
4396 4388
4397 // Don't play sounds triggered by someone you muted. 4389 // Don't play sounds triggered by someone you muted.
4398 if (LLMuteList::getInstance()->isMuted(owner_id, LLMute::flagObjectSounds)) return; 4390 if (LLMuteList::getInstance()->isMuted(owner_id, LLMute::flagObjectSounds)) return;
4399 4391
4400 // Don't play sounds from an object you muted 4392 // Don't play sounds from an object you muted
4401 if (LLMuteList::getInstance()->isMuted(object_id)) return; 4393 if (LLMuteList::getInstance()->isMuted(object_id)) return;
4402 4394
@@ -4426,7 +4418,7 @@ void process_sound_trigger(LLMessageSystem *msg, void **)
4426 { 4418 {
4427 return; 4419 return;
4428 }*/ 4420 }*/
4429 4421
4430 gAudiop->triggerSound(sound_id, owner_id, gain, LLAudioEngine::AUDIO_TYPE_SFX, pos_global); 4422 gAudiop->triggerSound(sound_id, owner_id, gain, LLAudioEngine::AUDIO_TYPE_SFX, pos_global);
4431} 4423}
4432 4424
@@ -4450,10 +4442,10 @@ void process_preload_sound(LLMessageSystem *msg, void **user_data)
4450 4442
4451 if (LLMuteList::getInstance()->isMuted(object_id)) return; 4443 if (LLMuteList::getInstance()->isMuted(object_id)) return;
4452 if (LLMuteList::getInstance()->isMuted(owner_id, LLMute::flagObjectSounds)) return; 4444 if (LLMuteList::getInstance()->isMuted(owner_id, LLMute::flagObjectSounds)) return;
4453 4445
4454 LLAudioSource *sourcep = objectp->getAudioSource(owner_id); 4446 LLAudioSource *sourcep = objectp->getAudioSource(owner_id);
4455 if (!sourcep) return; 4447 if (!sourcep) return;
4456 4448
4457 LLAudioData *datap = gAudiop->getAudioData(sound_id); 4449 LLAudioData *datap = gAudiop->getAudioData(sound_id);
4458 4450
4459 // Note that I don't actually do any loading of the 4451 // Note that I don't actually do any loading of the
@@ -4467,7 +4459,7 @@ void process_preload_sound(LLMessageSystem *msg, void **user_data)
4467 { 4459 {
4468 return; 4460 return;
4469 }*/ 4461 }*/
4470 4462
4471 // Add audioData starts a transfer internally. 4463 // Add audioData starts a transfer internally.
4472 sourcep->addAudioData(datap, FALSE); 4464 sourcep->addAudioData(datap, FALSE);
4473} 4465}
@@ -4495,12 +4487,12 @@ void process_attached_sound(LLMessageSystem *msg, void **user_data)
4495 // we don't know about this object, just bail 4487 // we don't know about this object, just bail
4496 return; 4488 return;
4497 } 4489 }
4498 4490
4499 if (LLMuteList::getInstance()->isMuted(object_id)) return; 4491 if (LLMuteList::getInstance()->isMuted(object_id)) return;
4500 4492
4501 if (LLMuteList::getInstance()->isMuted(owner_id, LLMute::flagObjectSounds)) return; 4493 if (LLMuteList::getInstance()->isMuted(owner_id, LLMute::flagObjectSounds)) return;
4502 4494
4503 4495
4504 // Don't play sounds from a region with maturity above current agent maturity 4496 // Don't play sounds from a region with maturity above current agent maturity
4505 // Actually, let's -- MC 4497 // Actually, let's -- MC
4506 /*LLVector3d pos = objectp->getPositionGlobal(); 4498 /*LLVector3d pos = objectp->getPositionGlobal();
@@ -4508,7 +4500,7 @@ void process_attached_sound(LLMessageSystem *msg, void **user_data)
4508 { 4500 {
4509 return; 4501 return;
4510 }*/ 4502 }*/
4511 4503
4512 objectp->setAttachedSound(sound_id, owner_id, gain, flags); 4504 objectp->setAttachedSound(sound_id, owner_id, gain, flags);
4513} 4505}
4514 4506
@@ -4547,7 +4539,7 @@ void process_health_message(LLMessageSystem *mesgsys, void **user_data)
4547 4539
4548 4540
4549void process_sim_stats(LLMessageSystem *msg, void **user_data) 4541void process_sim_stats(LLMessageSystem *msg, void **user_data)
4550{ 4542{
4551 S32 count = msg->getNumberOfBlocks("Stat"); 4543 S32 count = msg->getNumberOfBlocks("Stat");
4552 for (S32 i = 0; i < count; ++i) 4544 for (S32 i = 0; i < count; ++i)
4553 { 4545 {
@@ -4696,7 +4688,7 @@ void process_sim_stats(LLMessageSystem *msg, void **user_data)
4696 BOOL was_flying = gAgent.getFlying(); 4688 BOOL was_flying = gAgent.getFlying();
4697 regionp->setRegionFlags(region_flags); 4689 regionp->setRegionFlags(region_flags);
4698 regionp->setMaxTasks(max_tasks_per_region); 4690 regionp->setMaxTasks(max_tasks_per_region);
4699 // HACK: This makes agents drop from the sky if the region is 4691 // HACK: This makes agents drop from the sky if the region is
4700 // set to no fly while people are still in the sim. 4692 // set to no fly while people are still in the sim.
4701 if (was_flying && regionp->getBlockFly()) 4693 if (was_flying && regionp->getBlockFly())
4702 { 4694 {
@@ -4713,7 +4705,7 @@ void process_avatar_animation(LLMessageSystem *mesgsys, void **user_data)
4713 LLUUID uuid; 4705 LLUUID uuid;
4714 S32 anim_sequence_id; 4706 S32 anim_sequence_id;
4715 LLVOAvatar *avatarp; 4707 LLVOAvatar *avatarp;
4716 4708
4717 mesgsys->getUUIDFast(_PREHASH_Sender, _PREHASH_ID, uuid); 4709 mesgsys->getUUIDFast(_PREHASH_Sender, _PREHASH_ID, uuid);
4718 4710
4719 //clear animation flags 4711 //clear animation flags
@@ -4730,7 +4722,7 @@ void process_avatar_animation(LLMessageSystem *mesgsys, void **user_data)
4730 S32 num_source_blocks = mesgsys->getNumberOfBlocksFast(_PREHASH_AnimationSourceList); 4722 S32 num_source_blocks = mesgsys->getNumberOfBlocksFast(_PREHASH_AnimationSourceList);
4731 4723
4732 avatarp->mSignaledAnimations.clear(); 4724 avatarp->mSignaledAnimations.clear();
4733 4725
4734 if (avatarp->isSelf()) 4726 if (avatarp->isSelf())
4735 { 4727 {
4736 LLUUID object_id; 4728 LLUUID object_id;
@@ -4740,7 +4732,7 @@ void process_avatar_animation(LLMessageSystem *mesgsys, void **user_data)
4740 mesgsys->getUUIDFast(_PREHASH_AnimationList, _PREHASH_AnimID, animation_id, i); 4732 mesgsys->getUUIDFast(_PREHASH_AnimationList, _PREHASH_AnimID, animation_id, i);
4741 mesgsys->getS32Fast(_PREHASH_AnimationList, _PREHASH_AnimSequenceID, anim_sequence_id, i); 4733 mesgsys->getS32Fast(_PREHASH_AnimationList, _PREHASH_AnimSequenceID, anim_sequence_id, i);
4742 4734
4743 LL_DEBUGS("Messaging") << "Animation id " << animation_id 4735 LL_DEBUGS("Messaging") << "Animation id " << animation_id
4744 << " from self using sequence id " << anim_sequence_id << LL_ENDL; 4736 << " from self using sequence id " << anim_sequence_id << LL_ENDL;
4745 4737
4746 avatarp->mSignaledAnimations[animation_id] = anim_sequence_id; 4738 avatarp->mSignaledAnimations[animation_id] = anim_sequence_id;
@@ -4748,7 +4740,7 @@ void process_avatar_animation(LLMessageSystem *mesgsys, void **user_data)
4748 if (i < num_source_blocks) 4740 if (i < num_source_blocks)
4749 { 4741 {
4750 mesgsys->getUUIDFast(_PREHASH_AnimationSourceList, _PREHASH_ObjectID, object_id, i); 4742 mesgsys->getUUIDFast(_PREHASH_AnimationSourceList, _PREHASH_ObjectID, object_id, i);
4751 4743
4752 LLViewerObject* object = gObjectList.findObject(object_id); 4744 LLViewerObject* object = gObjectList.findObject(object_id);
4753 if (object) 4745 if (object)
4754 { 4746 {
@@ -4780,8 +4772,8 @@ void process_avatar_animation(LLMessageSystem *mesgsys, void **user_data)
4780 mesgsys->getUUIDFast(_PREHASH_AnimationList, _PREHASH_AnimID, animation_id, i); 4772 mesgsys->getUUIDFast(_PREHASH_AnimationList, _PREHASH_AnimID, animation_id, i);
4781 mesgsys->getS32Fast(_PREHASH_AnimationList, _PREHASH_AnimSequenceID, anim_sequence_id, i); 4773 mesgsys->getS32Fast(_PREHASH_AnimationList, _PREHASH_AnimSequenceID, anim_sequence_id, i);
4782 avatarp->mSignaledAnimations[animation_id] = anim_sequence_id; 4774 avatarp->mSignaledAnimations[animation_id] = anim_sequence_id;
4783 LL_DEBUGS("Messaging") << "Received animation id " << animation_id 4775 LL_DEBUGS("Messaging") << "Received animation id " << animation_id
4784 << " from " << uuid 4776 << " from " << uuid
4785 << " using sequence id " << anim_sequence_id << LL_ENDL; 4777 << " using sequence id " << anim_sequence_id << LL_ENDL;
4786 } 4778 }
4787 } 4779 }
@@ -4856,7 +4848,7 @@ void process_avatar_sit_response(LLMessageSystem *mesgsys, void **user_data)
4856 { 4848 {
4857 gAgent.setSitCamera(sitObjectID, camera_eye, camera_at); 4849 gAgent.setSitCamera(sitObjectID, camera_eye, camera_at);
4858 } 4850 }
4859 4851
4860 gAgent.mForceMouselook = force_mouselook; 4852 gAgent.mForceMouselook = force_mouselook;
4861 4853
4862 LLViewerObject* object = gObjectList.findObject(sitObjectID); 4854 LLViewerObject* object = gObjectList.findObject(sitObjectID);
@@ -4952,7 +4944,7 @@ void process_set_follow_cam_properties(LLMessageSystem *mesgsys, void **user_dat
4952 LLFollowCamMgr::setFocusThreshold(source_id, value); 4944 LLFollowCamMgr::setFocusThreshold(source_id, value);
4953 break; 4945 break;
4954 case FOLLOWCAM_ACTIVE: 4946 case FOLLOWCAM_ACTIVE:
4955 //if 1, set using followcam,. 4947 //if 1, set using followcam,.
4956 LLFollowCamMgr::setCameraActive(source_id, value != 0.f); 4948 LLFollowCamMgr::setCameraActive(source_id, value != 0.f);
4957 break; 4949 break;
4958 case FOLLOWCAM_POSITION_X: 4950 case FOLLOWCAM_POSITION_X:
@@ -5004,7 +4996,7 @@ void process_set_follow_cam_properties(LLMessageSystem *mesgsys, void **user_dat
5004 LLFollowCamMgr::setFocusOffset(source_id, focus_offset); 4996 LLFollowCamMgr::setFocusOffset(source_id, focus_offset);
5005 } 4997 }
5006} 4998}
5007//end Ventrella 4999//end Ventrella
5008 5000
5009 5001
5010// Culled from newsim lltask.cpp 5002// Culled from newsim lltask.cpp
@@ -5196,7 +5188,7 @@ void process_money_balance_reply( LLMessageSystem* msg, void** )
5196bool handle_special_notification_callback(const LLSD& notification, const LLSD& response) 5188bool handle_special_notification_callback(const LLSD& notification, const LLSD& response)
5197{ 5189{
5198 S32 option = LLNotification::getSelectedOption(notification, response); 5190 S32 option = LLNotification::getSelectedOption(notification, response);
5199 5191
5200 if (0 == option) 5192 if (0 == option)
5201 { 5193 {
5202 // set the preference to the maturity of the region we're calling 5194 // set the preference to the maturity of the region we're calling
@@ -5205,7 +5197,7 @@ bool handle_special_notification_callback(const LLSD& notification, const LLSD&
5205 gAgent.sendMaturityPreferenceToServer(preferredMaturity); 5197 gAgent.sendMaturityPreferenceToServer(preferredMaturity);
5206 5198
5207 } 5199 }
5208 5200
5209 return false; 5201 return false;
5210} 5202}
5211 5203
@@ -5214,10 +5206,10 @@ bool handle_special_notification(std::string notificationID, LLSD& llsdBlock)
5214{ 5206{
5215 int regionAccess = llsdBlock["_region_access"].asInteger(); 5207 int regionAccess = llsdBlock["_region_access"].asInteger();
5216 llsdBlock["REGIONMATURITY"] = LLViewerRegion::accessToString(regionAccess); 5208 llsdBlock["REGIONMATURITY"] = LLViewerRegion::accessToString(regionAccess);
5217 5209
5218 // we're going to throw the LLSD in there in case anyone ever wants to use it 5210 // we're going to throw the LLSD in there in case anyone ever wants to use it
5219 LLNotifications::instance().add(notificationID+"_Notify", llsdBlock); 5211 LLNotifications::instance().add(notificationID+"_Notify", llsdBlock);
5220 5212
5221 if (regionAccess == SIM_ACCESS_MATURE) 5213 if (regionAccess == SIM_ACCESS_MATURE)
5222 { 5214 {
5223 if (gAgent.isTeen()) 5215 if (gAgent.isTeen())
@@ -5266,7 +5258,7 @@ bool attempt_standard_notification(LLMessageSystem* msgsystem)
5266 llwarns << "attempt_standard_notification: Attempted to read notification parameter data into LLSD but failed:" << llsdRaw << llendl; 5258 llwarns << "attempt_standard_notification: Attempted to read notification parameter data into LLSD but failed:" << llsdRaw << llendl;
5267 } 5259 }
5268 } 5260 }
5269 5261
5270 if ( 5262 if (
5271 (notificationID == "RegionEntryAccessBlocked") || 5263 (notificationID == "RegionEntryAccessBlocked") ||
5272 (notificationID == "LandClaimAccessBlocked") || 5264 (notificationID == "LandClaimAccessBlocked") ||
@@ -5277,32 +5269,32 @@ bool attempt_standard_notification(LLMessageSystem* msgsystem)
5277 (Commented so a grep will find the notification strings, since 5269 (Commented so a grep will find the notification strings, since
5278 we construct them on the fly; if you add additional notifications, 5270 we construct them on the fly; if you add additional notifications,
5279 please update the comment.) 5271 please update the comment.)
5280 5272
5281 Could throw any of the following notifications: 5273 Could throw any of the following notifications:
5282 5274
5283 RegionEntryAccessBlocked 5275 RegionEntryAccessBlocked
5284 RegionEntryAccessBlocked_Notify 5276 RegionEntryAccessBlocked_Notify
5285 RegionEntryAccessBlocked_Change 5277 RegionEntryAccessBlocked_Change
5286 RegionEntryAccessBlocked_KB 5278 RegionEntryAccessBlocked_KB
5287 LandClaimAccessBlocked 5279 LandClaimAccessBlocked
5288 LandClaimAccessBlocked_Notify 5280 LandClaimAccessBlocked_Notify
5289 LandClaimAccessBlocked_Change 5281 LandClaimAccessBlocked_Change
5290 LandClaimAccessBlocked_KB 5282 LandClaimAccessBlocked_KB
5291 LandBuyAccessBlocked 5283 LandBuyAccessBlocked
5292 LandBuyAccessBlocked_Notify 5284 LandBuyAccessBlocked_Notify
5293 LandBuyAccessBlocked_Change 5285 LandBuyAccessBlocked_Change
5294 LandBuyAccessBlocked_KB 5286 LandBuyAccessBlocked_KB
5295 5287
5296 -----------------------------------------------------------------------*/ 5288 -----------------------------------------------------------------------*/
5297 if (handle_special_notification(notificationID, llsdBlock)) 5289 if (handle_special_notification(notificationID, llsdBlock))
5298 { 5290 {
5299 return true; 5291 return true;
5300 } 5292 }
5301 } 5293 }
5302 5294
5303 LLNotifications::instance().add(notificationID, llsdBlock); 5295 LLNotifications::instance().add(notificationID, llsdBlock);
5304 return true; 5296 return true;
5305 } 5297 }
5306 return false; 5298 return false;
5307} 5299}
5308 5300
@@ -5312,7 +5304,7 @@ void process_agent_alert_message(LLMessageSystem* msgsystem, void** user_data)
5312 // make sure the cursor is back to the usual default since the 5304 // make sure the cursor is back to the usual default since the
5313 // alert is probably due to some kind of error. 5305 // alert is probably due to some kind of error.
5314 gViewerWindow->getWindow()->resetBusyCount(); 5306 gViewerWindow->getWindow()->resetBusyCount();
5315 5307
5316 if (!attempt_standard_notification(msgsystem)) 5308 if (!attempt_standard_notification(msgsystem))
5317 { 5309 {
5318 BOOL modal = FALSE; 5310 BOOL modal = FALSE;
@@ -5333,7 +5325,7 @@ void process_alert_message(LLMessageSystem *msgsystem, void **user_data)
5333 // make sure the cursor is back to the usual default since the 5325 // make sure the cursor is back to the usual default since the
5334 // alert is probably due to some kind of error. 5326 // alert is probably due to some kind of error.
5335 gViewerWindow->getWindow()->resetBusyCount(); 5327 gViewerWindow->getWindow()->resetBusyCount();
5336 5328
5337 if (!attempt_standard_notification(msgsystem)) 5329 if (!attempt_standard_notification(msgsystem))
5338 { 5330 {
5339 BOOL modal = FALSE; 5331 BOOL modal = FALSE;
@@ -5462,7 +5454,7 @@ void process_mean_collision_alert_message(LLMessageSystem *msgsystem, void **use
5462{ 5454{
5463 if (gAgent.inPrelude()) 5455 if (gAgent.inPrelude())
5464 { 5456 {
5465 // In prelude, bumping is OK. This dialog is rather confusing to 5457 // In prelude, bumping is OK. This dialog is rather confusing to
5466 // newbies, so we don't show it. Drop the packet on the floor. 5458 // newbies, so we don't show it. Drop the packet on the floor.
5467 return; 5459 return;
5468 } 5460 }
@@ -5519,7 +5511,7 @@ void process_frozen_message(LLMessageSystem *msgsystem, void **user_data)
5519 // alert is probably due to some kind of error. 5511 // alert is probably due to some kind of error.
5520 gViewerWindow->getWindow()->resetBusyCount(); 5512 gViewerWindow->getWindow()->resetBusyCount();
5521 BOOL b_frozen; 5513 BOOL b_frozen;
5522 5514
5523 msgsystem->getBOOL("FrozenData", "Data", b_frozen); 5515 msgsystem->getBOOL("FrozenData", "Data", b_frozen);
5524 5516
5525 // TODO: make being frozen change view 5517 // TODO: make being frozen change view
@@ -5538,8 +5530,8 @@ void process_economy_data(LLMessageSystem *msg, void** /*user_data*/)
5538 5530
5539 S32 upload_cost = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload(); 5531 S32 upload_cost = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload();
5540 5532
5541 LL_INFOS_ONCE("Messaging") << "EconomyData message arrived; upload cost is " 5533 LL_INFOS_ONCE("Messaging") << "EconomyData message arrived; upload cost is "
5542 << gHippoGridManager->getConnectedGrid()->getCurrencySymbol() 5534 << gHippoGridManager->getConnectedGrid()->getCurrencySymbol()
5543 << upload_cost << LL_ENDL; 5535 << upload_cost << LL_ENDL;
5544 5536
5545 LLFloaterImagePreview::setUploadAmount(upload_cost); 5537 LLFloaterImagePreview::setUploadAmount(upload_cost);
@@ -5562,13 +5554,13 @@ void notify_cautioned_script_question(const LLSD& notification, const LLSD& resp
5562 { 5554 {
5563 // check to see if the person we are asking 5555 // check to see if the person we are asking
5564 5556
5565 // "'[OBJECTNAME]', an object owned by '[OWNERNAME]', 5557 // "'[OBJECTNAME]', an object owned by '[OWNERNAME]',
5566 // located in [REGIONNAME] at [REGIONPOS], 5558 // located in [REGIONNAME] at [REGIONPOS],
5567 // has been <granted|denied> permission to: [PERMISSIONS]." 5559 // has been <granted|denied> permission to: [PERMISSIONS]."
5568 5560
5569 LLUIString notice(LLFloaterChat::getInstance()->getString(granted ? "ScriptQuestionCautionChatGranted" : "ScriptQuestionCautionChatDenied")); 5561 LLUIString notice(LLFloaterChat::getInstance()->getString(granted ? "ScriptQuestionCautionChatGranted" : "ScriptQuestionCautionChatDenied"));
5570 5562
5571 // always include the object name and owner name 5563 // always include the object name and owner name
5572 notice.setArg("[OBJECTNAME]", notification["payload"]["object_name"].asString()); 5564 notice.setArg("[OBJECTNAME]", notification["payload"]["object_name"].asString());
5573 notice.setArg("[OWNERNAME]", notification["payload"]["owner_name"].asString()); 5565 notice.setArg("[OWNERNAME]", notification["payload"]["owner_name"].asString());
5574 5566
@@ -5580,7 +5572,7 @@ void notify_cautioned_script_question(const LLSD& notification, const LLSD& resp
5580 { 5572 {
5581 // found the viewerobject, get it's position in its region 5573 // found the viewerobject, get it's position in its region
5582 LLVector3 objpos(viewobj->getPosition()); 5574 LLVector3 objpos(viewobj->getPosition());
5583 5575
5584 // try to lookup the name of the region the object is in 5576 // try to lookup the name of the region the object is in
5585 LLViewerRegion* viewregion = viewobj->getRegion(); 5577 LLViewerRegion* viewregion = viewobj->getRegion();
5586 if (viewregion) 5578 if (viewregion)
@@ -5607,7 +5599,7 @@ void notify_cautioned_script_question(const LLSD& notification, const LLSD& resp
5607 notice.setArg("[REGIONPOS]", "(unknown position)"); 5599 notice.setArg("[REGIONPOS]", "(unknown position)");
5608 } 5600 }
5609 5601
5610 // check each permission that was requested, and list each 5602 // check each permission that was requested, and list each
5611 // permission that has been flagged as a caution permission 5603 // permission that has been flagged as a caution permission
5612 BOOL caution = FALSE; 5604 BOOL caution = FALSE;
5613 S32 count = 0; 5605 S32 count = 0;
@@ -5659,7 +5651,7 @@ bool script_question_cb(const LLSD& notification, const LLSD& response)
5659 { 5651 {
5660 new_questions = 0; 5652 new_questions = 0;
5661 allowed = FALSE; 5653 allowed = FALSE;
5662 } 5654 }
5663 5655
5664 LLUUID task_id = notification["payload"]["task_id"].asUUID(); 5656 LLUUID task_id = notification["payload"]["task_id"].asUUID();
5665 LLUUID item_id = notification["payload"]["item_id"].asUUID(); 5657 LLUUID item_id = notification["payload"]["item_id"].asUUID();
@@ -5751,10 +5743,10 @@ void process_script_question(LLMessageSystem *msg, void **user_data)
5751 { 5743 {
5752 throttle_name = taskid.getString(); 5744 throttle_name = taskid.getString();
5753 } 5745 }
5754 5746
5755 // don't display permission requests if this object is muted 5747 // don't display permission requests if this object is muted
5756 if (LLMuteList::getInstance()->isMuted(taskid)) return; 5748 if (LLMuteList::getInstance()->isMuted(taskid)) return;
5757 5749
5758 // throttle excessive requests from any specific user's scripts 5750 // throttle excessive requests from any specific user's scripts
5759 typedef LLKeyThrottle<std::string> LLStringThrottle; 5751 typedef LLKeyThrottle<std::string> LLStringThrottle;
5760 static LLStringThrottle question_throttle( LLREQUEST_PERMISSION_THROTTLE_LIMIT, LLREQUEST_PERMISSION_THROTTLE_INTERVAL ); 5752 static LLStringThrottle question_throttle( LLREQUEST_PERMISSION_THROTTLE_LIMIT, LLREQUEST_PERMISSION_THROTTLE_INTERVAL );
@@ -5791,7 +5783,7 @@ void process_script_question(LLMessageSystem *msg, void **user_data)
5791 { 5783 {
5792 LLStringUtil::format_map_t args; 5784 LLStringUtil::format_map_t args;
5793 args["[CURRENCY]"] = gHippoGridManager->getConnectedGrid()->getCurrencySymbol(); 5785 args["[CURRENCY]"] = gHippoGridManager->getConnectedGrid()->getCurrencySymbol();
5794 5786
5795 count++; 5787 count++;
5796 script_question += " " + LLFloaterChat::getInstance()->getString(SCRIPT_QUESTIONS[i], args) + "\n"; 5788 script_question += " " + LLFloaterChat::getInstance()->getString(SCRIPT_QUESTIONS[i], args) + "\n";
5797 5789
@@ -6144,7 +6136,7 @@ void send_group_notice(const LLUUID& group_id,
6144 { 6136 {
6145 bucket_to_send = (U8*) EMPTY_BINARY_BUCKET; 6137 bucket_to_send = (U8*) EMPTY_BINARY_BUCKET;
6146 } 6138 }
6147 6139
6148 6140
6149 send_improved_im( 6141 send_improved_im(
6150 group_id, 6142 group_id,
@@ -6209,7 +6201,7 @@ void handle_lure(const LLUUID& invitee)
6209} 6201}
6210 6202
6211// Prompt for a message to the invited user. 6203// Prompt for a message to the invited user.
6212void handle_lure(LLDynamicArray<LLUUID>& ids) 6204void handle_lure(LLDynamicArray<LLUUID>& ids)
6213{ 6205{
6214 LLSD edit_args; 6206 LLSD edit_args;
6215// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-04 (RLVa-1.0.0a) 6207// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-04 (RLVa-1.0.0a)
@@ -6254,7 +6246,7 @@ void send_improved_im(const LLUUID& to_id,
6254 U8 offline, 6246 U8 offline,
6255 EInstantMessage dialog, 6247 EInstantMessage dialog,
6256 const LLUUID& id, 6248 const LLUUID& id,
6257 U32 timestamp, 6249 U32 timestamp,
6258 const U8* binary_bucket, 6250 const U8* binary_bucket,
6259 S32 binary_bucket_size) 6251 S32 binary_bucket_size)
6260{ 6252{
@@ -6313,7 +6305,7 @@ void process_user_info_reply(LLMessageSystem* msg, void**)
6313 LL_WARNS("Messaging") << "process_user_info_reply - " 6305 LL_WARNS("Messaging") << "process_user_info_reply - "
6314 << "wrong agent id." << LL_ENDL; 6306 << "wrong agent id." << LL_ENDL;
6315 } 6307 }
6316 6308
6317 BOOL im_via_email; 6309 BOOL im_via_email;
6318 msg->getBOOLFast(_PREHASH_UserData, _PREHASH_IMViaEMail, im_via_email); 6310 msg->getBOOLFast(_PREHASH_UserData, _PREHASH_IMViaEMail, im_via_email);
6319 std::string email; 6311 std::string email;
@@ -6367,7 +6359,7 @@ void process_script_dialog(LLMessageSystem* msg, void**)
6367 6359
6368 LLSD payload; 6360 LLSD payload;
6369 6361
6370 std::string message; 6362 std::string message;
6371 std::string first_name; 6363 std::string first_name;
6372 std::string last_name; 6364 std::string last_name;
6373 std::string title; 6365 std::string title;
@@ -6387,7 +6379,7 @@ void process_script_dialog(LLMessageSystem* msg, void**)
6387 { 6379 {
6388 std::vector<LLMute> mutes = LLMuteList::getInstance()->getMutes(); 6380 std::vector<LLMute> mutes = LLMuteList::getInstance()->getMutes();
6389 for (U32 i = 0; i < mutes.size(); i++) 6381 for (U32 i = 0; i < mutes.size(); i++)
6390 { 6382 {
6391 //this is almost like saying (mutes[i].mType != LLMute::Object), but more verbose ... -Kaku 6383 //this is almost like saying (mutes[i].mType != LLMute::Object), but more verbose ... -Kaku
6392 if ( 6384 if (
6393 ((mutes[i].mType == LLMute::AGENT) 6385 ((mutes[i].mType == LLMute::AGENT)
@@ -6650,7 +6642,7 @@ void process_script_teleport_request(LLMessageSystem* msg, void**)
6650 // remove above two lines and replace with below line 6642 // remove above two lines and replace with below line
6651 // to re-enable parcel browser for llMapDestination() 6643 // to re-enable parcel browser for llMapDestination()
6652 // LLURLDispatcher::dispatch(LLURLDispatcher::buildSLURL(sim_name, (S32)pos.mV[VX], (S32)pos.mV[VY], (S32)pos.mV[VZ]), FALSE); 6644 // LLURLDispatcher::dispatch(LLURLDispatcher::buildSLURL(sim_name, (S32)pos.mV[VX], (S32)pos.mV[VY], (S32)pos.mV[VZ]), FALSE);
6653 6645
6654} 6646}
6655 6647
6656void process_covenant_reply(LLMessageSystem* msg, void**) 6648void process_covenant_reply(LLMessageSystem* msg, void**)
@@ -6683,7 +6675,7 @@ void process_covenant_reply(LLMessageSystem* msg, void**)
6683 LLFloaterBuyLand::updateLastModified(last_modified); 6675 LLFloaterBuyLand::updateLastModified(last_modified);
6684 6676
6685 gCacheName->getName(estate_owner_id, callbackCacheEstateOwnerName); 6677 gCacheName->getName(estate_owner_id, callbackCacheEstateOwnerName);
6686 6678
6687 // load the actual covenant asset data 6679 // load the actual covenant asset data
6688 const BOOL high_priority = TRUE; 6680 const BOOL high_priority = TRUE;
6689 if (covenant_id.notNull()) 6681 if (covenant_id.notNull())
@@ -6721,7 +6713,7 @@ void callbackCacheEstateOwnerName(const LLUUID& id,
6721 BOOL is_group, void*) 6713 BOOL is_group, void*)
6722{ 6714{
6723 std::string name; 6715 std::string name;
6724 6716
6725 if (id.isNull()) 6717 if (id.isNull())
6726 { 6718 {
6727 name = "(none)"; 6719 name = "(none)";
@@ -6745,9 +6737,9 @@ void onCovenantLoadComplete(LLVFS *vfs,
6745 if(0 == status) 6737 if(0 == status)
6746 { 6738 {
6747 LLVFile file(vfs, asset_uuid, type, LLVFile::READ); 6739 LLVFile file(vfs, asset_uuid, type, LLVFile::READ);
6748 6740
6749 S32 file_length = file.getSize(); 6741 S32 file_length = file.getSize();
6750 6742
6751 char* buffer = new char[file_length+1]; 6743 char* buffer = new char[file_length+1];
6752 if (buffer == NULL) 6744 if (buffer == NULL)
6753 { 6745 {
@@ -6756,10 +6748,10 @@ void onCovenantLoadComplete(LLVFS *vfs,
6756 } 6748 }
6757 6749
6758 file.read((U8*)buffer, file_length); /* Flawfinder: ignore */ 6750 file.read((U8*)buffer, file_length); /* Flawfinder: ignore */
6759 6751
6760 // put a EOS at the end 6752 // put a EOS at the end
6761 buffer[file_length] = 0; 6753 buffer[file_length] = 0;
6762 6754
6763 if( (file_length > 19) && !strncmp( buffer, "Linden text version", 19 ) ) 6755 if( (file_length > 19) && !strncmp( buffer, "Linden text version", 19 ) )
6764 { 6756 {
6765 LLViewerTextEditor* editor = 6757 LLViewerTextEditor* editor =
@@ -6788,7 +6780,7 @@ void onCovenantLoadComplete(LLVFS *vfs,
6788 else 6780 else
6789 { 6781 {
6790 LLViewerStats::getInstance()->incStat( LLViewerStats::ST_DOWNLOAD_FAILED ); 6782 LLViewerStats::getInstance()->incStat( LLViewerStats::ST_DOWNLOAD_FAILED );
6791 6783
6792 if( LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE == status || 6784 if( LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE == status ||
6793 LL_ERR_FILE_EMPTY == status) 6785 LL_ERR_FILE_EMPTY == status)
6794 { 6786 {
@@ -6802,7 +6794,7 @@ void onCovenantLoadComplete(LLVFS *vfs,
6802 { 6794 {
6803 covenant_text = "Unable to load estate covenant at this time."; 6795 covenant_text = "Unable to load estate covenant at this time.";
6804 } 6796 }
6805 6797
6806 LL_WARNS("Messaging") << "Problem loading notecard: " << status << LL_ENDL; 6798 LL_WARNS("Messaging") << "Problem loading notecard: " << status << LL_ENDL;
6807 } 6799 }
6808 LLPanelEstateCovenant::updateCovenantText(covenant_text, asset_uuid); 6800 LLPanelEstateCovenant::updateCovenantText(covenant_text, asset_uuid);
@@ -6820,7 +6812,7 @@ void process_feature_disabled_message(LLMessageSystem* msg, void**)
6820 msg->getStringFast(_PREHASH_FailureInfo,_PREHASH_ErrorMessage, messageText,0); 6812 msg->getStringFast(_PREHASH_FailureInfo,_PREHASH_ErrorMessage, messageText,0);
6821 msg->getUUIDFast(_PREHASH_FailureInfo,_PREHASH_AgentID,agentID); 6813 msg->getUUIDFast(_PREHASH_FailureInfo,_PREHASH_AgentID,agentID);
6822 msg->getUUIDFast(_PREHASH_FailureInfo,_PREHASH_TransactionID,transactionID); 6814 msg->getUUIDFast(_PREHASH_FailureInfo,_PREHASH_TransactionID,transactionID);
6823 6815
6824 LL_WARNS("Messaging") << "Blacklisted Feature Response:" << messageText << LL_ENDL; 6816 LL_WARNS("Messaging") << "Blacklisted Feature Response:" << messageText << LL_ENDL;
6825} 6817}
6826 6818