add callerid (+g) with ACCEPT allow-list, plus msgid and extended-monitor

This commit is contained in:
Jean Chevronnet 2026-08-05 16:21:58 +00:00
parent 9b12791774
commit 1581bc15d2
7 changed files with 187 additions and 5 deletions

View file

@ -781,6 +781,7 @@ static USER_MODES: &[&(dyn UserMode + Sync)] = &[
&REGISTERED,
&SSLPM,
&SNOMASK,
&CALLERID,
];
/// A simple boolean user flag (+i / +w).
@ -820,6 +821,9 @@ fn set_regdeaf(f: &mut UserFlags, v: bool) {
fn set_sslpm(f: &mut UserFlags, v: bool) {
f.ssl_pm = v;
}
fn set_callerid(f: &mut UserFlags, v: bool) {
f.callerid = v;
}
static BOT: UFlag = UFlag {
ch: 'B',
set: set_bot,
@ -844,6 +848,10 @@ static SSLPM: UFlag = UFlag {
ch: 'z',
set: set_sslpm,
};
static CALLERID: UFlag = UFlag {
ch: 'g',
set: set_callerid,
};
impl UserMode for UFlag {
fn letter(&self) -> char {
@ -984,7 +992,7 @@ mod tests {
#[test]
fn registry_covers_all_user_modes() {
for c in "iwoxBDIHrRzs".chars() {
for c in "iwoxBDIHrRzsg".chars() {
assert!(user_mode(c).is_some(), "missing umode +{c}");
}
assert!(user_mode('Q').is_none());