Client UUID thing for trying to identify new clients

Signed-off-by: Beeks <HgDelirium@gmail.com>
This commit is contained in:
Beeks
2010-09-10 20:03:09 -04:00
parent 74669be31a
commit c86769d657
2 changed files with 20 additions and 2 deletions

View File

@@ -247,7 +247,6 @@
#include "llao.h"
#include "llfloatervfs.h"
#include "llfloatervfsexplorer.h"
#include "llfloaterexportregion.h"
// </edit>
#include "scriptcounter.h"
@@ -2947,6 +2946,21 @@ class LLAvatarCopyUUID : public view_listener_t
}
};
class LLAvatarClientUUID : public view_listener_t
{
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
{
LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() );
if(!avatar) return true;
std::string clientID;
LLColor4 color;
avatar->getClientInfo(clientID, color, false);
gViewerWindow->mWindow->copyTextToClipboard(utf8str_to_wstring(clientID));
return true;
}
};
class LLAvatarEnableFreezeEject : public view_listener_t
{
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
@@ -9789,6 +9803,7 @@ void initialize_menus()
addMenu(new LLAvatarEnableAddFriend(), "Avatar.EnableAddFriend");
addMenu(new LLAvatarEnableFreezeEject(), "Avatar.EnableFreezeEject");
addMenu(new LLAvatarCopyUUID(), "Avatar.CopyUUID");
addMenu(new LLAvatarClientUUID(), "Avatar.ClientID");
// Object pie menu
addMenu(new LLObjectOpen(), "Object.Open");

View File

@@ -42,7 +42,10 @@
<on_visible function="Object.VisibleScriptCount" />
</menu_item_call>
<menu_item_call enabled="true" label="Copy UUID" mouse_opaque="true" name="CopyUUID">
<on_click function="Avatar.CopyUUID" />
<on_click function="Avatar.CopyUUID" />
</menu_item_call>
<menu_item_call enabled="false" hidden="false" label="Client ID" mouse_opaque="true" name="ClientID">
<on_click function="Avatar.ClientID" />
</menu_item_call>
<menu_item_call enabled="true" label="Derender" mouse_opaque="true" name="Derender">
<on_click function="Object.DERENDER" />