OsEjectFromGroup
From OpenSimulator
(Difference between revisions)
m (XEngine to OSSL) |
|||
(3 intermediate revisions by one user not shown) | |||
Line 3: | Line 3: | ||
|csharp_syntax= | |csharp_syntax= | ||
|description=Eject the given user from the group the object is set to. | |description=Eject the given user from the group the object is set to. | ||
+ | |||
The object owner must have the right to eject users from the group the object is set to. | The object owner must have the right to eject users from the group the object is set to. | ||
− | The group member who is ejected can be offline. The user gets an instant message, that he/she has been ejected from that group. The result is TRUE, if the user could be ejected, otherwise FALSE. | + | |
+ | The group member who is ejected can be offline. The user gets an instant message, that he/she has been ejected from that group. | ||
+ | |||
+ | The result is TRUE, if the user could be ejected, otherwise FALSE. | ||
+ | |||
|threat_level=VeryLow | |threat_level=VeryLow | ||
|permissions=${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER | |permissions=${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER | ||
|delay=0 | |delay=0 | ||
− | |ossl_example= | + | |ossl_example=<source lang="lsl"> |
+ | // | ||
+ | // osEjectFromGroup Script Exemple | ||
+ | // Author: djphil | ||
+ | // | ||
+ | |||
+ | key userID = "<USER_UUID_TO_EJECT>"; | ||
+ | |||
+ | default | ||
+ | { | ||
+ | state_entry() | ||
+ | { | ||
+ | if (userID == "<USER_UUID_TO_EJECT>" || !osIsUUID(userID)) | ||
+ | { | ||
+ | llOwnerSay("Please replace <USER_UUID_TO_EJECT> with a valid user uuid"); | ||
+ | } | ||
+ | |||
+ | else | ||
+ | { | ||
+ | llSay(PUBLIC_CHANNEL, "Touch to see osEjectFromGroup eject the user from this object's group."); | ||
+ | } | ||
+ | } | ||
+ | |||
+ | touch_start(integer number) | ||
+ | { | ||
+ | if (llDetectedKey(0) == llGetOwnerKey(llGetKey())) | ||
+ | { | ||
+ | integer result = osEjectFromGroup(userID); | ||
+ | |||
+ | if (result == TRUE) | ||
+ | { | ||
+ | llOwnerSay("Eject " + osKey2Name(userID) + " from group successfully."); | ||
+ | } | ||
+ | |||
+ | if (result == FALSE) | ||
+ | { | ||
+ | llOwnerSay("Eject " + osKey2Name(userID) + " from group unsuccessfully."); | ||
+ | } | ||
+ | } | ||
+ | |||
+ | else | ||
+ | { | ||
+ | llSay(PUBLIC_CHANNEL, "Sorry, you are not the owner of this object."); | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | </source> | ||
|additional_info=This function was added in 0.7.4-post-fixes | |additional_info=This function was added in 0.7.4-post-fixes | ||
}} | }} | ||
+ | == See Also == | ||
+ | * [[osInviteToGroup]] | ||
+ | * [[osEjectFromGroup]] |
Latest revision as of 05:33, 11 January 2021
integer osEjectFromGroup(key user)
| |
Eject the given user from the group the object is set to.
The object owner must have the right to eject users from the group the object is set to. The group member who is ejected can be offline. The user gets an instant message, that he/she has been ejected from that group. The result is TRUE, if the user could be ejected, otherwise FALSE. | |
Threat Level | VeryLow |
Permissions | ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER |
Extra Delay | 0 seconds |
Example(s) | |
// // osEjectFromGroup Script Exemple // Author: djphil // key userID = "<USER_UUID_TO_EJECT>"; default { state_entry() { if (userID == "<USER_UUID_TO_EJECT>" || !osIsUUID(userID)) { llOwnerSay("Please replace <USER_UUID_TO_EJECT> with a valid user uuid"); } else { llSay(PUBLIC_CHANNEL, "Touch to see osEjectFromGroup eject the user from this object's group."); } } touch_start(integer number) { if (llDetectedKey(0) == llGetOwnerKey(llGetKey())) { integer result = osEjectFromGroup(userID); if (result == TRUE) { llOwnerSay("Eject " + osKey2Name(userID) + " from group successfully."); } if (result == FALSE) { llOwnerSay("Eject " + osKey2Name(userID) + " from group unsuccessfully."); } } else { llSay(PUBLIC_CHANNEL, "Sorry, you are not the owner of this object."); } } } | |
Notes | |
This function was added in 0.7.4-post-fixes |
[edit] See Also
- osInviteToGroup
- osEjectFromGroup