-
Notifications
You must be signed in to change notification settings - Fork 423
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
Conversation
Why not add a the functionality to purge the queue and then leverage that? Could be useful in other ways too. |
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); |
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.
For the lines above, @tuhoojabotti might have something to say. This part of the pull request is not made by me.
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.
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.
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.
Oh, it was made by pull rq #91. Perhaps I should merge the master branch of node-irc to my fork...
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. |
Do agree with you: the latter is better. I'm experiencing this problem too on QuakeNet. |
👍 for the latter. I doubt that the queue would ever be too big to drain when client is exiting. |
It could be a parameter for the quit function. Like if the bot breaks and starts spamming you can force quit. |
I like what @tuhoojabotti suggested. Do that. |
I'll close this (I've made a new issue #138 to keep track of the fact this needs fixing). |
This fixes #89