]> code.citadel.org Git - citadel.git/commitdiff
added more stuff to <.A>ide <E>dit user
authorArt Cancro <ajc@citadel.org>
Tue, 10 Nov 1998 00:41:17 +0000 (00:41 +0000)
committerArt Cancro <ajc@citadel.org>
Tue, 10 Nov 1998 00:41:17 +0000 (00:41 +0000)
citadel/ChangeLog
citadel/routines.c
citadel/user_ops.c

index dc4066200995eff0bf63b367c3d2653161a5b6b4..d04447df0ad7ac176b3b16d6e7bdad5fa328872c 100644 (file)
@@ -2,6 +2,7 @@ Mon Nov  9 19:15:31 EST 1998 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
        * serv_upgrade.c: added all missing fields to export/import
        * serv_expire.c: support per-user purge time when purging users
        * user_ops.c: added per-user purge time to AGUP and ASUP commands
+       * routines.c: added more stuff to <.A>ide <E>dit user
 
 Sun Nov  8 22:56:53 EST 1998 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
        * serv_expire.c: created; moved message expiry from serv_test.c,
index a66f3dbc843999544607ddedfaef40ea82a3a7ab..0feedb9d8b9907dd32fee5089296cb581e8f7440 100644 (file)
@@ -14,7 +14,8 @@
 #include <signal.h>
 #include <dirent.h>
 #include <errno.h>
-
+#include <time.h>
+#include <limits.h>
 
 #define ROUTINES_C
 
@@ -162,19 +163,51 @@ void hit_any_key(void) {          /* hit any key to continue */
  */
 void edituser(void)
 {
-       char who[256];
        char buf[256];
+       char who[256];
+       char pass[256];
+       int flags;
+       int timescalled;
+       int posted;
+       int axlevel;
+       long usernum;
+       time_t lastcall;
+       int userpurge;
 
        newprompt("User name: ",who,25);
-       sprintf(buf,"QUSR %s",who);
+       sprintf(buf,"AGUP %s",who);
        serv_puts(buf);
        serv_gets(buf);
        if (buf[0]!='2') {
                printf("%s\n",&buf[4]);
                return;
                }
-       
-       val_user(who);
+       extract(who, &buf[4], 0);
+       extract(pass, &buf[4], 1);
+       flags = extract_int(&buf[4], 2);
+       timescalled = extract_int(&buf[4], 3);
+       posted = extract_int(&buf[4], 4);
+       axlevel = extract_int(&buf[4], 5);
+       usernum = extract_long(&buf[4], 6);
+       lastcall = extract_long(&buf[4], 7);
+       userpurge = extract_int(&buf[4], 8);
+
+       val_user(who); /* Display registration, and set access level */
+       strprompt("Password", pass, 19);
+       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);
+       userpurge = intprompt("Purge time (in days, 0 for system default",
+                               userpurge, 0, INT_MAX);
+
+       sprintf(buf, "ASUP %s|%s|%d|%d|%d|%d|%ld|%ld|%d",
+               who, pass, flags, timescalled, posted, axlevel, usernum,
+               lastcall, userpurge);
+       serv_puts(buf);
+       serv_gets(buf);
+       if (buf[0]!='2') {
+               printf("%s\n",&buf[4]);
+               }
        }
 
 
index 569f5f32ed049e8b679aba35de7e55b5ec8299d8..69e0b33022d549992033ff0157b113d5781e8f7e 100644 (file)
@@ -1281,7 +1281,6 @@ void cmd_agup(char *cmdbuf) {
                (int)usbuf.axlevel,
                usbuf.usernum,
                usbuf.USuserpurge);
-
        }