-
Notifications
You must be signed in to change notification settings - Fork 421
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
node-irc with express/socket.io #417
Comments
This is because every time a webclient connects to the websocket, its re-initializing a brand new node-irc bot, including the 'addListener'. You may not see see the other two bots join, because they all have the same nick, but only left with the symptom of three messages 1/per each bot. You probably just loaded the page to your web application and then refreshed twice. If you can, I'd recommend putting the client object as a global instead of inside the websocket initialization. |
@jnull I want each user who connects to have their own connection so for example 100 users can open the page and it creates 100 connections. I guess I'm understanding it wrong. Can you point me in the right direction? |
you probably want something jerry-rigged like this:
If that doesn't work, you may have to get jiggy with the client object and push ever new subsequent client to an array like:
|
I fixed it by changing |
oh i thought it was on your ircd #messages channel, not your web application, yep that would be it then. |
@jnull how can I convert messages to CSS colours?
|
CSS is out of scope to node-irc, you will need to go elsewhere to find an html/css tutorial. If your original problem has been solved, please close this and create a new issue, but only if its a node-irc issue. Thanks! |
I'm building a web chat using node-irc.
I'm new to express/node.js/socket.io in general so please excuse any bad mistakes, but I'm following the documentation on the socket.io website as well as the node-irc documentation on here and Read The Docs.
index.js:
index.html:
But in
#messages
I see each message 3 times, why is this?3�hi ya���13�hi ya���13�hi ya���03�Welcome Dimitra ���03�Welcome Dimitra ���03�Welcome Dimitra
The text was updated successfully, but these errors were encountered: