martynsmith/node-irc — pull request #172 by sankha93 (2013-06-18 07:51:43+00:00)
Title: Fix deletion of Array elements

Node-IRC uses `delete` keyword to remove things from Array which actually sets it to `undefined`. This causes unexpected errors like:

```
/home/ubuntu/scrollback/node_modules/irc/lib/irc.js:637
throw err;
^
TypeError: Cannot call method 'replace' of undefined
at /home/ubuntu/scrollback/node_modules/irc/lib/irc.js:239:71
at Array.forEach (native)
at Client. (/home/ubuntu/scrollback/node_modules/irc/lib/irc.js:226:26)
at Client.EventEmitter.emit (events.js:95:17)
at /home/ubuntu/scrollback/node_modules/irc/lib/irc.js:634:22
at Array.forEach (native)
at Socket. (/home/ubuntu/scrollback/node_modules/irc/lib/irc.js:631:15)
at Socket.EventEmitter.emit (events.js:95:17)
at Socket. (_stream_readable.js:720:14)
at Socket.EventEmitter.emit (events.js:92:17)
```

This patch fixes this problem.