server icon indicating copy to clipboard operation
server copied to clipboard

[core, lua] Add ability to jail offline chars

Open TracentEden2 opened this issue 1 year ago • 0 comments

I affirm:

  • [x] I understand that if I do not agree to the following points by completing the checkboxes my PR will be ignored.
  • [x] I understand I should leave resolving conversations to the LandSandBoat team so that reviewers won't miss what was said.
  • [x] I have read and understood the Contributing Guide and the Code of Conduct.
  • [x] I have tested my code and the things my code has changed since the last commit in the PR and will test after any later commits.

What does this pull request do?

This PR adds the ability to jail offline chars to the !jail command. This saves admins a lot of time because they do not have to run manual database queries to jail chars that are offline. The PR also adds utility functions PlayerHasValidSession and GetPlayerIDByName that !jail and SendItemToDeliveryBox can use.

Steps to test these changes

Attempt to jail characters that are online (on same map process as GM), online (on different map process as GM, will notify that does not work), and offline.

TracentEden2 avatar May 13 '24 11:05 TracentEden2