]>
jfr.im git - irc/quakenet/newserv.git/blob - chanserv/authcmds/challengeauth.c
1 /* Automatically generated by refactor.pl.
4 * CMDNAME: challengeauth
5 * CMDLEVEL: QCMD_SECURE | QCMD_NOTAUTHED
7 * CMDDESC: Authenticates you on the bot using challenge response.
8 * CMDFUNC: csa_dochallengeauth
9 * CMDPROTO: int csa_dochallengeauth(void *source, int cargc, char **cargv);
12 #include "../chanserv.h"
15 int csa_auth(void *source
, int cargc
, char **cargv
, CRAlgorithm alg
);
17 int csa_dochallengeauth(void *source
, int cargc
, char **cargv
) {
21 nick
*sender
=(nick
*)source
;
24 chanservstdmessage(sender
, QM_NOTENOUGHPARAMS
, "challengeauth");
28 if (!(aup
=getactiveuserfromnick(sender
)))
32 if(t
> aup
->entropyttl
) {
33 chanservstdmessage(sender
, QM_NOCHALLENGE
);
39 alg
= cs_cralgorithm(cargv
[2]);
41 chanservstdmessage(sender
, QM_CHALLENGEBADALGORITHM
);
45 return csa_auth(sender
, cargc
, cargv
, alg
);