void addnewuser(formfield *fields, int count) { formfield *name, *passwd1, *passwd2, *dispname, *ref, *email; name=findfield("name",fields,count); passwd1=findfield("passwd1",fields,count); passwd2=findfield("passwd2",fields,count); dispname=findfield("dispname",fields,count); email=findfield("email",fields,count); ref=findfield("ref",fields,count); if((name==NULL) || (passwd1==NULL) || (passwd2==NULL) || (dispname==NULL) || (email==NULL) || (ref==NULL)) { printf("wrong format\n"); return; } if(userexist(name->data) || tempuserexist(name->data)) { printf("the username was taken. . . please try again\n"); return; } if(verifyinfo(name->data, passwd1->data, passwd2->data, dispname->data, email->data, ref->data)) { filterstring(ref->data); addtempuserinfo(name->data, passwd1->data, dispname->data, "", email->data, ref->data); printf("your account information has been received. you will get an email after it is activated, so please wait. this process should take a while. so if you want a faster activation, do not be afraid to send us an e-mail. <a href=\"index.html\">[return to webboard]</a>\n"); } }
void addauth(char *name, char *flags, char *pubkey, char *email) { string authname; if(filterstring(authname, name, true, true, true, true, 100)) name = authname; if(authusers.access(name)) { conoutf("auth handle '%s' already exists, skipping (%s)", name, email); return; } name = newstring(name); authuser &u = authusers[name]; u.name = name; u.flags = newstring(flags); u.pubkey = parsepubkey(pubkey); u.email = newstring(email); }