sending message in a channel causes server to crash #1

Closed
opened 5 years ago by Wayne · 7 comments
Wayne commented 5 years ago
Collaborator

server is trying to get .registered attribute from channel object

server is trying to get .registered attribute from channel object
Poster
Collaborator

Unknown command: CAP

Unknown command: MODE

Unknown command: WHO

/home/wayne/WebstormProjects/ircd-js/src/server.js:82
if (target.registered === false) {
^

TypeError: Cannot read property 'registered' of undefined
at /home/wayne/WebstormProjects/ircd-js/src/server.js:82:36
at Array.forEach ()
at Socket. (/home/wayne/WebstormProjects/ircd-js/src/server.js:31:50)
at emitOne (events.js:116:13)
at Socket.emit (events.js:211:7)
at addChunk (_stream_readable.js:263:12)
at readableAddChunk (_stream_readable.js:250:11)
at Socket.Readable.push (_stream_readable.js:208:10)
at TCP.onread (net.js:607:20)

Unknown command: CAP Unknown command: MODE Unknown command: WHO /home/wayne/WebstormProjects/ircd-js/src/server.js:82 if (target.registered === false) { ^ TypeError: Cannot read property 'registered' of undefined at /home/wayne/WebstormProjects/ircd-js/src/server.js:82:36 at Array.forEach (<anonymous>) at Socket.<anonymous> (/home/wayne/WebstormProjects/ircd-js/src/server.js:31:50) at emitOne (events.js:116:13) at Socket.emit (events.js:211:7) at addChunk (_stream_readable.js:263:12) at readableAddChunk (_stream_readable.js:250:11) at Socket.Readable.push (_stream_readable.js:208:10) at TCP.onread (net.js:607:20)
Owner

Where are you trying this? I don't think we have implemented channel messages yet.

Where are you trying this? I don't think we have implemented channel messages yet.
Owner

Also we should refactor the PRIVMSG code to move the check for registered to the User class. instead of doing this in the server.js

Also we should refactor the PRIVMSG code to move the check for registered to the User class. instead of doing this in the server.js
Owner

Wait, we can't put the registered check into the user, because this would send the answer to the wrong user. We need to change some minor logic about the userlist in order to allow mixed messaging,

Wait, we can't put the registered check into the user, because this would send the answer to the wrong user. We need to change some minor logic about the userlist in order to allow mixed messaging,
Poster
Collaborator

I tried running the index.js, joining a channel and sending a message in hexchat.
Ended up with above output.

I tried running the index.js, joining a channel and sending a message in hexchat. Ended up with above output.
Owner

As mentioned, that's completely reasonable because it's not implemented yet.

As mentioned, that's completely reasonable because it's not implemented yet.
Owner

Implemented by 79f32062c1

Implemented by https://gogs.informatik.hs-fulda.de/sheogorath/ircd-js/commit/79f32062c15e0f78db6cc45531eb86f267ab2055
sheogorath closed this issue 5 years ago
Sign in to join this conversation.
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.