Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

oc_api restore interface channel commands #1016

Merged
merged 7 commits into from
Mar 18, 2024

Conversation

Medea-Destiny
Copy link
Collaborator

Fix restores and expands arbitrary command functionality to interface channel. Also restores "owned by:" messages on all start ups, not just reboot, improves auth efficiency of chat commands, and restores "#" prefix handling

Details:

  • Restored # prefix functionality, issue The "#" prefix wildcard is not working in 8.2.3  #897

  • Refactored chat command handling for efficiency. Chat commands no longer sent as CMD_ZERO for authing as this script handles auth so we can auth locally to save a link_message round trip on every chat command.

*Restored object command handling as per v7.x and previous, using interface channel rather than HUDchannel as there seems no reason to duplicate and hudchannel stuff hasn't worked for a few years anyway. Added remote auth function - llSay(g_iInterfaceChannel,"checkauth 1111"); will return "AuthReply|(wearerkey)|(auth level)" on channel 1111, reporting the auth level of the object owner. Commands can be prefixed with "authas:(userkey)=", which will use the LOWER auth level between object owner and userkey.

Commmand format is targetkey:chat command. Examples:
"authas:(userkey)=(targetkey):kneel" - will issue kneel command if (userkey) and object owner both have valid auth "(targetkey):sit (sittarget key)" - sit wearer on (sittarget key) if object owner has valid auth

*menuto cleanup requires menuto target to be in sim AND be the owner of the issuing command

*Set g_iStartup to TRUE in active state on_rez event to restore "owned by" message #906

*Updated old oc_leash_on_collision "grabby post" script to work with updated interface channel

*Created new oc_smart_post script, a heavily commented example of what can be done via the interface channel

Fix restores and expands arbitrary command functionality to interface channel. Also restores "owned by:" messages on all start ups, not just reboot, improves auth efficiency of chat commands, and restores "#" prefix handling


Details:
* Restored # prefix functionality, issue #897

* Refactored chat command handling for efficiency. Chat commands no longer sent as CMD_ZERO for authing as this script handles auth so we can auth locally to save a link_message round trip on every chat command. 

*Restored object command handling as per v7.x and previous, using interface channel rather than HUDchannel as there seems no reason to duplicate and hudchannel stuff hasn't  worked for a few years anyway. Added remote auth function -  llSay(g_iInterfaceChannel,"checkauth 1111"); will return "AuthReply|(wearerkey)|(auth level)"  on channel 1111, reporting the auth level of the object owner. Commands can be prefixed with  "authas:(userkey)=", which will use the LOWER auth level between object owner and userkey. 

  Commmand format is targetkey:chat command. Examples: 
 "authas:(userkey)=(targetkey):kneel" - will issue kneel command if (userkey) and object owner both have valid auth "(targetkey):sit (sittarget key)" - sit wearer on (sittarget key) if object owner has valid auth

*menuto cleanup requires menuto target to be in sim AND be the owner of the issuing command

*Set g_iStartup to TRUE in active state on_rez event to restore "owned by" message #906 

*Updated old oc_leash_on_collision "grabby post" script to work with updated interface channel

*Created new oc_smart_post script, a heavily commented example of what can be done via the interface channel
@Medea-Destiny Medea-Destiny added the Do Not Merge (yet) One reason or another for not merging label Nov 28, 2023
@Medea-Destiny
Copy link
Collaborator Author

Note: the oc_smart_post restrictions function is dependent on the oc_rlvsuite change in pr #1015

@Pingout
Copy link
Collaborator

Pingout commented Nov 29, 2023

Tested by Omnia and Ping. These changes work as expected.
The # wildcard has been restored, allowing the collar wearing owner to command multiple other collars without affecting themselves. For example the command "# lock" will lock every owned nearby collar, and leave the collar wearing owner's collar unlocked.
"Owned By" message on startup has been restored. The collar reports all owners. Trusted are not reported on startup
In general, commands seem to be handled quicker. We have no metric to prove this, it just feels faster
The Grabby post now works very well. We did report to Medea that a sub who remains in collision with the post will receive multiple rapid leash attempts.
The Smart Post also works well. Medea cleaned up a couple of debug messages that were in the script
Thank you!

Copy link
Collaborator

@Pingout Pingout left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved as revised

@SilkieSabra
Copy link
Contributor

I'll wait for the Do Not Merge tag to be removed before merging

@NikkiLacrima
Copy link
Contributor

NikkiLacrima commented Dec 2, 2023

Instead of wrestling with the github based conflict resolution with #1001, I will merge the changes in my own code, do some inworld sanity checks and then create a PR with the combined version of oc_api, later today

@Medea-Destiny
Copy link
Collaborator Author

Conflicts with #1001 /#1010 should be fixed. Quick test that command passing / Safeword / Runaway working as intended with Nikki's fixes needed.

@Medea-Destiny Medea-Destiny added Needs testing This issue needs volunteers to try to duplicate the error or identify a caues and removed Do Not Merge (yet) One reason or another for not merging labels Mar 4, 2024
Copy link
Collaborator

@Pingout Pingout left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested by Omnia and Ping. Everything works as expected

@SilkieSabra SilkieSabra merged commit a46e3ba into 8.3_Features-branch Mar 18, 2024
2 checks passed
@SilkieSabra SilkieSabra deleted the Medea-Destiny-patch-5 branch March 18, 2024 21:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs testing This issue needs volunteers to try to duplicate the error or identify a caues
Projects
Development

Successfully merging this pull request may close these issues.

4 participants