* CMDDESC: Returns a challenge for use in challengeauth.
* CMDFUNC: csa_dochallenge
* CMDPROTO: int csa_dochallenge(void *source, int cargc, char **cargv);
+ * CMDHELP: Usage: challenge
+ * CMDHELP: Supplies you with a challenge and a list of algorithms accepted
+ * CMDHELP: for challenge response authentication, see CHALLENGEAUTH help
+ * CMDHELP: for more details.
*/
#include "../chanserv.h"
* CMDDESC: Authenticates you on the bot using challenge response.
* CMDFUNC: csa_dochallengeauth
* CMDPROTO: int csa_dochallengeauth(void *source, int cargc, char **cargv);
+ * CMDHELP: Usage: challengeauth <username> <response> <hmac algorithm>
+ * CMDHELP: Authenticates using challenge response.
+ * CMDHELP: To generate the response from the challenge, calculate the following:
+ * CMDHELP: HMAC(challenge){k}
+ * CMDHELP: where HMAC is the hash message authentication code as described in
+ * CMDHELP: RFC 2104, k is HEXDIGEST(<lower case username>:HEXDIGEST(<password>))
+ * CMDHELP: and HEXDIGEST is the hash function used in the MAC construction.
+ * CMDHELP: For example code see the website.
*/
#include "../chanserv.h"
void _init() {
chanservaddcommand("auth", QCMD_ALIAS | QCMD_SECURE | QCMD_NOTAUTHED, 2, csa_doauth, "Authenticates you on the bot.", "");
chanservaddcommand("authhistory", QCMD_AUTHED, 1, csa_doauthhistory, "View auth history for an account.", "");
- chanservaddcommand("challenge", QCMD_SECURE | QCMD_NOTAUTHED, 0, csa_dochallenge, "Returns a challenge for use in challengeauth.", "");
- chanservaddcommand("challengeauth", QCMD_SECURE | QCMD_NOTAUTHED, 3, csa_dochallengeauth, "Authenticates you on the bot using challenge response.", "");
+ chanservaddcommand("challenge", QCMD_SECURE | QCMD_NOTAUTHED, 0, csa_dochallenge, "Returns a challenge for use in challengeauth.", "Usage: challenge\nSupplies you with a challenge and a list of algorithms accepted\nfor challenge response authentication, see CHALLENGEAUTH help\nfor more details.\n");
+ chanservaddcommand("challengeauth", QCMD_SECURE | QCMD_NOTAUTHED, 3, csa_dochallengeauth, "Authenticates you on the bot using challenge response.", "Usage: challengeauth <username> <response> <hmac algorithm>\nAuthenticates using challenge response.\nTo generate the response from the challenge, calculate the following:\n HMAC(challenge){k}\nwhere HMAC is the hash message authentication code as described in\nRFC 2104, k is HEXDIGEST(<lower case username>:HEXDIGEST(<password>))\nand HEXDIGEST is the hash function used in the MAC construction.\nFor example code see the website.\n");
chanservaddcommand("checkhashpass", QCMD_OPER, 3, csa_docheckhashpass, "Checks supplied password against a version hashed in the database.", "");
chanservaddcommand("email", QCMD_SECURE | QCMD_AUTHED, 3, csa_doemail, "Change your email address.", "");
chanservaddcommand("getpassword", QCMD_OPER, 2, csa_dogetpw, "Gets a users password", "");