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:
parent
16fae5b23c
commit
1aa02a08b9
6 changed files with 129 additions and 76 deletions
|
|
@ -17,8 +17,8 @@ fn set(s: &mut Server, uid: Uid, key: &str, on: bool) {
|
|||
return;
|
||||
};
|
||||
let changed = match s.channels.get_mut(key).and_then(|c| c.members.get_mut(&uid)) {
|
||||
Some(m) if m.oprefix != on => {
|
||||
m.oprefix = on;
|
||||
Some(m) if m.oprefix() != on => {
|
||||
m.set_oprefix(on);
|
||||
true
|
||||
}
|
||||
_ => false,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue