Quieten the user 0 message to the Aide room.
authorDave West <davew@uncensored.citadel.org>
Sat, 5 Apr 2008 19:51:53 +0000 (19:51 +0000)
committerDave West <davew@uncensored.citadel.org>
Sat, 5 Apr 2008 19:51:53 +0000 (19:51 +0000)
User 0 is created as a side effect of the system posting messages from
the masterCC. This side effect has the benefit of recording the number
of messages the system has generated.
Should we make use of this somewhere?
The actual code that creates the user 0 is in CtdlSubmitMsg() and reads
as
        /* Bump this user's messages posted counter. */
        CtdlLogPrintf(CTDL_DEBUG, "Updating user\n");
        lgetuser(&CCC->user, CCC->curr_user);
        CCC->user.posted = CCC->user.posted + 1;
        lputuser(&CCC->user);

Its around msgbase.c:2624

citadel/modules/expire/serv_expire.c

index b494d9755495cd513c6ca5856464cd9f2a0a6047..33d9508e43d009f2b933610746d2444cf71c8ea5 100644 (file)
@@ -443,7 +443,7 @@ void do_user_purge(struct ctdluser *us, void *data) {
        /* User number 0, as well as any negative user number, is
         * also impossible.
         */
-       if (us->usernum < 1L) purge = 1;
+       if (us->usernum < 0L) purge = 1;
        
        /* If the user has no full name entry then we can't purge them
         * since the actual purge can't find them.
@@ -452,18 +452,21 @@ void do_user_purge(struct ctdluser *us, void *data) {
         */
        if (IsEmptyStr(us->fullname))
        {
-               purge=0;
-               if (users_corrupt_msg == NULL)
+               if (us->usernum > 0L)
                {
-                       users_corrupt_msg = malloc(SIZ);
-                       strcpy(users_corrupt_msg, "The auto-purger found the following user numbers with no name.\n"
-                       "Unfortunately the auto-purger is not yet able to fix this problem.\n"
-                       "This problem is not considered serious since a user with no name can\n"
-                       "not log in.\n");
-               }
+                       purge=0;
+                       if (users_corrupt_msg == NULL)
+                       {
+                               users_corrupt_msg = malloc(SIZ);
+                               strcpy(users_corrupt_msg, "The auto-purger found the following user numbers with no name.\n"
+                               "Unfortunately the auto-purger is not yet able to fix this problem.\n"
+                               "This problem is not considered serious since a user with no name can\n"
+                               "not log in.\n");
+                       }
                
-               users_corrupt_msg=realloc(users_corrupt_msg, strlen(users_corrupt_msg)+SIZ);
-               snprintf(&users_corrupt_msg[strlen(users_corrupt_msg)], SIZ, " %ld\n", us->usernum);
+                       users_corrupt_msg=realloc(users_corrupt_msg, strlen(users_corrupt_msg)+SIZ);
+                       snprintf(&users_corrupt_msg[strlen(users_corrupt_msg)], SIZ, " %ld\n", us->usernum);
+               }
        }