+Tue Jan 19 21:28:29 EST 1999 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
+ * Fixed a bug in the user editing command (client side)
+
Thu Jan 14 21:21:15 EST 1999 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
* Brought over the mime_parser from WebCit and began preliminary work
on supporting MIME format messages.
void sttybbs(int cmd);
void newprompt(char *prompt, char *str, int len);
-void val_user(char *user);
+void val_user(char *, int);
void formout(char *name);
void logoff(int code);
void set_keepalives(int s);
lastcall = extract_long(&buf[4], 7);
userpurge = extract_int(&buf[4], 8);
- val_user(who); /* Display registration, and set access level */
+ val_user(who, 0); /* Display registration */
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);
lastcall = (boolprompt("Set last call to now", 0)?time(NULL):lastcall);
/*
* validate a user
*/
-void val_user(char *user)
+void val_user(char *user, int do_validate)
{
int a;
char cmd[256];
char buf[256];
int ax = 0;
- sprintf(cmd,"GREG %s",user);
+ sprintf(cmd, "GREG %s", user);
serv_puts(cmd);
serv_gets(cmd);
if (cmd[0]=='1') {
do {
serv_gets(buf);
++a;
- if (a==1) printf("User #%s - %s ",
- buf,&cmd[4]);
+ if (a==1) printf("User #%s - %s ", buf, &cmd[4]);
if (a==2) printf("PW: %s\n",buf);
if (a==3) printf("%s\n",buf);
if (a==4) printf("%s\n",buf);
printf("%-30s\n%s\n",user,&cmd[4]);
}
- /* now set the access level */
- ax = intprompt("Access level", ax, 0, 6);
- sprintf(cmd,"VALI %s|%d",user,ax);
- serv_puts(cmd);
- serv_gets(cmd);
- if (cmd[0]!='2') printf("%s\n",&cmd[4]);
+ if (do_validate) {
+ /* now set the access level */
+ ax = intprompt("Access level", ax, 0, 6);
+ sprintf(cmd,"VALI %s|%d",user,ax);
+ serv_puts(cmd);
+ serv_gets(cmd);
+ if (cmd[0]!='2') printf("%s\n",&cmd[4]);
+ }
printf("\n");
}
if (cmd[0]!='3') finished = 1;
if (cmd[0]=='2') printf("%s\n",&cmd[4]);
if (cmd[0]=='3') {
- extract(buf,cmd,0);
- val_user(&buf[4]);
+ extract(buf, cmd, 0);
+ val_user(&buf[4], 1);
}
} while(finished==0);
}