diff --git a/indra/llui/fsregistrarutils.h b/indra/llui/fsregistrarutils.h
index 3fafd77d38..c6474ff24d 100644
--- a/indra/llui/fsregistrarutils.h
+++ b/indra/llui/fsregistrarutils.h
@@ -40,7 +40,10 @@ enum EFSRegistrarFunctionActionType
FS_RGSTR_ACT_SHOW_PROFILE,
FS_RGSTR_ACT_TRACK_AVATAR,
FS_RGSTR_ACT_TELEPORT_TO,
- FS_RGSTR_ACT_REQUEST_TELEPORT
+ FS_RGSTR_ACT_REQUEST_TELEPORT,
+ FS_RGSTR_CHK_AVATAR_BLOCKED,
+ FS_RGSTR_CHK_IS_SELF,
+ FS_RGSTR_CHK_IS_NOT_SELF
};
class FSRegistrarUtils
diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp
index d45591c838..b2a4b1f9d9 100755
--- a/indra/llui/llscrolllistctrl.cpp
+++ b/indra/llui/llscrolllistctrl.cpp
@@ -1967,6 +1967,7 @@ BOOL LLScrollListCtrl::handleRightMouseDown(S32 x, S32 y, MASK mask)
registrar.add("FS.RequestTeleport", boost::bind(&LLUrlAction::executeSLURL, "secondlife:///app/firestorm/" + id + "/requestteleport"));
registrar.add("FS.TrackAvatar", boost::bind(&LLUrlAction::executeSLURL, "secondlife:///app/firestorm/" + id + "/track"));
registrar.add("FS.AddToContactSet", boost::bind(&LLUrlAction::executeSLURL, "secondlife:///app/firestorm/" + id + "/addtocontactset")); // [FS:CR]
+ registrar.add("FS.BlockAvatar", boost::bind(&LLUrlAction::executeSLURL, "secondlife:///app/firestorm/" + id + "/blockavatar"));
// Additional convenience options
// Add enable checks for menu items
@@ -1980,6 +1981,8 @@ BOOL LLScrollListCtrl::handleRightMouseDown(S32 x, S32 y, MASK mask)
enable_registrar.add("FS.EnableTrackAvatar", boost::bind(&FSRegistrarUtils::checkIsEnabled, gFSRegistrarUtils, uuid, FS_RGSTR_ACT_TRACK_AVATAR));
enable_registrar.add("FS.EnableTeleportToTarget", boost::bind(&FSRegistrarUtils::checkIsEnabled, gFSRegistrarUtils, uuid, FS_RGSTR_ACT_TELEPORT_TO));
enable_registrar.add("FS.EnableRequestTeleport", boost::bind(&FSRegistrarUtils::checkIsEnabled, gFSRegistrarUtils, uuid, FS_RGSTR_ACT_REQUEST_TELEPORT));
+ enable_registrar.add("FS.CheckIsAgentBlocked", boost::bind(&FSRegistrarUtils::checkIsEnabled, gFSRegistrarUtils, uuid, FS_RGSTR_CHK_AVATAR_BLOCKED));
+ enable_registrar.add("FS.EnableBlockAvatar", boost::bind(&FSRegistrarUtils::checkIsEnabled, gFSRegistrarUtils, uuid, FS_RGSTR_CHK_IS_NOT_SELF));
//
// create the context menu from the XUI file and display it
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp
index e5bd2beecc..7c27f63fd7 100755
--- a/indra/llui/lltextbase.cpp
+++ b/indra/llui/lltextbase.cpp
@@ -2128,6 +2128,7 @@ void LLTextBase::createUrlContextMenu(S32 x, S32 y, const std::string &in_url)
registrar.add("FS.RequestTeleport", boost::bind(&LLUrlAction::executeSLURL, "secondlife:///app/firestorm/" + target_id_str + "/requestteleport"));
registrar.add("FS.TrackAvatar", boost::bind(&LLUrlAction::executeSLURL, "secondlife:///app/firestorm/" + target_id_str + "/track"));
registrar.add("FS.AddToContactSet", boost::bind(&LLUrlAction::executeSLURL, "secondlife:///app/firestorm/" + target_id_str + "/addtocontactset")); // [FS:CR]
+ registrar.add("FS.BlockAvatar", boost::bind(&LLUrlAction::executeSLURL, "secondlife:///app/firestorm/" + target_id_str + "/blockavatar"));
//
// Add enable checks for menu items
@@ -2142,6 +2143,8 @@ void LLTextBase::createUrlContextMenu(S32 x, S32 y, const std::string &in_url)
enable_registrar.add("FS.EnableTrackAvatar", boost::bind(&FSRegistrarUtils::checkIsEnabled, gFSRegistrarUtils, target_id, FS_RGSTR_ACT_TRACK_AVATAR));
enable_registrar.add("FS.EnableTeleportToTarget", boost::bind(&FSRegistrarUtils::checkIsEnabled, gFSRegistrarUtils, target_id, FS_RGSTR_ACT_TELEPORT_TO));
enable_registrar.add("FS.EnableRequestTeleport", boost::bind(&FSRegistrarUtils::checkIsEnabled, gFSRegistrarUtils, target_id, FS_RGSTR_ACT_REQUEST_TELEPORT));
+ enable_registrar.add("FS.CheckIsAgentBlocked", boost::bind(&FSRegistrarUtils::checkIsEnabled, gFSRegistrarUtils, target_id, FS_RGSTR_CHK_AVATAR_BLOCKED));
+ enable_registrar.add("FS.EnableBlockAvatar", boost::bind(&FSRegistrarUtils::checkIsEnabled, gFSRegistrarUtils, target_id, FS_RGSTR_CHK_IS_NOT_SELF));
//
// create and return the context menu from the XUI file
diff --git a/indra/newview/fscommon.cpp b/indra/newview/fscommon.cpp
index 7ebcb4c3a7..373a47f047 100644
--- a/indra/newview/fscommon.cpp
+++ b/indra/newview/fscommon.cpp
@@ -34,6 +34,7 @@
#include "llavatarnamecache.h"
#include "llfloaterperms.h"
#include "llinventorymodel.h"
+#include "llmutelist.h"
#include "llnotificationmanager.h"
#include "llnotificationsutil.h" // reportToNearbyChat
#include "lltooldraganddrop.h"
@@ -339,6 +340,18 @@ bool FSCommon::checkIsActionEnabled(const LLUUID& av_id, EFSRegistrarFunctionAct
{
return (!isSelf && FSRadar::getInstance()->getEntry(av_id) != NULL);
}
+ else if (action == FS_RGSTR_CHK_AVATAR_BLOCKED)
+ {
+ return (!isSelf && LLMuteList::getInstance()->isMuted(av_id));
+ }
+ else if (action == FS_RGSTR_CHK_IS_SELF)
+ {
+ return isSelf;
+ }
+ else if (action == FS_RGSTR_CHK_IS_NOT_SELF)
+ {
+ return !isSelf;
+ }
return false;
}
diff --git a/indra/newview/fsslurlcommand.cpp b/indra/newview/fsslurlcommand.cpp
index a6b9425d1d..6e36f18cb6 100644
--- a/indra/newview/fsslurlcommand.cpp
+++ b/indra/newview/fsslurlcommand.cpp
@@ -117,6 +117,15 @@ public:
return true;
}
+ if (verb == "blockavatar")
+ {
+ if (gAgentID != target_id)
+ {
+ LLAvatarActions::toggleBlock(target_id);
+ }
+ return true;
+ }
+
return false;
}
};
diff --git a/indra/newview/skins/default/xui/de/menu_url_agent.xml b/indra/newview/skins/default/xui/de/menu_url_agent.xml
index db967ed8a9..d453d94019 100755
--- a/indra/newview/skins/default/xui/de/menu_url_agent.xml
+++ b/indra/newview/skins/default/xui/de/menu_url_agent.xml
@@ -10,6 +10,7 @@
+
diff --git a/indra/newview/skins/default/xui/en/menu_url_agent.xml b/indra/newview/skins/default/xui/en/menu_url_agent.xml
index 30c3262034..751d50af4b 100755
--- a/indra/newview/skins/default/xui/en/menu_url_agent.xml
+++ b/indra/newview/skins/default/xui/en/menu_url_agent.xml
@@ -93,6 +93,19 @@
+
+
+
+
+
+