$Log$
+ Revision 573.38 2000/12/05 05:32:58 ajc
+ * Added support for non-USA country identities in vCard and registration
+ * User edit now asks whether it should prompt to change the password
+
Revision 573.37 2000/12/03 04:12:21 ajc
* Finished (mostly) the Sleepycat DB backend ... added transaction logging
Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
* Initial CVS import
-
userpurge = extract_int(&buf[4], 8);
val_user(who, 0); /* Display registration */
- strprompt("Password", pass, 19);
+ if (boolprompt("Change password", 0)) {
+ strprompt("Password", pass, 19);
+ }
axlevel = intprompt("Access level", axlevel, 0, 6);
timescalled = intprompt("Times called", timescalled, 0, INT_MAX);
posted = intprompt("Messages posted", posted, 0, INT_MAX);
char tmpzip[256];
char tmpphone[256];
char tmpemail[256];
+ char tmpcountry[256];
int a;
strcpy(tmpname, "");
strcpy(tmpzip, "");
strcpy(tmpphone, "");
strcpy(tmpemail, "");
+ strcpy(tmpcountry, "");
serv_puts("GREG _SELF_");
serv_gets(buf);
strcpy(tmpphone, buf);
if (a == 9)
strcpy(tmpemail, buf);
+ if (a == 10)
+ strcpy(tmpcountry, buf);
++a;
}
}
strprompt("REAL name", tmpname, 29);
strprompt("Address", tmpaddr, 24);
strprompt("City/town", tmpcity, 14);
- strprompt("State", tmpstate, 2);
- strprompt("ZIP Code", tmpzip, 10);
+ strprompt("State/province", tmpstate, 2);
+ strprompt("ZIP/Postal Code", tmpzip, 10);
+ strprompt("Country", tmpcountry, 31);
strprompt("Telephone number", tmpphone, 14);
strprompt("Email address", tmpemail, 31);
serv_puts(tmpzip);
serv_puts(tmpphone);
serv_puts(tmpemail);
+ serv_puts(tmpcountry);
serv_puts("000");
printf("\n");
}
ax = atoi(buf);
if (a == 10)
printf("%s\n", buf);
+ if (a == 11)
+ printf("%s\n", buf);
} while (strcmp(buf, "000"));
printf("Current access level: %d (%s)\n", ax, axdefs[ax]);
} else {
char tmpstate[256];
char tmpzip[256];
char tmpaddress[512];
+ char tmpcountry[256];
if (!(CC->logged_in)) {
cprintf("%d Not logged in.\n",ERROR+NOT_LOGGED_IN);
strcpy(tmpcity, "");
strcpy(tmpstate, "");
strcpy(tmpzip, "");
+ strcpy(tmpcountry, "USA");
cprintf("%d Send registration...\n", SEND_LISTING);
a=0;
}
if (a==5) vcard_set_prop(my_vcard, "tel;home", buf);
if (a==6) vcard_set_prop(my_vcard, "email;internet", buf);
+ if (a==7) strcpy(tmpcountry, buf);
++a;
}
- sprintf(tmpaddress, ";;%s;%s;%s;%s;USA",
- tmpaddr, tmpcity, tmpstate, tmpzip);
+ sprintf(tmpaddress, ";;%s;%s;%s;%s;%s",
+ tmpaddr, tmpcity, tmpstate, tmpzip, tmpcountry);
vcard_set_prop(my_vcard, "adr", tmpaddress);
vcard_write_user(&CC->usersupp, my_vcard);
vcard_free(my_vcard);
s = vcard_get_prop(v, "email;internet", 0);
cprintf("%s\n", s ? s : " ");
+ s = vcard_get_prop(v, "adr", 0);
+ sprintf(adr, "%s", s ? s : " ");/* address... */
+
+ extract_token(buf, adr, 6, ';');
+ cprintf("%s\n", buf); /* country */
cprintf("000\n");
}
Line 8: Telephone number
Line 9: Access level
Line 10: Internet e-mail address
+ Line 11: Country
Users without Aide privileges may retrieve their own registration using
this command. This can be accomplished either by passing the user's own
Line 5: ZIP Code
Line 6: Telephone number
Line 7: e-mail address
+ Line 8: Country
CHEK (CHEcK various things)