-
Notifications
You must be signed in to change notification settings - Fork 425
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
WEBIRC support #276
WEBIRC support #276
Conversation
Webirc is used for multiple users to connect from your node-irc server to irc to get the clients ip. Get the users ip and hostname and send it like this: webirc = {"pass":"WebIrcPassWord","host":"my.host.com", "ip":"123.123.12.12"}; http://wiki.mibbit.com/index.php/Enable_Mibbit_on_Your_IRC_Server How to configure your server for Webirc can also be found in your irc server dokumentation.
wrong branch? |
This is the wrong branch. You just have some lint errors to fix. Run I think this patch looks pretty good now! |
@@ -654,6 +655,9 @@ Client.prototype.connect = function(retryCount, callback) { // {{{ | |||
self.conn.authorizationError === 'CERT_HAS_EXPIRED') { | |||
util.log('Connecting to server with expired certificate'); | |||
} | |||
if (typeof self.opt.webirc.ip !== 'undefined') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might be better as if (self.opt.webirc.ip) {
. Currently this would run if an IP was an empty string as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this still has the issue of the case where self.opt.webirc.ip === ''
. It is probably better to check the value instead of trusting the type. Using if (self.opt.webirc.ip) {
looks for a falsy value, and the empty string(''
) will evaluate to false
.
it's a string not a boolean value |
|
Line 661 and 688" if (self.opt.password !== null) " should i change it to true/false also or leave it? |
As I said in a previous pull req, I'm not sure why this needs to be a part of node-irc proper and can't just be handled via a |
I have trawled the charybdis source code and I see no indication that WEBIRC needs to be sent immediately upon connecting. |
I gonna test that new pull with socket.localAddress and see if that fixed the problem with multiple ip When a user connects through an indirect method, such web clients, the indirect client sends its own IP address instead of sending the user's IP address unless WebIRC is implemented by both the client and the server. Method: Source: Compatible with a bunch of irc servers |
Webirc is used for multiple users to connect from your node-irc server to irc to get the clients ip.
Get the users ip and hostname and send it like this:
webirc = {"pass":"WebIrcPassWord","host":"my.host.com", "ip":"123.123.12.12"};
http://wiki.mibbit.com/index.php/Enable_Mibbit_on_Your_IRC_Server
How to configure your server for Webirc can also be found in your irc server dokumentation.