Added more information to inspect and fixed some bugs in the eavesdropping detection
This commit is contained in:
@@ -512,15 +512,23 @@ void LLPanelActiveSpeakers::refreshSpeakers()
|
||||
// <edit>
|
||||
if(!mShowTextChatters && !(speakerp->mStatus == LLSpeaker::STATUS_NOT_IN_CHANNEL) && speakerp->mID != gAgent.getID())
|
||||
{
|
||||
// let us check to see if they are actually in the sim
|
||||
LLViewerRegion* regionp = gAgent.getRegion();
|
||||
if(regionp)
|
||||
bool found = false;
|
||||
for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin();
|
||||
iter != LLWorld::getInstance()->getRegionList().end(); ++iter)
|
||||
{
|
||||
if(regionp->mMapAvatarIDs.find(speakerp->mID) == -1)
|
||||
LLViewerRegion* regionp = *iter;
|
||||
// let us check to see if they are actually in the sim
|
||||
if(regionp)
|
||||
{
|
||||
name_cell->setColor(LLColor4::red);
|
||||
if(regionp->mMapAvatarIDs.find(speakerp->mID) != -1)
|
||||
{
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!found)
|
||||
name_cell->setColor(LLColor4::red);
|
||||
}
|
||||
// </edit>
|
||||
|
||||
|
||||
@@ -212,7 +212,7 @@ void LLFloaterInspect::refresh()
|
||||
{
|
||||
LLSelectNode* obj = *iter;
|
||||
LLSD row;
|
||||
std::string owner_name, creator_name, time;
|
||||
std::string owner_name, creator_name, time, last_owner_name;
|
||||
|
||||
if (obj->mCreationDate == 0)
|
||||
{ // Don't have valid information from the server, so skip this one
|
||||
@@ -223,6 +223,9 @@ void LLFloaterInspect::refresh()
|
||||
timeToFormattedString(timestamp, gSavedSettings.getString("TimestampFormat"), time);
|
||||
gCacheName->getFullName(obj->mPermissions->getOwner(), owner_name);
|
||||
gCacheName->getFullName(obj->mPermissions->getCreator(), creator_name);
|
||||
// <edit>
|
||||
gCacheName->getFullName(obj->mPermissions->getLastOwner(), last_owner_name);
|
||||
// </edit>
|
||||
row["id"] = obj->getObject()->getID();
|
||||
row["columns"][0]["column"] = "object_name";
|
||||
row["columns"][0]["type"] = "text";
|
||||
@@ -236,15 +239,59 @@ void LLFloaterInspect::refresh()
|
||||
{
|
||||
row["columns"][0]["value"] = obj->mName;
|
||||
}
|
||||
row["columns"][1]["column"] = "owner_name";
|
||||
row["columns"][1]["type"] = "text";
|
||||
row["columns"][1]["value"] = owner_name;
|
||||
row["columns"][2]["column"] = "creator_name";
|
||||
row["columns"][2]["type"] = "text";
|
||||
row["columns"][2]["value"] = creator_name;
|
||||
row["columns"][3]["column"] = "creation_date";
|
||||
row["columns"][3]["type"] = "text";
|
||||
row["columns"][3]["value"] = time;
|
||||
// <edit>
|
||||
int i = 1;
|
||||
row["columns"][i]["column"] = "owner_name";
|
||||
row["columns"][i]["type"] = "text";
|
||||
row["columns"][i]["value"] = owner_name;
|
||||
++i;
|
||||
row["columns"][i]["column"] = "last_owner_name";
|
||||
row["columns"][i]["type"] = "text";
|
||||
row["columns"][i]["value"] = last_owner_name;
|
||||
++i;
|
||||
row["columns"][i]["column"] = "creator_name";
|
||||
row["columns"][i]["type"] = "text";
|
||||
row["columns"][i]["value"] = creator_name;
|
||||
++i;
|
||||
row["columns"][i]["column"] = "face_num";
|
||||
row["columns"][i]["type"] = "text";
|
||||
row["columns"][i]["value"] = llformat("%d",obj->getObject()->getNumFaces());
|
||||
++i;
|
||||
row["columns"][i]["column"] = "vertex_num";
|
||||
row["columns"][i]["type"] = "text";
|
||||
row["columns"][i]["value"] = llformat("%d",obj->getObject()->getNumVertices());
|
||||
++i;
|
||||
// inventory silliness
|
||||
S32 scripts,total_inv;
|
||||
std::map<LLUUID,std::pair<S32,S32> >::iterator itr = mInventoryNums.find(obj->getObject()->getID());
|
||||
if(itr != mInventoryNums.end())
|
||||
{
|
||||
scripts = itr->second.first;
|
||||
total_inv = itr->second.second;
|
||||
}
|
||||
else
|
||||
{
|
||||
scripts = 0;
|
||||
total_inv = 0;
|
||||
if(std::find(mQueue.begin(),mQueue.end(),obj->getObject()->getID()) == mQueue.end())
|
||||
{
|
||||
mQueue.push_back(obj->getObject()->getID());
|
||||
registerVOInventoryListener(obj->getObject(),NULL);
|
||||
requestVOInventory();
|
||||
}
|
||||
}
|
||||
row["columns"][i]["column"] = "script_num";
|
||||
row["columns"][i]["type"] = "text";
|
||||
row["columns"][i]["value"] = llformat("%d",scripts);
|
||||
++i;
|
||||
row["columns"][i]["column"] = "inv_num";
|
||||
row["columns"][i]["type"] = "text";
|
||||
row["columns"][i]["value"] = llformat("%d",total_inv);
|
||||
++i;
|
||||
row["columns"][i]["column"] = "creation_date";
|
||||
row["columns"][i]["type"] = "text";
|
||||
row["columns"][i]["value"] = time;
|
||||
// </edit>
|
||||
mObjectList->addElement(row, ADD_TOP);
|
||||
}
|
||||
if(selected_index > -1 && mObjectList->getItemIndex(selected_uuid) == selected_index)
|
||||
@@ -258,7 +305,31 @@ void LLFloaterInspect::refresh()
|
||||
onSelectObject(this, NULL);
|
||||
mObjectList->setScrollPos(pos);
|
||||
}
|
||||
|
||||
// <edit>
|
||||
void LLFloaterInspect::inventoryChanged(LLViewerObject* viewer_object,
|
||||
InventoryObjectList* inv,
|
||||
S32,
|
||||
void* q_id)
|
||||
{
|
||||
S32 scripts = 0;
|
||||
std::vector<LLUUID>::iterator iter = std::find(mQueue.begin(),mQueue.end(),viewer_object->getID());
|
||||
if (viewer_object && inv && iter != mQueue.end() )
|
||||
{
|
||||
InventoryObjectList::const_iterator it = inv->begin();
|
||||
InventoryObjectList::const_iterator end = inv->end();
|
||||
for ( ; it != end; ++it)
|
||||
{
|
||||
if((*it)->getType() == LLAssetType::AT_LSL_TEXT)
|
||||
{
|
||||
scripts++;
|
||||
}
|
||||
}
|
||||
mInventoryNums[viewer_object->getID()] = std::make_pair(scripts,inv->size());
|
||||
mQueue.erase(iter);
|
||||
mDirty = TRUE;
|
||||
}
|
||||
}
|
||||
// </edit>
|
||||
void LLFloaterInspect::onFocusReceived()
|
||||
{
|
||||
LLToolMgr::getInstance()->setTransientTool(LLToolCompInspect::getInstance());
|
||||
@@ -269,6 +340,9 @@ void LLFloaterInspect::dirty()
|
||||
{
|
||||
if(sInstance)
|
||||
{
|
||||
// <edit>
|
||||
sInstance->mInventoryNums.clear();
|
||||
sInstance->mQueue.clear();
|
||||
sInstance->setDirty();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,13 +36,14 @@
|
||||
#define LL_LLFLOATERINSPECT_H
|
||||
|
||||
#include "llfloater.h"
|
||||
#include "llvoinventorylistener.h"
|
||||
|
||||
//class LLTool;
|
||||
class LLObjectSelection;
|
||||
class LLScrollListCtrl;
|
||||
class LLUICtrl;
|
||||
|
||||
class LLFloaterInspect : public LLFloater
|
||||
class LLFloaterInspect : public LLFloater, public LLVOInventoryListener
|
||||
{
|
||||
public:
|
||||
virtual ~LLFloaterInspect(void);
|
||||
@@ -63,12 +64,20 @@ protected:
|
||||
LLFloaterInspect();
|
||||
void setDirty() { mDirty = TRUE; }
|
||||
bool mDirty;
|
||||
// <edit>
|
||||
/*virtual*/ void inventoryChanged(LLViewerObject* obj,
|
||||
InventoryObjectList* inv,
|
||||
S32 serial_num,
|
||||
void* queue);
|
||||
|
||||
private:
|
||||
// static data
|
||||
static LLFloaterInspect* sInstance;
|
||||
|
||||
LLSafeHandle<LLObjectSelection> mObjectSelection;
|
||||
// <edit>
|
||||
std::map<LLUUID,std::pair<S32,S32> > mInventoryNums; //<scripts,total>
|
||||
std::vector<LLUUID> mQueue;
|
||||
};
|
||||
|
||||
#endif //LL_LLFLOATERINSPECT_H
|
||||
|
||||
@@ -75,6 +75,10 @@
|
||||
// for MD5 hash
|
||||
#include "llmd5.h"
|
||||
|
||||
// <edit>
|
||||
#include "llworld.h"
|
||||
// </edit>
|
||||
|
||||
#define USE_SESSION_GROUPS 0
|
||||
|
||||
static bool sConnectingToAgni = false;
|
||||
@@ -4903,16 +4907,24 @@ LLVoiceClient::participantState *LLVoiceClient::sessionState::addParticipant(con
|
||||
// <edit>
|
||||
if(nameFromsipURI(uri) != gVoiceClient->mAccountName)
|
||||
{
|
||||
// let us check to see if they are actually in the sim
|
||||
LLViewerRegion* regionp = gAgent.getRegion();
|
||||
if(regionp)
|
||||
bool found = true;
|
||||
for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin();
|
||||
iter != LLWorld::getInstance()->getRegionList().end(); ++iter)
|
||||
{
|
||||
if(regionp->mMapAvatarIDs.find(id) == -1)
|
||||
LLViewerRegion* regionp = *iter;
|
||||
// let us check to see if they are actually in the sim
|
||||
if(regionp)
|
||||
{
|
||||
// They are not in my list of people in my sim, they must be a spy.
|
||||
gCacheName->getName(id, onAvatarNameLookup, NULL);
|
||||
if(regionp->mMapAvatarIDs.find(id) != -1)
|
||||
{
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!found)
|
||||
// They are not in my list of people in my sims, they must be a spy.
|
||||
gCacheName->getName(id, onAvatarNameLookup, NULL);
|
||||
}
|
||||
// </edit>
|
||||
|
||||
|
||||
@@ -9,7 +9,12 @@
|
||||
top="-20">
|
||||
<column dynamicwidth="true" label="Object Name" name="object_name" />
|
||||
<column dynamicwidth="true" label="Owner Name" name="owner_name" />
|
||||
<column dynamicwidth="true" label="Last Owner Name" name="last_owner_name" />
|
||||
<column dynamicwidth="true" label="Creator Name" name="creator_name" />
|
||||
<column label="Faces" name="face_num" width="35" />
|
||||
<column label="Vertices" name="vertex_num" width="35" />
|
||||
<column label="Scripts" name="script_num" width="35" />
|
||||
<column label="Inv Total" name="inv_num" width="35" />
|
||||
<column label="Creation Date" name="creation_date" width="150" />
|
||||
</scroll_list>
|
||||
<button bottom="5" follows="left|bottom" font="SansSerif" halign="center" height="20"
|
||||
|
||||
Reference in New Issue
Block a user