{"_id":"nickserv","_rev":"17-d2eee90569fc511d50fb0cf8373b6c2c","name":"nickserv","description":"Communicates with the NickServ IRC service","dist-tags":{"latest":"0.4.4"},"versions":{"0.1.0":{"name":"nickserv","description":"Communicates with the NickServ IRC service","keywords":["irc","nickserv","nick"],"version":"0.1.0","repository":{"type":"git","url":"git://github.com/fent/nickserv.git"},"author":{"name":"Roly Fentanes","url":"https://github.com/fent"},"main":"./lib/nickserv.js","directories":{"lib":"./lib"},"engines":{"node":"*"},"dependencies":{"async":">=0.1.9","sprintf":">=0.1.0"},"devDependencies":{"irc":">=0.2.0","vows":">=0.5.11"},"licenses":[{"type":"MIT","url":"http://github.com/fent/nickserv/raw/master/LICENSE"}],"_npmJsonOpts":{"file":"/home/mapel/.npm/nickserv/0.1.0/package/package.json","wscript":false,"contributors":false,"serverjs":false},"_id":"nickserv@0.1.0","_engineSupported":true,"_npmVersion":"1.0.25","_nodeVersion":"v0.4.10","_defaultsLoaded":true,"dist":{"shasum":"d5269346b33beb4a09fcaa0833827001468f4703","tarball":"https://registry.npmjs.org/nickserv/-/nickserv-0.1.0.tgz","integrity":"sha512-E69MmZDpbhN6pxlGSKByTnwr2wHCJAeVmHPsmGRl/2j43kHoguVJajiscjnDkhLjkq94WyiRA933z6cr13irSA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDhWIJCsqiww8Ri/vjzFAz1PmmV4jyZbKoLiZ7mw6UDuwIhAKuZrR3Wipobpoot0dZ4ZB8rO65rLDi7RhKoyRtV5vuG"}]},"scripts":{},"maintainers":[{"name":"neat","email":"roly426@gmail.com"}]},"0.2.0":{"name":"nickserv","description":"Communicates with the NickServ IRC service","keywords":["irc","nickserv","nick"],"version":"0.2.0","repository":{"type":"git","url":"git://github.com/fent/nickserv.git"},"author":{"name":"Roly Fentanes","url":"https://github.com/fent"},"main":"./lib/nickserv.js","directories":{"lib":"./lib"},"engines":{"node":"*"},"dependencies":{"async":">=0.1.9","sprintf":">=0.1.0"},"devDependencies":{"irc":">=0.2.0","vows":">=0.5.11","optimist":">=0.2.6"},"licenses":[{"type":"MIT","url":"http://github.com/fent/nickserv/raw/master/LICENSE"}],"_npmJsonOpts":{"file":"/home/mapel/.npm/nickserv/0.2.0/package/package.json","wscript":false,"contributors":false,"serverjs":false},"_id":"nickserv@0.2.0","_engineSupported":true,"_npmVersion":"1.0.25","_nodeVersion":"v0.4.10","_defaultsLoaded":true,"dist":{"shasum":"38f0f49e25852fc58a99a4a6314f9be5f3b631d5","tarball":"https://registry.npmjs.org/nickserv/-/nickserv-0.2.0.tgz","integrity":"sha512-A9sxapDARoyxJYDqZ2gQsiBnNgcboiF/cboJlXFttmi/HNx1849U/dKnQ2N7r3M0Phu2jBj6QkFi4vG154vK4w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICj+9trKSLSHjmMqn4i9ryXspi5Z3LNrRpKIO7OEcrIFAiEA+QagrCmaZ6WcHJO+5n4FQ9kTL4+yBuZzws01dMxH6bo="}]},"scripts":{},"maintainers":[{"name":"neat","email":"roly426@gmail.com"}]},"0.3.0":{"name":"nickserv","description":"Communicates with the NickServ IRC service","keywords":["irc","nickserv","nick"],"version":"0.3.0","repository":{"type":"git","url":"git://github.com/fent/nickserv.git"},"author":{"name":"Roly Fentanes","url":"https://github.com/fent"},"main":"./lib/nickserv.js","scripts":{"test":"vows test/test.js --spec --logic"},"directories":{"lib":"./lib"},"engines":{"node":"*"},"dependencies":{"sprintf":">=0.1.0"},"devDependencies":{"irc":"0.3.x","vows":">=0.5.11","optimist":"0.2.x"},"licenses":[{"type":"MIT","url":"http://github.com/fent/nickserv/raw/master/LICENSE"}],"_npmUser":{"name":"neat","email":"roly426@gmail.com"},"_id":"nickserv@0.3.0","_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.6.2","_defaultsLoaded":true,"dist":{"shasum":"1fb62fa0ba62c0a1f4c5f52b6aed5e1080e2c7be","tarball":"https://registry.npmjs.org/nickserv/-/nickserv-0.3.0.tgz","integrity":"sha512-j2Bagr5w5HEhWHxoWHuG127JmOkoLdTahgn42hRr2if2jFjcFOeWckAQHH4g1Tkbqqp4ouerepWqtb/6CTzTAw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGbJKp3mMJYxhlo5EnVdKE2MVZJYKIW3AzSzc9qDOFuDAiEA9zj7RjDaxKc4L4JQ6NrgGBtH+WauNiT5ep0RjdrDOyU="}]},"maintainers":[{"name":"neat","email":"roly426@gmail.com"}]},"0.4.0":{"name":"nickserv","description":"Communicates with the NickServ IRC service","keywords":["irc","nickserv","nick"],"version":"0.4.0","repository":{"type":"git","url":"git://github.com/fent/nickserv.git"},"author":{"name":"Roly Fentanes","url":"https://github.com/fent"},"main":"./lib/nickserv.js","scripts":{"test":"vows test/test.js --spec --logic"},"directories":{"lib":"./lib"},"dependencies":{"sprintf":"~0.1.1"},"devDependencies":{"irc":"~0.3.3","nickie":"~0.1.0","optimist":"~0.6.1","vows":"~0.7.0","writestreamp":"~0.1.0"},"licenses":[{"type":"MIT","url":"http://github.com/fent/nickserv/raw/master/LICENSE"}],"bugs":{"url":"https://github.com/fent/nickserv/issues"},"homepage":"https://github.com/fent/nickserv","_id":"nickserv@0.4.0","_shasum":"a2131195064276ff944b6735d519fbd3ef7ee1b6","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"fent","email":"roly426@gmail.com"},"maintainers":[{"name":"fent","email":"roly426@gmail.com"}],"dist":{"shasum":"a2131195064276ff944b6735d519fbd3ef7ee1b6","tarball":"https://registry.npmjs.org/nickserv/-/nickserv-0.4.0.tgz","integrity":"sha512-P2oCvDcY3P8yEA2PcC4/OKKEhHDW1WKqEp9lHKnCDVRZe7+9D3A5/YTNSsS5+PaMWnn8Wn2ser4slmbzZdwC0A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBLeennTNUXOXQSHEWq0uZmm4TTE9QYTOQQVLLzNS6iUAiAX1hOWV99tuJYthKuuVmSYI6NoM+3VkNScEUmDOJMgOA=="}]}},"0.4.1":{"name":"nickserv","description":"Communicates with the NickServ IRC service","keywords":["irc","nickserv","nick"],"version":"0.4.1","repository":{"type":"git","url":"git://github.com/fent/nickserv.git"},"author":{"name":"Roly Fentanes","url":"https://github.com/fent"},"main":"./lib/nickserv.js","scripts":{"test":"vows test/test.js --spec --logic"},"directories":{"lib":"./lib"},"dependencies":{"sprintf":"~0.1.1"},"devDependencies":{"irc":"~0.3.3","nickie":"~0.1.0","optimist":"~0.6.1","vows":"~0.7.0","writestreamp":"~0.1.0"},"licenses":[{"type":"MIT","url":"http://github.com/fent/nickserv/raw/master/LICENSE"}],"gitHead":"b967ff1350b398c5eca04c5d7f3a7d2e2c9fb81f","bugs":{"url":"https://github.com/fent/nickserv/issues"},"homepage":"https://github.com/fent/nickserv#readme","_id":"nickserv@0.4.1","_shasum":"b5d63646933279e07c92361d389c9e109a01c247","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.2","_npmUser":{"name":"fent","email":"roly426@gmail.com"},"maintainers":[{"name":"fent","email":"roly426@gmail.com"}],"dist":{"shasum":"b5d63646933279e07c92361d389c9e109a01c247","tarball":"https://registry.npmjs.org/nickserv/-/nickserv-0.4.1.tgz","integrity":"sha512-CNPdxSTG2HwST86LbJXMu/ta6zoZVLAzg28jhDqaCvwXi01Xb64UlB5duW3G3ESFTMCUxyV6JgrGunsVx/b6Pg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCkMstwxwjCUGmluX/B5sNHMfw5IEkT6zi78XvQ9Um/LAIgKOwo26IKTeXZULexngtc7UDUW+vShV8cyyrqXKZLF1Q="}]}},"0.4.2":{"name":"nickserv","description":"Communicates with the NickServ IRC service","keywords":["irc","nickserv","nick"],"version":"0.4.2","repository":{"type":"git","url":"git://github.com/fent/nickserv.git"},"author":{"name":"Roly Fentanes","url":"https://github.com/fent"},"main":"./lib/nickserv.js","scripts":{"test":"istanbul cover vows -- --spec --logic test/test.js"},"directories":{"lib":"./lib"},"dependencies":{"sprintf":"~0.1.1"},"devDependencies":{"istanbul":"*","irc":"~0.5.0","nickie":"~0.1.0","optimist":"~0.6.1","vows":"~0.8.1","writestreamp":"~0.1.0"},"license":"MIT","gitHead":"201a78a63475c26df1cd480aaf68527e34a86421","bugs":{"url":"https://github.com/fent/nickserv/issues"},"homepage":"https://github.com/fent/nickserv#readme","_id":"nickserv@0.4.2","_shasum":"8cedd180962d4d2914e8e8393e1e1145d65aa45e","_from":".","_npmVersion":"3.10.8","_nodeVersion":"6.9.1","_npmUser":{"name":"fent","email":"roly426@gmail.com"},"maintainers":[{"name":"fent","email":"roly426@gmail.com"}],"dist":{"shasum":"8cedd180962d4d2914e8e8393e1e1145d65aa45e","tarball":"https://registry.npmjs.org/nickserv/-/nickserv-0.4.2.tgz","integrity":"sha512-BHRnwzn7SykdcYPx3qWw4E27GEsHNgGiOlMRcoJy/m83vBcZpCAt4tItWSHhhhJ4Ex4YLghPr4V0lbbygyWFAg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCNBleiVHtdmvBwcaXs7d4P59TO3tUGKsNgZzW/AUlLAwIhAKUTDsrynU0koiKXjGj6ZwahQC0EhH9w23VN0pQ4SATN"}]},"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/nickserv-0.4.2.tgz_1480907377936_0.8642091951332986"}},"0.4.3":{"name":"nickserv","description":"Communicates with the NickServ IRC service","keywords":["irc","nickserv","nick"],"version":"0.4.3","repository":{"type":"git","url":"git://github.com/fent/nickserv.git"},"author":{"name":"Roly Fentanes","url":"https://github.com/fent"},"main":"./lib/nickserv.js","scripts":{"test":"istanbul cover vows -- --spec --logic test/test.js"},"directories":{"lib":"./lib"},"dependencies":{"sprintf":"~0.1.1"},"devDependencies":{"istanbul":"*","irc":"~0.5.0","nickie":"~0.2.0","optimist":"~0.6.1","vows":"~0.8.1","writestreamp":"~0.1.0"},"license":"MIT","gitHead":"3bff5eda1fc2351a78454e686ecf4f677d16689a","bugs":{"url":"https://github.com/fent/nickserv/issues"},"homepage":"https://github.com/fent/nickserv#readme","_id":"nickserv@0.4.3","_shasum":"590b3826abec53a9cef43a76a225ce708a25c713","_from":".","_npmVersion":"4.1.2","_nodeVersion":"7.5.0","_npmUser":{"name":"fent","email":"roly426@gmail.com"},"maintainers":[{"name":"fent","email":"roly426@gmail.com"}],"dist":{"shasum":"590b3826abec53a9cef43a76a225ce708a25c713","tarball":"https://registry.npmjs.org/nickserv/-/nickserv-0.4.3.tgz","integrity":"sha512-n92Ey4paFxtcQKJbL4pp+rUvg8ZlAFSQO7PFjHmjV15q4txR10FLKrgCpmA3VVLnCWalJwZrFd8i8mfirmyafw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDpzTcIOY6VjXMkzKwPvYy3y1nUCMh5SEXDZBTZn5NKtgIhALECE4Z9yzrzuYmV8/exKJip5i3ebcOfdGQQq7Ji4veM"}]},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/nickserv-0.4.3.tgz_1488291746559_0.0030785086564719677"}},"0.4.4":{"name":"nickserv","description":"Communicates with the NickServ IRC service","keywords":["irc","nickserv","nick"],"version":"0.4.4","repository":{"type":"git","url":"git://github.com/fent/nickserv.git"},"author":{"name":"Roly Fentanes","url":"https://github.com/fent"},"main":"./lib/nickserv.js","scripts":{"test":"istanbul cover vows -- --spec --logic test/test.js"},"directories":{"lib":"./lib"},"dependencies":{"sprintf":"~0.1.1"},"devDependencies":{"istanbul":"*","irc":"~0.5.0","nickie":"~0.2.0","optimist":"~0.6.1","vows":"~0.8.1","writestreamp":"~0.1.0"},"engines":{"node":">=0.12"},"license":"MIT","gitHead":"be9a6aca3b49b4717a368bbbc2193b858286808f","bugs":{"url":"https://github.com/fent/nickserv/issues"},"homepage":"https://github.com/fent/nickserv#readme","_id":"nickserv@0.4.4","_shasum":"18fa5246891fff26f0d347ecf0dbacd75e1aeb4b","_from":".","_npmVersion":"4.1.2","_nodeVersion":"7.5.0","_npmUser":{"name":"fent","email":"roly426@gmail.com"},"maintainers":[{"name":"fent","email":"roly426@gmail.com"}],"dist":{"shasum":"18fa5246891fff26f0d347ecf0dbacd75e1aeb4b","tarball":"https://registry.npmjs.org/nickserv/-/nickserv-0.4.4.tgz","integrity":"sha512-DA16Vh2kEL+63Y1lstLCt0JaaO4FNn8UOSR1d5Sk8q9mGDPNX7L5/NfjED/WtnPANLDSHTDxBUfKdCN35jQY1Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC14mzkoV2yf3iSZ92TME+qZRT4H2Yi1JdaWoRZuLAGEwIhAOOJZ3J1T3QaeLZq/L7mqHL+s2sEJGh4v1j7r64L/5N3"}]},"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/nickserv-0.4.4.tgz_1488331969359_0.5433929027058184"}}},"maintainers":[{"name":"fent","email":"roly426@gmail.com"}],"time":{"modified":"2022-06-21T09:11:59.156Z","created":"2011-09-27T10:05:52.728Z","0.1.0":"2011-09-27T10:05:54.193Z","0.2.0":"2011-09-29T13:24:41.722Z","0.3.0":"2011-11-24T08:42:02.879Z","0.4.0":"2014-05-13T02:30:36.423Z","0.4.1":"2015-12-05T16:49:20.913Z","0.4.2":"2016-12-05T03:09:38.828Z","0.4.3":"2017-02-28T14:22:28.541Z","0.4.4":"2017-03-01T01:32:50.011Z"},"author":{"name":"Roly Fentanes","url":"https://github.com/fent"},"repository":{"type":"git","url":"git://github.com/fent/nickserv.git"},"readme":"# nickserv\n\nProvides shortcuts for communicating with NickServ in irc servers.\n\n[![Build Status](https://secure.travis-ci.org/fent/nickserv.svg)](http://travis-ci.org/fent/nickserv)\n[![Dependency Status](https://david-dm.org/fent/nickserv.svg)](https://david-dm.org/fent/nickserv)\n[![codecov](https://codecov.io/gh/fent/nickserv/branch/master/graph/badge.svg)](https://codecov.io/gh/fent/nickserv)\n\n# Usage\n\n```javascript\nvar irc = require('irc');\nvar NickServ = require('nickserv');\n\n// Initialize irc client.\nvar client = new irc.Client('irc.freenode.net', 'mynick');\n\n// Use nickserv to handle communication between\nvar nickserv = new NickServ('mynick', {\n  password: 'hunter2',\n  email: 'my@mail.com'\n});\n\nnickserv.attach('irc', client);\n\n// callback will get called when nick is identified/registered\nnickserv.ready(function(err) {\n  if (err) throw err;\n  console.log('I am ready!');\n  client.join('#channel');\n});\n```\n\nThe cool thing about the `ready` function is that if a password is provided, it will check if the nick is registered, if it is it will try to identify it with NickServ. If it's not registered and an email was provided as well, it will try to register the nick with the given password and email.\n\n\n# API\n\n### new NickServ(nick, [options])\n\n`options` can be a hash with `password` and `email` that can optionally be used later with `identify`, `register`, and the `ready` functions.\n\nNickserv has functions that help communicate with the IRC NickServ service. If a function is called several times in a row, the nickserv command will be sent as soon as it's called, but it will queue the responses to the corresponding commands.\n\n### NickServ#isIdentified()\n\nReturns wether or not the current nick has been identified.\n\n### NickServ#isRegistered([nick], [callback(err, registered)])\n\nChecks if the given nick is registered. If no arguments passed, it becomes synchronous and returns wether or not the current nick is registered. Note that synchronous version relies on knowing if `isRegistered()`, `identify()`, or `register()` have already been called.\n\n### NickServ#info([nick], [callback(err, info)])\n\nGets info from the given nick. If `nick` is not given, uses current client nick. `info` object looks like\n\n    {\n      nick: 'nickbot',\n      realname: 'nodebot',\n      online: true,\n      host: 'nickbot@some.IP',\n      registered: 'Sep 28 08:43:08 2011 CEST',\n      lastquitmsg: 'Ping timeout: 121 seconds',\n      email: 'nick@gmail.com',\n      options: ['Security', 'Private', 'Auto-op']\n    }\n\n### NickServ#identify(password, [callback(err)])\n\nIdentifies current client nick with the given password.\n\n### NickServ#logout([callback(err)])\n\nReverses the effect of `identify()`.\n\n### NickServ#register(password, email, [callback(err)])\n\nRegisters the current client nick with the given password and email. Some servers require you to be using your nick for some time before it can be registered. In that case, `register()` will wait and call itself again.\n\n### NickServ#drop([nick], [callback(err)])\n\nDrops a nick, making it available to be registered again by anyone. If `nick` is not specified, will drop current client nick.\n\n### NickServ#verify(nick, key, [callback(err)])\n\nVerifies registraton for the given nick with the given key.\n\n### NickServ#setPassword(password, callback(err))\n\nSet the current client nick password with given password.\n\n### NickServ#send(command, [args...])\n\nSends a command to NickServ. Use this if a command you want to use hasn't been covered by one of the other functions yet.\n\n### NickServ#ready([options], [callback(err)])\n\nIf password is given, checks if current nickname is registered. If it's registered, tries to identify. If nick is not registered and email is given, tries to register. When it's all finished and ready, calls `callback`. Providing `options` will use that object to get password and email instead of the one from the constructor.\n\n\n## Events\n\nThe nickserv object emits a handful events to help you track what it's currently doing or if you prefer to use emitters to callbacks.\n\n### Event: 'checkingregistered'\n\n`isRegistered()` is called.\n\n### Event: 'isregistered'\n* `boolean` - True if nick is registered.\n* `string` - Nick.\n\n`isRegistered()` is finished.\n\n### Event: 'gettinginfo'\n\n`info()` is called\n\n### Event: 'info'\n* `Object` - Info.\n\n`info()` finished getting info successfully.\n\n### Event: 'identifying'\n\n`identify()` is called.\n\n### Event: 'identified'\n\n`identify()` successfully finished.\n\n### Event: 'loggingout'\n\n`logout()` is called.\n\n### Event: 'loggedout'\n\n`logout()` finished.\n\n### Event: 'registering'\n\n`register()` is called.\n\n### Event: 'registered'\n\n`register()` successfully finished.\n\n### Event: 'dropping'\n\n`drop()` is called.\n\n### Event 'dropped'\n\n`drop()` successfully finished.\n\n### Event: 'verifying'\n\n`verifyRegistration()` is called.\n\n### Event: 'verified'\n\n`verifyRegistration()` successfully finished.\n\n### Event: 'settingpassword'\n\n`setPassword()` is called.\n\n### Event: 'passwordset'\n\n`setPassword()` successfully finished.\n\n### Event: 'notice'\n* `string` - Notice.\n\nEmitted when NickServ sends a notice.\n\n### Event: 'send'\n* `string` - Message.\n\nEmitted when client sends a message to NickServ through this module.\n\n\n# Install\n\n    npm install nickserv\n\n\n# Tests\n\nThis module is hard to test because there are various NickServ software that every IRC server uses. Each one of them has slightly different responses to the functions they provide, and some provide more/less functionality. Running the tests helps to know if this module will work with a server. If it doesn't, it helps make it work.\n\nAll tests are written with [vows](http://vowsjs.org/) and can be run with [npm](http://npmjs.org/)\n\n```bash\nnpm test\n```\n\nor directly through vows for more control\n\n```bash\nvows test/test.js --spec --server=irc.freenode.net\n```\n\nDuring testing, log files will be created under `/test/logs`. Logs are useful to figure out exactly what is being sent to and received from NickServ.\n\nIf you don't want to test this against a server, use the `--logic` flag with vows and a mock irc server will be created. This will be much faster and is meant to test only the logic behind nickserv. As oppose to testing what is being sent and received.\n\n\n# License\n\nMIT\n","homepage":"https://github.com/fent/nickserv#readme","keywords":["irc","nickserv","nick"],"bugs":{"url":"https://github.com/fent/nickserv/issues"},"readmeFilename":"README.md","license":"MIT"}