summaryrefslogtreecommitdiff
path: root/indra/newview/llagentlistener.cpp
diff options
context:
space:
mode:
authorLoren Shih <seraph@lindenlab.com>2011-05-20 14:56:10 -0400
committerLoren Shih <seraph@lindenlab.com>2011-05-20 14:56:10 -0400
commit6f5313caea9bb8458dca23bbaf4f10cd6641c7fb (patch)
treeac34191250860e5f250cf1cc2e9199cdaa8204f6 /indra/newview/llagentlistener.cpp
parenteb8221338e0276b9afe8d92738166f97782d48d6 (diff)
parent0b612741d53a044a0179e1c32018bf8cd4213631 (diff)
automated merge mesh-development -> davep-mesh-candidate-2010
Diffstat (limited to 'indra/newview/llagentlistener.cpp')
-rw-r--r--indra/newview/llagentlistener.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/indra/newview/llagentlistener.cpp b/indra/newview/llagentlistener.cpp
index ed24febf41..9cea33c7c6 100644
--- a/indra/newview/llagentlistener.cpp
+++ b/indra/newview/llagentlistener.cpp
@@ -64,6 +64,12 @@ LLAgentListener::LLAgentListener(LLAgent &agent)
"[\"quat\"]: array of [x, y, z, w] quaternion values",
&LLAgentListener::getAxes,
LLSDMap("reply", LLSD()));
+ add("getGroups",
+ "Send on [\"reply\"], in [\"groups\"], an array describing agent's groups:\n"
+ "[\"id\"]: UUID of group\n"
+ "[\"name\"]: name of group",
+ &LLAgentListener::getGroups,
+ LLSDMap("reply", LLSD()));
}
void LLAgentListener::requestTeleport(LLSD const & event_data) const
@@ -140,3 +146,21 @@ void LLAgentListener::getAxes(const LLSD& event) const
("euler", LLSDMap("roll", roll)("pitch", pitch)("yaw", yaw)),
event);
}
+
+void LLAgentListener::getGroups(const LLSD& event) const
+{
+ LLSD reply(LLSD::emptyArray());
+ for (LLDynamicArray<LLGroupData>::const_iterator
+ gi(mAgent.mGroups.begin()), gend(mAgent.mGroups.end());
+ gi != gend; ++gi)
+ {
+ reply.append(LLSDMap
+ ("id", gi->mID)
+ ("name", gi->mName)
+ ("insignia", gi->mInsigniaID)
+ ("notices", bool(gi->mAcceptNotices))
+ ("display", bool(gi->mListInProfile))
+ ("contrib", gi->mContribution));
+ }
+ sendReply(LLSDMap("groups", reply), event);
+}