From 13985085ca952f8f4fc61c3da6b4c657cb30be7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Pant=C5=AF=C4=8Dek?= Date: Fri, 30 Jun 2023 17:10:58 +0200 Subject: [PATCH] Integrate mlcheck into default info. --- doc/hackerbase.1 | 12 ++++-------- src/hackerbase.scm | 33 +++++++++++++++++---------------- 2 files changed, 21 insertions(+), 24 deletions(-) diff --git a/doc/hackerbase.1 b/doc/hackerbase.1 index 754bcde..e720a8d 100644 --- a/doc/hackerbase.1 +++ b/doc/hackerbase.1 @@ -52,8 +52,6 @@ See \fBEXAMPLES\fR for a quick start guide. .R | .B \-genid .R | -.B \-mlcheck -.R | .B \-mlsync .R | .B \-notify @@ -81,6 +79,10 @@ With no member specified by neither \fB-mi\fR nor \fB-mn\fR display overall hackerbase information with organizational bodies memberships and lists of members of various statuses. +In that case it also checks internal mailinglist membership. All +members - including suspended ones - should be subscribed this +mailinglist. No other emails should be subscribed to it. + When a member is specified, displays its information from the database, all identified bank transactions, membership information and a calendar showing current status of the member during given month. @@ -136,12 +138,6 @@ Returns information about used and available member IDs. .B \-genid Generates a valid member id that is not used yet. -.TP -.B \-mlcheck -Check internal mailinglist membership. All members - including -suspended ones - should be subscribed this mailinglist. No other -emails should be subscribed to it. - .TP .B \-mlsync Like \fB\-mlcheck\fR but automatically ensuring the subscriptions are diff --git a/src/hackerbase.scm b/src/hackerbase.scm index abf0d08..01e3695 100644 --- a/src/hackerbase.scm +++ b/src/hackerbase.scm @@ -170,8 +170,6 @@ (-fname- file:gnuplot-data)) "" "Mailman Actions:" - (-mlcheck () "Check internal ML" - (-action- 'mlcheck)) (-mlsync () "Synchronize internal ML" (-action- 'mlsync)) "" @@ -275,7 +273,23 @@ (newline) (if mr (print-member-table mr) - (print-members-base-table MB)) + (let () + (print-members-base-table MB) + (newline) + (let-values (((missing surplus) + (mailman-compare-members internal-ml + (mbase-active-emails MB #:suspended #t)))) + (if (null? (cdr internal-ml)) + (print "Skipping ML check - not loaded") + (if (and (null? missing) + (null? surplus)) + (print "Internal mailing list membership in sync.") + (let () + (print "Internal mailing list:") + (when (not (null? missing)) + (print " Missing: " missing)) + (when (not (null? surplus)) + (print " Outsiders: " surplus)))))))) (newline)) ((print-stats) (newline) @@ -342,19 +356,6 @@ (if (-normal-month-) (mailman-sync-members internal-ml (mbase-active-emails MB #:suspended #t)) (print "Mailman synchronization disabled with manually specified current month."))) - ((mlcheck) - (let-values (((missing surplus) - (mailman-compare-members internal-ml - (mbase-active-emails MB #:suspended #t)))) - (if (and (null? missing) - (null? surplus)) - (print "Internal mailing list membership in sync.") - (let () - (print "Internal mailing list:") - (when (not (null? missing)) - (print " Missing: " missing)) - (when (not (null? surplus)) - (print " Outsiders: " surplus)))))) ((notify) (let ((nmembers (members-to-notify MB (-notify-months-)))) (newline)