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

Add eventOnly option, channelSend event to Channel class #76

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Sakeran
Copy link
Contributor

@Sakeran Sakeran commented Apr 18, 2019

This closes #50 by adding an eventOnly config option to the Channel class, and by firing a channelSend event on the sender of the send function.

@shawncplus shawncplus self-requested a review April 18, 2019 15:56
* @param {Channel} channel
* @param {string} rawMessage
*/
sender.emit('channelSend', this, rawMessage);
Copy link
Contributor

Choose a reason for hiding this comment

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

This PR has been open for a bit and I recently merged it into my local fork and tried using it. One thing that stood out is that it may be helpful to actually emit this on the audience if possible... Mainly, I would like to handle sending to different audience members in different ways depending on whether they use telnet or webclient.

Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm, on second thought, it is still possible to do with the way this is set up. The one thing it may make a bit harder is having NPCs use the channels but that can be done with a behavior.

@shawncplus shawncplus added this to the 3.1 milestone Aug 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Channel should trigger a channelSend event on sender
3 participants