[Mailman-Users] Re: How to determine moderation flag from config.pck

2023-08-22 Thread Russell Clemings
For the benefit of the archives, here's what I ended up doing: if ($key_value[1] & 128) { $key_value[1] = 1; // moderated } else { $key_value[1] = 0; // not moderated } $key_value[1] being the second part of the user_options field in config.pck, after I turned it into

[Mailman-Users] Re: How to determine moderation flag from config.pck

2023-08-22 Thread Russell Clemings
That does it, thanks. rac On Tue, Aug 22, 2023 at 3:06 PM Mark Sapiro wrote: > On 8/22/23 2:50 PM, Russell Clemings wrote: > > 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. > > > It works the same in PHP. See >

[Mailman-Users] Re: How to determine moderation flag from config.pck

2023-08-22 Thread Mark Sapiro
On 8/22/23 2:50 PM, Russell Clemings wrote: 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. It works the same in PHP. See https://www.php.net/manual/en/language.operators.bitwise.php -- Mark Sapiro The highway is

[Mailman-Users] Re: How to determine moderation flag from config.pck

2023-08-22 Thread Russell Clemings
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 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

[Mailman-Users] Re: How to determine moderation flag from config.pck

2023-08-22 Thread Mark Sapiro
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':