Removed discontinued fields from text client
authorArt Cancro <ajc@citadel.org>
Fri, 16 Jun 2023 15:59:20 +0000 (06:59 -0900)
committerArt Cancro <ajc@citadel.org>
Fri, 16 Jun 2023 15:59:20 +0000 (06:59 -0900)
textclient/citadel.c
textclient/citadel_ipc.c
textclient/routines.c
textclient/textclient.h

index d8f19efdb8469e5a284700bfbc9e49c8d147c2a6..453f21bea86c6bb36736150adc7236a3b99853f0 100644 (file)
@@ -38,8 +38,6 @@ int uglistsize = 0;
 char is_mail = 0;              /* nonzero when we're in a mail room */
 char axlevel = AxDeleted;      /* access level */
 char is_room_aide = 0;         /* boolean flag, 1 if room admin */
-int timescalled;
-int posted;
 unsigned userflags;
 long usernum = 0L;             /* user number */
 time_t lastcall = 0L;          /* Date/time of previous login */
@@ -156,7 +154,7 @@ void userlist(CtdlIPC * ipc, char *patn) {
                return;
        }
 
-       scr_printf("User Name                                                        Last Visit\n");
+       scr_printf("User Name                                                        Last Login\n");
        scr_printf("---------------------------------------------------------------- ----------\n");
        if (listing != NULL)
                while (!IsEmptyStr(listing)) {
@@ -183,8 +181,6 @@ void userlist(CtdlIPC * ipc, char *patn) {
 void load_user_info(char *params) {
        extract_token(fullname, params, 0, '|', sizeof fullname);
        axlevel = extract_int(params, 1);
-       timescalled = extract_int(params, 2);
-       posted = extract_int(params, 3);
        userflags = extract_int(params, 4);
        usernum = extract_long(params, 5);
        lastcall = extract_long(params, 6);
@@ -826,7 +822,7 @@ void read_config(CtdlIPC * ipc) {
        int r;                  /* IPC response code */
        char _fullname[USERNAME_SIZE];
        long _usernum;
-       int _axlevel, _timescalled, _posted;
+       int _axlevel;
        time_t _lastcall;
        struct ctdluser *user = NULL;
 
@@ -840,8 +836,6 @@ void read_config(CtdlIPC * ipc) {
        _usernum = extract_long(buf, 2);
        _axlevel = extract_int(buf, 3);
        _lastcall = extract_long(buf, 4);
-       _timescalled = extract_int(buf, 5);
-       _posted = extract_int(buf, 6);
        free(resp);
        resp = NULL;
 
@@ -854,10 +848,8 @@ void read_config(CtdlIPC * ipc) {
        }
 
        /* show misc user info */
-       scr_printf("%s\nAccess level: %d (%s)\n"
-                  "User #%ld / %d Calls / %d Posts", _fullname, _axlevel, axdefs[(int) _axlevel], _usernum, _timescalled, _posted);
        if (_lastcall > 0L) {
-               scr_printf(" / Curr login: %s", asctime(localtime(&_lastcall)));
+               scr_printf("Last login: %s", asctime(localtime(&_lastcall)));
        }
        scr_printf("\n");
 
@@ -1559,10 +1551,8 @@ int main(int argc, char **argv) {
        }
 
        color(BRIGHT_WHITE);
-       scr_printf("\n%s\nAccess level: %d (%s)\n"
-                  "User #%ld / Login #%d", fullname, axlevel, axdefs[(int) axlevel], usernum, timescalled);
        if (lastcall > 0L) {
-               scr_printf(" / Last login: %s", asctime(localtime(&lastcall)));
+               scr_printf("Last login: %s", asctime(localtime(&lastcall)));
        }
        scr_printf("\n");
 
index 007f8410f254f1e79e9efd7edf2b58746175de60..26d2fa2adba91162d70ede35d6c3599177f5e61d 100644 (file)
@@ -1903,8 +1903,6 @@ int CtdlIPCAideGetUserParameters(CtdlIPC * ipc, const char *who, struct ctdluser
                extract_token(uret[0]->fullname, cret, 0, '|', sizeof uret[0]->fullname);
                extract_token(uret[0]->password, cret, 1, '|', sizeof uret[0]->password);
                uret[0]->flags = extract_int(cret, 2);
-               uret[0]->timescalled = extract_long(cret, 3);
-               uret[0]->posted = extract_long(cret, 4);
                uret[0]->axlevel = extract_int(cret, 5);
                uret[0]->usernum = extract_long(cret, 6);
                uret[0]->lastcall = extract_long(cret, 7);
@@ -1928,9 +1926,9 @@ int CtdlIPCAideSetUserParameters(CtdlIPC * ipc, const struct ctdluser *uret, cha
        if (!aaa)
                return -1;
 
-       sprintf(aaa, "ASUP %s|%s|%d|%ld|%ld|%d|%ld|%ld|%d",
-               uret->fullname, uret->password, uret->flags, uret->timescalled,
-               uret->posted, uret->axlevel, uret->usernum, uret->lastcall, uret->USuserpurge);
+       sprintf(aaa, "ASUP %s|%s|%d|0|0|%d|%ld|%ld|%d",
+               uret->fullname, uret->password, uret->flags,
+               uret->axlevel, uret->usernum, uret->lastcall, uret->USuserpurge);
        ret = CtdlIPCGenericCommand(ipc, aaa, NULL, 0, NULL, NULL, cret);
        free(aaa);
        return ret;
index 1dff2b7d1003a464932e2dabf01b23443a236169..3a04cbe7c15d16bed2a3313a0e29c7d269077b04 100644 (file)
@@ -218,8 +218,6 @@ void edituser(CtdlIPC * ipc, int cmd) {
                else {
                        user->flags |= US_REGIS;
                }
-               user->timescalled = intprompt("Times called", user->timescalled, 0, INT_MAX);
-               user->posted = intprompt("Messages posted", user->posted, 0, INT_MAX);
                user->lastcall = boolprompt("Set last login to now", 0) ? time(NULL) : user->lastcall;
                user->USuserpurge = intprompt("Purge time (in days, 0 for system default", user->USuserpurge, 0, INT_MAX);
        }
index 5d92a72a598034eb0de1f10633f69097fd0c62f5..6dd5889ca99de67be5908c93b394017f24a806bf 100644 (file)
@@ -232,8 +232,6 @@ struct ctdluser {                   // User record
        uid_t uid;                      // Associate with a unix account?
        char password[32];              // password
        unsigned flags;                 // See US_ flags below
-       long timescalled;               // Total number of logins
-       long posted;                    // Number of messages ever submitted
        uint8_t axlevel;                // Access level
        long usernum;                   // User number (never recycled)
        time_t lastcall;                // Date/time of most recent login