martynsmith / node-irc

NodeJS IRC client library
GNU General Public License v3.0
1.33k stars 424 forks source link

WebIRC Support #427

Closed ghost closed 8 years ago

ghost commented 8 years ago

I need to add WebIRC Support to our node-irc usage. We have built a webchat that connects to our IRC network but the problem is that we now have 100's of users connecting by the web server IP address and not their real IP address.

Before the client sends the PASS, USER or NICK commands it should send:

WEBIRC password user hostname ip

How can I hook in to node-irc so that before it sends the PASS, USER or NICK commands it sends another command?

ghost commented 8 years ago

Please read/try the docs here. ask questions on channel ##node-irc (freenode) i idle frequently there.

ghost commented 8 years ago

@Jnull so if I hook in to 'registered', will my line definitely be sent after it has received the 001 numeric and before PASS, USER or NICK commands?

ghost commented 8 years ago

Just realised this is already implemented but isn't mentioned in the documentation. lib/irc.js shows the configuration options and relevant code.

ghost commented 8 years ago

@ircer What is already implemented? Did you find your solution?

ghost commented 8 years ago

@Jnull WebIRC Support, what this ticket is about!

https://github.com/martynsmith/node-irc/blob/master/lib/irc.js#L59-L64 are the relevant configuration lines.

It would help if this was mentioned in the documentation, so that people don't waste time implementing something that is already supported.

ghost commented 8 years ago

However small bug in that linked code however.

https://github.com/martynsmith/node-irc/blob/master/lib/irc.js#L639 wants this.opt.webirc.host but https://github.com/martynsmith/node-irc/blob/master/lib/irc.js#L59-L62 gives user.

https://github.com/martynsmith/node-irc/blob/master/lib/irc.js#L62 needed to be changed from user to host and it works fine.

moshmage commented 8 years ago

@ircer maybe PR that fix in?

ghost commented 8 years ago

@moshmage done.

ghost commented 8 years ago

Any update on getting it merged then?

moshmage commented 8 years ago

@ghost MR are coming in slow, @jirwin knows more about that