{"action":"created","issue":{"url":"https://api.github.com/repos/martynsmith/node-irc/issues/419","labels_url":"https://api.github.com/repos/martynsmith/node-irc/issues/419/labels{/name}","comments_url":"https://api.github.com/repos/martynsmith/node-irc/issues/419/comments","events_url":"https://api.github.com/repos/martynsmith/node-irc/issues/419/events","html_url":"https://github.com/martynsmith/node-irc/issues/419","id":113065893,"number":419,"title":"maxLineLength is not set by default and can crash the bot","user":{"login":"swichers","id":5890607,"avatar_url":"https://avatars.githubusercontent.com/u/5890607?v=3","gravatar_id":"","url":"https://api.github.com/users/swichers","html_url":"https://github.com/swichers","followers_url":"https://api.github.com/users/swichers/followers","following_url":"https://api.github.com/users/swichers/following{/other_user}","gists_url":"https://api.github.com/users/swichers/gists{/gist_id}","starred_url":"https://api.github.com/users/swichers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swichers/subscriptions","organizations_url":"https://api.github.com/users/swichers/orgs","repos_url":"https://api.github.com/users/swichers/repos","events_url":"https://api.github.com/users/swichers/events{/privacy}","received_events_url":"https://api.github.com/users/swichers/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":13,"created_at":"2015-10-23T17:39:59Z","updated_at":"2015-10-26T18:31:23Z","closed_at":null,"body":"If you connect with the bot and try to send something before _updateMaxLineLength is called then the bot will crash. This code should duplicate the problem by trying to message NickServ before _updateMaxLineLength has been called.\r\n\r\n```javascript\r\nvar irc = require('irc');\r\nvar NickServ = require('nickserv');\r\n\r\nvar bot = new irc.Client('irc.example.com',\r\n  'registerednick', {\r\n  channels: ['#example'],\r\n});\r\n\r\nvar nickserv = new NickServ('registerednick', {\r\n  password: 'password',\r\n  email: 'example@example.com',\r\n});\r\nnickserv.attach('irc', bot);\r\n\r\nnickserv.ready(function(err) {\r\n  if (err) throw err;\r\n});\r\n```"},"comment":{"url":"https://api.github.com/repos/martynsmith/node-irc/issues/comments/151240182","html_url":"https://github.com/martynsmith/node-irc/issues/419#issuecomment-151240182","issue_url":"https://api.github.com/repos/martynsmith/node-irc/issues/419","id":151240182,"user":{"login":"Jnull","id":3529087,"avatar_url":"https://avatars.githubusercontent.com/u/3529087?v=3","gravatar_id":"","url":"https://api.github.com/users/Jnull","html_url":"https://github.com/Jnull","followers_url":"https://api.github.com/users/Jnull/followers","following_url":"https://api.github.com/users/Jnull/following{/other_user}","gists_url":"https://api.github.com/users/Jnull/gists{/gist_id}","starred_url":"https://api.github.com/users/Jnull/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jnull/subscriptions","organizations_url":"https://api.github.com/users/Jnull/orgs","repos_url":"https://api.github.com/users/Jnull/repos","events_url":"https://api.github.com/users/Jnull/events{/privacy}","received_events_url":"https://api.github.com/users/Jnull/received_events","type":"User","site_admin":false},"created_at":"2015-10-26T18:31:23Z","updated_at":"2015-10-26T18:31:23Z","body":"I actually prefer a noisy crash because it reminds us that something isn't perfect, but a silent crash will become much, much more frustrating to troubleshoot for the users.\r\n\r\nI think this is an overdue enhancement for all commands to gracefully fail #421. "}}