martynsmith/node-irc — pull request #165 by shiwano (2013-05-07 15:23:09+00:00)
Title: Fix a crash bug when a zero length message is received

Hello.

When a zero-length PRIVMSG / NOTICE message is sent to an channel that a node-irc bot is present in, it crashes with the following backtrace:

```
/home/shiwano/projects/lo_Ol/node_modules/hubot-irc/node_modules/irc/lib/irc.js:637
throw err;
^
TypeError: Cannot read property '0' of undefined
at Client. (/home/shiwano/projects/lo_Ol/node_modules/hubot-irc/node_modules/irc/lib/irc.js:468:25)
at Client.EventEmitter.emit (events.js:95:17)
at /home/shiwano/projects/lo_Ol/node_modules/hubot-irc/node_modules/irc/lib/irc.js:634:22
at Array.forEach (native)
at CleartextStream. (/home/shiwano/projects/lo_Ol/node_modules/hubot-irc/node_modules/irc/lib/irc.js:631:15)
at CleartextStream.EventEmitter.emit (events.js:95:17)
at CleartextStream. (_stream_readable.js:720:14)
at CleartextStream.EventEmitter.emit (events.js:92:17)
at emitReadable_ (_stream_readable.js:392:10)
at _stream_readable.js:385:7
at process._tickCallback (node.js:415:13)
```

I fixed it. Could you review it? Thanks.