Out, damned administrivia!
Well, I've made it a little further. I can now read and write old-style
konfig files, though the code is gross and there's absolutely no checking
of the validity of any of the variables. (I'll add some of that while I
can stay awake.) So I can do the following:
XYX:sina:~/mj/2.0> ./mj_shell lists
Majordomo@hpc.uh.edu serves the following lists:
type-o Discussion about the band Type O Negative
fvwm Discussion about the FVWM window manager
I write the old-style files in a format that's a bit more readable and I
dropped the use of that nasty format and the need to post-process the file.
A sample entry looks like:
# (undef) [regexp_array] <majordomo,advertise,lists>
# If the requestor name matches one of these regexps, then the list will
# not be listed in the output of a lists command. Noadvertise overrides
noadvertise << ENDAF
A big hash defines everything about a config variable. An entry looks like
'type' => 'enum',
'values' => [qw(open closed auto open+confirm closed+confirm auto+confirm)],
'groups' => [qw(majordomo access subscribe)],
One of three values: open, closed, auto; plus an optional modifier:
'+confirm'. Open allows people to subscribe themselves to the list,
The local user can tack things onto this hash to add new variables easily.
All defaults are specified in a separate file, which contains a simple hash
with entries like this:
'subscribe_policy' => Mj::Config::get_global("default_subscribe_policy") ||
'admin_passwd' => "$list.admin",
These defaults are evaluated anew for each list.