EQ2 onGroupMembershipChange (Event)¶
Description¶
The EQ2_onGroupMembershipChange event will fire when the membership of your group changes.
Arguments¶
Context¶
This event provides a context (${Context}) object which will be an index:string of the group membership prior to the update. (See example below for how the context object can be used in an event atom.)
Usage Example¶
atom EQ2_onGroupMembershipChange(int PreviousGroupCount, int NewGroupCount)
{
variable int PrevGroupIterator = 1
variable int NewGroupIterator = 1
echo "** EQ2_onGroupMembershipChange(${PreviousGroupCount}, ${NewGroupCount}) **"
if (${PreviousGroupCount} > 0)
{
echo "- Old Group Membership:"
do
{
echo "-- ${PrevGroupIterator}. ${Context[${PrevGroupIterator}]}"
}
while (${PrevGroupIterator:Inc} < ${Context.Used})
}
if (${NewGroupCount} > 0)
{
echo "- New Group Membership:"
do
{
echo "-- ${NewGroupIterator}. ${Me.Group[${NewGroupIterator}]}"
}
while (${NewGroupIterator:Inc} < ${Me.GroupCount})
}
}
function main()
{
Event[EQ2_onGroupMembershipChange]:AttachAtom[EQ2_onGroupMembershipChange]
do
{
waitframe
}
while (${ISXEQ2(exists)})
}