diff options
Diffstat (limited to 'indra/newview/llagentlistener.cpp')
-rw-r--r-- | indra/newview/llagentlistener.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/indra/newview/llagentlistener.cpp b/indra/newview/llagentlistener.cpp index 591594d12c..a8d2222c03 100644 --- a/indra/newview/llagentlistener.cpp +++ b/indra/newview/llagentlistener.cpp @@ -489,3 +489,21 @@ void LLAgentListener::lookAt(LLSD const & event_data) const gAgentCamera.setLookAt((ELookAtType) look_at_type, object); } } + +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); +} |