BotServ: KICK <#channel> WARN — one warning before the first kick

With WARN on, a user's first kicker offence gets a private warning from
the bot instead of a kick; the next one is kicked (and then TTB can ban).
The warned flag rides the existing per-user chatter state.
This commit is contained in:
Jean Chevronnet 2026-07-13 17:57:40 +00:00
parent c8be5b4e95
commit 47b1fd351e
No known key found for this signature in database
4 changed files with 44 additions and 1 deletions

View file

@ -355,6 +355,9 @@ pub struct KickerSettings {
// How long such a ban lasts, in seconds. 0 = until manually removed.
#[serde(default)]
pub ban_expire: u32,
// Warn a user (once) before kicking them the first time.
#[serde(default)]
pub warn: bool,
// Don't kick channel operators, whatever they send.
#[serde(default)]
pub dontkickops: bool,
@ -1442,6 +1445,7 @@ impl Db {
Kicker::Flood => k.flood = on,
Kicker::Repeat => k.repeat = on,
Kicker::Badwords => k.badwords = on,
Kicker::Warn => k.warn = on,
Kicker::DontKickOps => k.dontkickops = on,
})
}