alexyoung/ircd.js — Issue #26: Sending a message to a channel that doesn't exist crashes server
Author: neiltron
Created: 2012-01-30 21:01:28+00:00
State: open

At least for me (where #what is an as-of-yet non-existent channel):

>[lunchbox, C: neil] PRIVMSG #what :hi
>
>/usr/local/lib/node_modules/ircdjs/lib/commands.js:161
> if (channel.isModerated && !user.isVoiced(channel)) {
> ^
>TypeError: Cannot read property 'isModerated' of undefined
> at Object. (/usr/local/lib/node_modules/ircdjs/lib/commands.js:161:18)
> at EventEmitter. (/usr/local/lib/node_modules/ircdjs/lib/server.js:113:34)
> at EventEmitter.emit (events.js:77:17)
> at Object.respond (/usr/local/lib/node_modules/ircdjs/lib/server.js:164:24)
> at Object.data (/usr/local/lib/node_modules/ircdjs/lib/server.js:248:10)
> at Carrier. (/usr/local/lib/node_modules/ircdjs/lib/server.js:203:51)
> at Carrier.emit (events.js:67:17)
> at /usr/local/lib/node_modules/ircdjs/node_modules/carrier/lib/carrier.js:40:16
> at Array.forEach (native)
> at Socket. (/usr/local/lib/node_modules/ircdjs/node_modules/carrier/lib/carrier.js:26:13)

Discovered this because I wanted a bot I'm working with to do a send a status message to a channel without joining.