@setgroup controls the avatar's active group (the group tag). @setgroup=n locks it; @setgroup:<name>=force switches to another group the avatar belongs to.
@setgroup=<y|n>
@setgroup:<group_name>=force
@setgroup:none=force
none deactivates the current group. A name the agent isn't a member of is silently ignored. Group UUIDs aren't accepted.Looks up the group by name among gAgent.mGroups and activates it.
LLGroupActions::activate, which returns early while any @setgroup restriction exists. Unlike @setenv/@setdebug, there is no self-bypass. To switch groups while locked, send @setgroup=y,setgroup:<name>=force,setgroup=n.llOwnerSay("@setgroup=y,setgroup:my club=force,setgroup=n");
The spec says nothing about the force form being blocked by the restriction. The code (in both viewers) blocks it.
Marine: force at RRInterface.cpp:2352-2371. The restriction is checked at llgroupactions.cpp:274 (join) and 393 (activate), llviewermessage.cpp:723 (invitation response), llpanelpeople.cpp:1500, and llgrouplist.cpp:385.
CoolVL calls gAgent.setGroup(), which also refuses while @setgroup is active (llagent.cpp:5295), and ignores incoming group invitations (llimmgr.cpp:2280). The behavior is the same in both viewers.
This command works differently from RLVa's @setgroup; see the comparison.