+/*
+ * Back end processing function for convert_bbsuid_to_minusone()
+ */
+void cbtm_backend(struct usersupp *usbuf, void *data) {
+ static struct UserProcList *uplist = NULL;
+ struct UserProcList *ptr;
+ struct usersupp us;
+
+ /* Lazy programming here. Call this function as a ForEachUser backend
+ * in order to queue up the room names, or call it with a null user
+ * to make it do the processing.
+ */
+ if (usbuf != NULL) {
+ ptr = (struct UserProcList *)
+ mallok(sizeof (struct UserProcList));
+ if (ptr == NULL) return;
+
+ safestrncpy(ptr->user, usbuf->fullname, sizeof ptr->user);
+ ptr->next = uplist;
+ uplist = ptr;
+ return;
+ }
+
+ while (uplist != NULL) {
+
+ if (lgetuser(&us, uplist->user) == 0) {
+ lprintf(9, "Processing <%s>...\n", uplist->user);
+ if (us.uid == BBSUID) {
+ us.uid = (-1);
+ }
+ lputuser(&us);
+ }
+
+ ptr = uplist;
+ uplist = uplist->next;
+ phree(ptr);
+ }
+}
+
+/*
+ * quick fix to change all BBSUID users to (-1)
+ */
+void convert_bbsuid_to_minusone(void) {
+ lprintf(5, "Applying uid changes\n");
+ ForEachUser(cbtm_backend, NULL);
+ cbtm_backend(NULL, NULL);
+ return;
+}
+
+