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

Document 'selfMessage' from #17 #349

Closed
jhr007 opened this issue Apr 12, 2015 · 5 comments
Closed

Document 'selfMessage' from #17 #349

jhr007 opened this issue Apr 12, 2015 · 5 comments

Comments

@jhr007
Copy link

jhr007 commented Apr 12, 2015

I just found #17 and noticed adding emit(selfMessage) was not in the documentation.

Also... Semantically, I think this event would be a better service if it was moved to client.send ....

Thoughts?

@jhr007
Copy link
Author

jhr007 commented Apr 12, 2015

I just noticed that emit('selfMessage') has been moved to _speak, but it still might be better in prototype.send.

I think the purpose of selfMessage is to give an event that lets irc consumers debug outbound messages.

@jirwin
Copy link
Collaborator

jirwin commented Apr 15, 2015

The docs have been updated with selfMessage. While I was reviewing the doc change, I also thought that it should be in client.send. I'll take a closer look and get back to you.

@jirwin
Copy link
Collaborator

jirwin commented Apr 15, 2015

I pushed a PR to change this: #353

@jhr007
Copy link
Author

jhr007 commented Apr 15, 2015

Thanks for the quick update.

What do you think about an event like 'sendAll' that could be used to tap into all outgoing messages? e.g. Modes, joins, parts...

The following probably deserves another issue, but thought I'd ask here first.
In the essence of better, "self" in selfMessage / selfNotice would be more intuitive/semantic if it was prefixed send.

In defense of this point, when the debug option is set, SEND: is added to outgoing debugging messages.

Changing selfMessage to sendMessage would be a breaking change, unless .on & .addListener were wrapped to replace selfMessage with sendMessage and give a deprecation warning 'use sendMessage instead of selfMessage'. Then in a later release remove the wrapper.

Just thinking out loud.

Thanks again for documentation

@jirwin
Copy link
Collaborator

jirwin commented Apr 15, 2015

@jhr007 I like it. I'll make a new issue for standardizing events and debug logs for everything the client sends.

@jirwin jirwin closed this as completed Apr 15, 2015
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

No branches or pull requests

2 participants