3
0
mirror of https://github.com/reality/dbot.git synced 2024-11-23 20:39:25 +01:00
dbot/modules/nickserv
2013-05-10 11:48:52 +00:00
..
config.json add link to nickserv dox[#352] 2013-05-10 11:48:52 +00:00
nickserv.js command can use nickserv [#421] 2013-04-23 19:07:23 +00:00
README.md docs for nickserv module [#351][#352] 2013-05-10 11:45:38 +00:00

Nickserv

Check nick authentication with nickserv.

Description

This module provides an API function which allows you to check the authentication status of a given nick. This is useful for checking that someone is actually who they say they are, and not an imposter; for example, this API function will be used in the command module to check if a user is authed before running commands which require elevated access (if the useNickserv configuration option is set).

Configuration

Servers

This is a data structure which allows you to define the data behaviour for nickservs on various different servers.

_nc_: {
    _matcher_: This is a regular expression which will be used to match login
    status responses from nickserv.
    _acceptableState_: The numeric response from nickserv which will be
    accepted as meaning the user is authenticated.
    _infoCommand_: The command to be sent to nickserv inquiring about user
    authentication status.
}

The server name should match that of the one configured in the main DBot config.json file. Also note that the name of the services bot these commands will be sent to will also be taken from the nickserv configuration option in the server definition in the main config file.

API

auth(server, nick, callback)

This will send a message to the configured nickserv bot inquiring as to the login status of the given user. The callback will be called with one argument, true or false depending on the nickservs response as to whether the nick is authed or not.