]> code.citadel.org Git - citadel.git/blobdiff - citadel/server/modules/expire/serv_expire.c
utf8ify_rfc822_string() is in libcitadel now
[citadel.git] / citadel / server / modules / expire / serv_expire.c
index ca51edd096b574555028596c80144a84278ea954..e25a184487071c2006753c4d874e593fc33ca19e 100644 (file)
@@ -263,7 +263,6 @@ void DoPurgeRooms(struct ctdlroom *qrbuf, void *data) {
                // Any of these attributes render a room non-purgable
                if (qrbuf->QRflags & QR_PERMANENT) return;
                if (qrbuf->QRflags & QR_DIRECTORY) return;
-               if (qrbuf->QRflags & QR_NETWORK) return;
                if (qrbuf->QRflags2 & QR2_SYSTEM) return;
                if (!strcasecmp(qrbuf->QRname, SYSCONFIGROOM)) return;
                if (CtdlIsNonEditable(qrbuf)) return;
@@ -321,14 +320,13 @@ int PurgeRooms(void) {
        while (RoomPurgeList != NULL) {
                if (CtdlGetRoom(&qrbuf, RoomPurgeList->name) == 0) {
                        transcript=realloc(transcript, strlen(transcript)+SIZ);
-                       snprintf(&transcript[strlen(transcript)], SIZ, " %s\n",
-                               qrbuf.QRname);
+                       snprintf(&transcript[strlen(transcript)], SIZ, " %s\n", qrbuf.QRname);
                        CtdlDeleteRoom(&qrbuf);
+                       ++num_rooms_purged;
                }
                pptr = RoomPurgeList->next;
                free(RoomPurgeList);
                RoomPurgeList = pptr;
-               ++num_rooms_purged;
        }
 
        if (num_rooms_purged > 0) CtdlAideMessage(transcript, "Room Autopurger Message");
@@ -391,14 +389,7 @@ void do_user_purge(char *username, void *data) {
        if (us.usernum < 0L) purge = 1;
        
        // Don't purge user 0. That user is there for the system
-       if (us.usernum == 0L) {
-               // FIXME: Temporary log message. Until we do unauth access with user 0 we should
-               // try to get rid of all user 0 occurences. Many will be remnants from old code so
-               // we will need to try and purge them from users data bases.Some will not have names but
-               // those with names should be purged.
-               syslog(LOG_DEBUG, "Auto purger found a user 0 with name <%s>", us.fullname);
-               // purge = 0;
-       }
+       if (us.usernum == 0L) purge = 0;
        
        // If the user has no full name entry then we can't purge them since the actual purge can't find them.
        // This shouldn't happen but does somehow.
@@ -472,8 +463,7 @@ int PurgeUsers(void) {
                strcpy(transcript, "The following users have been auto-purged:\n");
                while (UserPurgeList != NULL) {
                        transcript=realloc(transcript, strlen(transcript)+SIZ);
-                       snprintf(&transcript[strlen(transcript)], SIZ, " %s\n",
-                               UserPurgeList->name);
+                       snprintf(&transcript[strlen(transcript)], SIZ, " %s\n", UserPurgeList->name);
                        purge_user(UserPurgeList->name);
                        pptr = UserPurgeList->next;
                        free(UserPurgeList);
@@ -511,7 +501,7 @@ int PurgeUsers(void) {
 // traverse the visit file, checking each record against those two lists and
 // purging the ones that do not have a match on _both_ lists.  (Remember, if
 // either the room or user being referred to is no longer on the system, the
-// record is completely useless.)
+// record is useless and should be removed.)
 //
 int PurgeVisits(void) {
        struct cdbdata *cdbvisit;