summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorLynx Linden <lynx@lindenlab.com>2009-11-03 17:16:37 +0000
committerLynx Linden <lynx@lindenlab.com>2009-11-03 17:16:37 +0000
commit97f9ad9f4c049a76287968f2d4fd5133e883984b (patch)
tree4f9db6259ae21026221c210b709c5cae741c859e /indra
parenteff50b018c93f7ddf328c750ddbea11f0a50f9c1 (diff)
DEV-41358 DEV-41361: Added support for new SLAPP URLs, needed for the
new Search web pages. These are: secondlife:///app/worldmap/{NAME}/{COORDS} Show the given coordinate on the World Map secondlife:///app/agent/{UUID}/pay Pay the specified Resident secondlife:///app/agent/{UUID}/im IM the specified Resident secondlife:///app/agent/{UUID}/requestfriend Request friendship of the specificed Resident secondlife:///app/agent/{UUID}/offerteleport Offer to Teleport the specified Resident secondlife:///app/agent/{UUID}/mute Mute/Block Resident secondlife:///app/agent/{UUID}/unmute Unmute/Unblock Resident
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llfloaterworldmap.cpp30
-rw-r--r--indra/newview/llpanelprofile.cpp48
2 files changed, 76 insertions, 2 deletions
diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp
index b7e8835fb8..f3f600149f 100644
--- a/indra/newview/llfloaterworldmap.cpp
+++ b/indra/newview/llfloaterworldmap.cpp
@@ -45,6 +45,7 @@
#include "llcallingcard.h"
#include "llcombobox.h"
#include "llviewercontrol.h"
+#include "llcommandhandler.h"
#include "lldraghandle.h"
#include "llfirstuse.h"
#include "llfloaterreg.h" // getTypedInstance()
@@ -96,6 +97,35 @@ static const F32 SIM_COORD_DEFAULT = 128.f;
// Globals
//---------------------------------------------------------------------------
+// handle secondlife:///app/worldmap/{NAME}/{COORDS} URLs
+class LLWorldMapHandler : public LLCommandHandler
+{
+public:
+ // requires trusted browser to trigger
+ LLWorldMapHandler() : LLCommandHandler("worldmap", UNTRUSTED_THROTTLE) { }
+
+ bool handle(const LLSD& params, const LLSD& query_map,
+ LLMediaCtrl* web)
+ {
+ if (params.size() == 0)
+ {
+ return false;
+ }
+
+ const std::string region_name = params[0].asString();
+ S32 x = (params.size() > 1) ? params[1].asInteger() : 128;
+ S32 y = (params.size() > 2) ? params[2].asInteger() : 128;
+ S32 z = (params.size() > 3) ? params[3].asInteger() : 0;
+
+ LLFloaterWorldMap::getInstance()->trackURL(region_name, x, y, z);
+ LLFloaterReg::showInstance("world_map", "center");
+
+ return true;
+ }
+};
+LLWorldMapHandler gWorldMapHandler;
+
+
LLFloaterWorldMap* gFloaterWorldMap = NULL;
class LLMapInventoryObserver : public LLInventoryObserver
diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp
index bec670cdaa..8147ff17f0 100644
--- a/indra/newview/llpanelprofile.cpp
+++ b/indra/newview/llpanelprofile.cpp
@@ -59,17 +59,61 @@ public:
return false;
}
- if (params[1].asString() == "about")
+ const std::string verb = params[1].asString();
+ if (verb == "about")
{
LLAvatarActions::showProfile(avatar_id);
return true;
}
- if (params[1].asString() == "inspect")
+ if (verb == "inspect")
{
LLFloaterReg::showInstance("inspect_avatar", LLSD().insert("avatar_id", avatar_id));
return true;
}
+
+ if (verb == "im")
+ {
+ LLAvatarActions::startIM(avatar_id);
+ return true;
+ }
+
+ if (verb == "pay")
+ {
+ LLAvatarActions::pay(avatar_id);
+ return true;
+ }
+
+ if (verb == "offerteleport")
+ {
+ LLAvatarActions::offerTeleport(avatar_id);
+ return true;
+ }
+
+ if (verb == "requestfriend")
+ {
+ LLAvatarActions::requestFriendshipDialog(avatar_id);
+ return true;
+ }
+
+ if (verb == "mute")
+ {
+ if (! LLAvatarActions::isBlocked(avatar_id))
+ {
+ LLAvatarActions::toggleBlock(avatar_id);
+ }
+ return true;
+ }
+
+ if (verb == "unmute")
+ {
+ if (LLAvatarActions::isBlocked(avatar_id))
+ {
+ LLAvatarActions::toggleBlock(avatar_id);
+ }
+ return true;
+ }
+
return false;
}
};