New function [leaveChannel]
Pull Request Prelude
- [x] I have followed [proper The Forgotten Server code styling][code].
- [x] I have read and understood the [contribution guidelines][cont] before making this PR.
- [x] I am aware that this PR may be closed if the above-mentioned criteria are not fulfilled.
Changes Proposed
This function allows the player to close an open chat.
What's the use case?
What's the use case?
It will be possible to create custom systems with the option to open and close chats via scripts.
Honestly, I thought of using it in a system that I developed using AntiBot, in which it opens its own chat to verify this. Without this new function, the chat could remain open there forever.
Here is the link to view the system: click here
In the case of the link above, the new function is not placed, and that would be a choice to use.
Honestly, I thought of using it in a system that I developed using AntiBot, in which it opens its own chat to verify this. Without this new function, the chat could remain open there forever.
Ah, super cool!
The name of the method is quite weird for what it actually does. I don't know, but it bothers me that the method is called "close", and in reality all it does is trigger the "onLeave" event of the chat, but the channel remains open.
This method was created for the client to call it when the chat is really closed physically from the client side.
to make a player unable to write in the chat, u can be controlled through a Lua variable. Apparently, Cip's client does not need to close channels from the server side. Or does it? How?
maybe call it player:leaveChannel()?
The name of the method is quite weird for what it actually does. I don't know, but it bothers me that the method is called "close", and in reality all it does is trigger the "onLeave" event of the chat, but the channel remains open.
This method was created for the client to call it when the chat is really closed physically from the client side.
to make a player unable to write in the chat, u can be controlled through a Lua variable. Apparently, Cip's client does not need to close channels from the server side. Or does it? How?
maybe call it
player:leaveChannel()?
indeed we need a better and more descriptive name