* CMDDESC: Creates a new user account.
* CMDFUNC: csa_dohello
* CMDPROTO: int csa_dohello(void *source, int cargc, char **cargv);
+ * CMDHELP: Usage: HELLO <email> <email>
+ * CMDHELP: Creates a new user account for yourself. Your current nickname will be used
+ * CMDHELP: for the name of the account, and may only contain letters, numbers and
+ * CMDHELP: hyphens (-). An email containing password details will be sent to the email
+ * CMDHELP: address supplied. Where:
+ * CMDHELP: email - your email address. Must be entered the same way both times.
*/
#include "../chanserv.h"
reguser *ruh;
int found=0;
char *dupemail;
+ activeuser *aup;
if (getreguserfromnick(sender))
return CMD_ERROR;
return CMD_ERROR;
}
+ if (!(aup = getactiveuserfromnick(sender)))
+ return CMD_ERROR;
+
+ if (aup->helloattempts > MAXHELLOS) {
+ chanservstdmessage(sender, QM_MAXHELLOLIMIT);
+ return CMD_ERROR;
+ }
+
if (strcmp(cargv[0],cargv[1])) {
chanservstdmessage(sender, QM_EMAILDONTMATCH);
cs_log(sender,"HELLO FAIL username %s email don't match (%s vs %s)",sender->nick,cargv[0],cargv[1]);
}
}
+ aup->helloattempts++;
+
dupemail = strdup(cargv[0]);
local=strchr(dupemail, '@');
*(local++)='\0';