draft/pre-away: allow AWAY during CAP negotiation (before registration)

This commit is contained in:
Jean Chevronnet 2026-08-08 21:53:40 +00:00
parent 045e7d3ee7
commit c641e23a81
2 changed files with 7 additions and 0 deletions

View file

@ -78,6 +78,9 @@ impl Command for Away {
fn name(&self) -> &'static str {
"AWAY"
}
fn before_reg(&self) -> bool {
true // draft/pre-away: clients may set AWAY during CAP negotiation
}
fn handle(&self, s: &mut Server, uid: Uid, params: &[String]) -> CmdResult {
let msg = params.first().cloned().filter(|m| !m.is_empty());
let now_away = msg.is_some();