This is a yielding function. When called, it will pause the Lua thread that called the function until a result is ready to be returned, without interrupting other scripts.
Filters a string being sent to playerTo from playerFrom with filtering that is appropriate to the given player’s account settings. This function should be used any time a user can enter custom text in any context. Some examples of text that should be filtered:
- Custom chat messages
- Entering a custom character name
- Entering a name for a shop in a tycoon
If the filtered string is being used for a persistent message (such as the name of a shop, writing on a plaque, etc) then the function should be called with the writing player as both the sender and receiver.