You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> var irc=require('irc')
undefined
> var client = new irc.Client('irc.freenode.net', 'test378546', {channels:['#node.ks']})
undefined
>
/home/jann/tmp/node_modules/irc/lib/irc.js:511
throw err;
^
TypeError: Cannot call method 'indexOf' of undefined
at /home/jann/tmp/node_modules/irc/lib/irc.js:158:47
at Array.forEach (native)
at Client.<anonymous> (/home/jann/tmp/node_modules/irc/lib/irc.js:137:26)
at Client.emit (events.js:67:17)
at /home/jann/tmp/node_modules/irc/lib/irc.js:508:22
at Array.forEach (native)
at Socket.<anonymous> (/home/jann/tmp/node_modules/irc/lib/irc.js:505:15)
at Socket.emit (events.js:67:17)
at TCP.onread (net.js:322:31)
Code looks like the mode change handler expects the mode to be set, but node-irc requests the mode explicitely after joining so that automatic network-caused mode changes happen before the absolute mode is known. Just ignoring might cause node-irc to see a wrong channelmodes, so maybe it should just rerequest the absolute mode when such things happen? E.g. have a "relative changes happened" flag, set it to false on requesting absolute mode, set it to true when changes happen. When an absolute mode comes in and "relative changes happened" is true, rerequest.
The text was updated successfully, but these errors were encountered:
Wiresharks logs:
Code looks like the mode change handler expects the mode to be set, but node-irc requests the mode explicitely after joining so that automatic network-caused mode changes happen before the absolute mode is known. Just ignoring might cause node-irc to see a wrong channelmodes, so maybe it should just rerequest the absolute mode when such things happen? E.g. have a "relative changes happened" flag, set it to false on requesting absolute mode, set it to true when changes happen. When an absolute mode comes in and "relative changes happened" is true, rerequest.
The text was updated successfully, but these errors were encountered: