summaryrefslogtreecommitdiff
path: root/indra/newview/llavataractions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llavataractions.cpp')
-rw-r--r--indra/newview/llavataractions.cpp32
1 files changed, 31 insertions, 1 deletions
diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp
index 7eed2e7b9a..e6666c7f83 100644
--- a/indra/newview/llavataractions.cpp
+++ b/indra/newview/llavataractions.cpp
@@ -50,6 +50,7 @@
#include "llfloatergroups.h"
#include "llfloaterreg.h"
#include "llfloaterpay.h"
+#include "llfloaterworldmap.h"
#include "llinventorymodel.h" // for gInventory.findCategoryUUIDForType
#include "llimview.h" // for gIMMgr
#include "llmutelist.h"
@@ -181,7 +182,12 @@ void LLAvatarActions::startIM(const LLUUID& id)
return;
std::string name;
- gCacheName->getFullName(id, name);
+ if (!gCacheName->getFullName(id, name))
+ {
+ gCacheName->get(id, FALSE, boost::bind(&LLAvatarActions::startIM, id));
+ return;
+ }
+
LLUUID session_id = gIMMgr->addSession(name, IM_NOTHING_SPECIAL, id);
if (session_id != LLUUID::null)
{
@@ -312,6 +318,20 @@ void LLAvatarActions::showProfile(const LLUUID& id)
}
// static
+void LLAvatarActions::showOnMap(const LLUUID& id)
+{
+ std::string name;
+ if (!gCacheName->getFullName(id, name))
+ {
+ gCacheName->get(id, FALSE, boost::bind(&LLAvatarActions::showOnMap, id));
+ return;
+ }
+
+ gFloaterWorldMap->trackAvatar(id, name);
+ LLFloaterReg::showInstance("world_map");
+}
+
+// static
void LLAvatarActions::pay(const LLUUID& id)
{
LLNotification::Params params("BusyModePay");
@@ -612,3 +632,13 @@ bool LLAvatarActions::isBlocked(const LLUUID& id)
gCacheName->getFullName(id, name);
return LLMuteList::getInstance()->isMuted(id, name);
}
+
+// static
+bool LLAvatarActions::canBlock(const LLUUID& id)
+{
+ std::string firstname, lastname;
+ gCacheName->getName(id, firstname, lastname);
+ bool is_linden = !LLStringUtil::compareStrings(lastname, "Linden");
+ bool is_self = id == gAgentID;
+ return !is_self && !is_linden;
+}