$Log$
+ Revision 590.123 2002/03/03 06:31:58 ajc
+ * Added password starred-out entry to newprompt() and strprompt()
+ * Applied the above setting to password set/change in <.A>ide <U>seredit
+
Revision 590.122 2002/03/03 06:18:45 ajc
* Implemented the CREU server command to administratively create user accounts
* Added the ability to create new user accounts to <.A>ide <U>seredit
Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
* Initial CVS import
-
*/
void strprompt(char *prompt, char *str, int len)
{
+ int i;
char buf[128];
+
print_express();
color(DIM_WHITE);
scr_printf("%s ", prompt);
color(DIM_MAGENTA);
scr_printf("[");
color(BRIGHT_MAGENTA);
- scr_printf("%s", str);
+
+ if (len >= 0) {
+ scr_printf("%s", str);
+ }
+ else {
+ for (i=0; i<strlen(str); ++i) {
+ scr_printf("*");
+ }
+ }
+
color(DIM_MAGENTA);
scr_printf("]");
color(DIM_WHITE);
long usernum;
time_t lastcall;
int userpurge;
+ int newnow = 0;
newprompt("User name: ",who,25);
AGUP: sprintf(buf,"AGUP %s",who);
sprintf(buf, "CREU %s", who);
serv_puts(buf);
serv_gets(buf);
- if (buf[0] == '2') goto AGUP;
+ if (buf[0] == '2') {
+ newnow = 1;
+ goto AGUP;
+ }
scr_printf("%s\n",&buf[4]);
return;
}
userpurge = extract_int(&buf[4], 8);
val_user(who, 0); /* Display registration */
- if (boolprompt("Change password", 0)) {
- strprompt("Password", pass, 19);
+
+ if (newnow) {
+ newprompt("Password: ", pass, -19);
}
+ else if (boolprompt("Change password", 0)) {
+ strprompt("Password", pass, -19);
+ }
+
axlevel = intprompt("Access level", axlevel, 0, 6);
if (boolprompt("Ask user to register again", !(flags & US_REGIS)))
flags &= ~US_REGIS;