What's the logic behind that? I should have mentioned that I'll be doing this in PHP so I'll have to replicate it.
On Tue, Aug 22, 2023, 2:46 PM Mark Sapiro <[email protected]> wrote: > On 8/22/23 1:53 PM, Russell Clemings wrote: > > I'm trying to figure out how to extract the moderation flag for each user > > in a list's config.pck file. > > > > I know from Defaults.py that it's in the "Bitfield for user options" > > section (below). But for a config.pck with the following: > > > > 'user_options': {'[email protected]': 296, > > {'[email protected]': 296, > > '[email protected]': 408, > > '[email protected]': 328}, > > > > How can I tell which ones are moderated? Automatically, I mean. > > > > I know the "moderated" value is 128, but I don't understand how (or if > it's > > even possible) to pull out the value for a single flag. > > > For example, in Python > ``` > for user, opts in user_options.items(): > if opts & 128: > print(user + ' is moderated') > ``` > > -- > Mark Sapiro <[email protected]> The highway is for gamblers, > San Francisco Bay Area, California better use your sense - B. Dylan > > ------------------------------------------------------ > Mailman-Users mailing list -- [email protected] > To unsubscribe send an email to [email protected] > https://mail.python.org/mailman3/lists/mailman-users.python.org/ > Mailman FAQ: http://wiki.list.org/x/AgA3 > Security Policy: http://wiki.list.org/x/QIA9 > Searchable Archives: > https://www.mail-archive.com/[email protected]/ > https://mail.python.org/archives/list/[email protected]/ > Member address: [email protected] > ------------------------------------------------------ Mailman-Users mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/mailman-users.python.org/ Mailman FAQ: http://wiki.list.org/x/AgA3 Security Policy: http://wiki.list.org/x/QIA9 Searchable Archives: https://www.mail-archive.com/[email protected]/ https://mail.python.org/archives/list/[email protected]/ Member address: [email protected]
