[Mailman-Users] mailman mod list

Mark Sapiro mark at msapiro.net
Tue Feb 3 18:41:06 CET 2009


Jim McIver wrote:
>
>I've found a mod.py that will show users in a list that have the 
>moderator bit set.
>
># mod.py
>
>from Mailman import mm_cfg
>import sys
>
>def mod(list):
>    for member in list.getMembers():
>        if list.getMemberOption(member, mm_cfg.Moderate):
>            print member, "is moderated"
>
>
>How can I modify this to show users "don't" have the moderator bit set?
>Search FAQ...no luck.


First, I hope you realize that this is a 'withlist' script to be run
via bin/withlist.

To make it show unmoderated members, insert the word not in the
condition and the message

        if not list.getMemberOption(member, mm_cfg.Moderate):
            print member, "is not moderated"

-- 
Mark Sapiro <mark at msapiro.net>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan



More information about the Mailman-Users mailing list