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

Hacky fix for missing quit messages when spam control was ON #100

Closed
wants to merge 1 commit into from

Conversation

valscion
Copy link

This fixes #89

@katanacrimson
Copy link
Contributor

Why not add a the functionality to purge the queue and then leverage that? Could be useful in other ways too.

@valscion
Copy link
Author

All I did was hack a bit, to show why it fails. Maybe this pull request should not be merged but rather be an aid for the original developer to fix it.

trailing = match[2];
var index = line.indexOf(':');
middle = line.substr(0, index).replace(/ +$/, "");
trailing = line.substr(index+1);
Copy link
Author

Choose a reason for hiding this comment

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

For the lines above, @tuhoojabotti might have something to say. This part of the pull request is not made by me.

Choose a reason for hiding this comment

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

I don't recollect doing that code, maybe it's probably a change on master that is not yet in the NPM package or something.

Copy link
Author

Choose a reason for hiding this comment

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

Oh, it was made by pull rq #91. Perhaps I should merge the master branch of node-irc to my fork...

@martynsmith
Copy link
Owner

Yeah, I can see why this would be annoying.

I'll try investigate a nice way to empty the queue prior to disconnect.

In general are people happy to simply discard everything except the QUIT, send the QUIT and then disconnect, or should the client process the queue normally then disconnect?

At a guess I suspect the latter behaviour is more desirable.

@ndrnrd
Copy link

ndrnrd commented Nov 8, 2012

Do agree with you: the latter is better. I'm experiencing this problem too on QuakeNet.

@valscion
Copy link
Author

valscion commented Nov 8, 2012

👍 for the latter. I doubt that the queue would ever be too big to drain when client is exiting.

@villelahdenvuo
Copy link

It could be a parameter for the quit function. Like if the bot breaks and starts spamming you can force quit.

@valscion
Copy link
Author

valscion commented Nov 9, 2012

I like what @tuhoojabotti suggested. Do that.

@martynsmith
Copy link
Owner

I'll close this (I've made a new issue #138 to keep track of the fact this needs fixing).

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.

disconnect does not appear to send the reason to the server
5 participants