channels: replace Member's six parallel prefix bools (oprefix/owner/admin/op/halfop/voice) with a single u8 bitfield (PFX_*) + inline bool accessors/mutators — same semantics, one byte instead of six, no more risk of the flags drifting out of sync; all call sites go through op()/set_op()-style methods

This commit is contained in:
Jean Chevronnet 2026-08-19 02:47:04 +00:00
parent 16fae5b23c
commit 1aa02a08b9
6 changed files with 129 additions and 76 deletions

View file

@ -10,11 +10,11 @@ use crate::server::{now, Server};
fn prefixes(m: &crate::channels::Member) -> String {
let mut p = String::new();
for (has, ch) in [
(m.owner, '~'),
(m.admin, '&'),
(m.op, '@'),
(m.halfop, '%'),
(m.voice, '+'),
(m.owner(), '~'),
(m.admin(), '&'),
(m.op(), '@'),
(m.halfop(), '%'),
(m.voice(), '+'),
] {
if has {
p.push(ch);