updated secondlife:///app/group and secondlife:///app/agent namespaces to 2.0
This commit is contained in:
@@ -60,6 +60,37 @@ const LLRect FAI_RECT(0, 530, 420, 0);
|
||||
class LLAgentHandler : public LLCommandHandler
|
||||
{
|
||||
public:
|
||||
void verbCallback(const std::string& verb, LLUUID agent_id, const LLAvatarName& avatar_name)
|
||||
{
|
||||
if (verb == "im")
|
||||
{
|
||||
gIMMgr->setFloaterOpen(TRUE);
|
||||
gIMMgr->addSession( avatar_name.getCompleteName(), IM_NOTHING_SPECIAL, agent_id);
|
||||
return;
|
||||
}
|
||||
|
||||
if (verb == "requestfriend")
|
||||
{
|
||||
LLPanelFriends::requestFriendshipDialog( agent_id, avatar_name.getCompleteName() );
|
||||
return;
|
||||
}
|
||||
|
||||
if (verb == "mute")
|
||||
{
|
||||
LLFloaterMute::getInstance()->open();
|
||||
LLMute mute(agent_id, avatar_name.getCompleteName(), LLMute::AGENT);
|
||||
LLMuteList::getInstance()->add(mute);
|
||||
return;
|
||||
}
|
||||
|
||||
if (verb == "unmute")
|
||||
{
|
||||
LLMute mute(agent_id, avatar_name.getCompleteName(), LLMute::AGENT);
|
||||
LLMuteList::getInstance()->remove(mute);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// requires trusted browser to trigger
|
||||
LLAgentHandler() : LLCommandHandler("agent", true) { }
|
||||
|
||||
@@ -73,11 +104,44 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
if (params[1].asString() == "about")
|
||||
{
|
||||
LLFloaterAvatarInfo::show(agent_id);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (verb == "pay")
|
||||
{
|
||||
handle_pay_by_id(agent_id);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (verb == "offerteleport")
|
||||
{
|
||||
handle_lure(agent_id);
|
||||
return true;
|
||||
}
|
||||
|
||||
if ((verb == "im") || (verb == "requestfriend") || (verb == "unmute"))
|
||||
{
|
||||
LLAvatarNameCache::get(agent_id, boost::bind(&LLAgentHandler::verbCallback, this, verb, _1, _2));
|
||||
return true;
|
||||
}
|
||||
|
||||
if (verb == "mute")
|
||||
{
|
||||
if (LLMuteList::getInstance()->isMuted(agent_id))
|
||||
{
|
||||
LLFloaterMute::getInstance()->open();
|
||||
LLFloaterMute::getInstance()->selectMute(agent_id);
|
||||
}
|
||||
else
|
||||
{
|
||||
LLAvatarNameCache::get(agent_id, boost::bind(&LLAgentHandler::verbCallback, this, verb, _1, _2));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -97,7 +97,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
if (tokens[1].asString() == "about")
|
||||
if ((tokens[1].asString() == "about") || (tokens[1].asString() == "inspect"))
|
||||
{
|
||||
LLFloaterGroupInfo::showFromUUID(group_id);
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user