channel modes +Q nokicks / +A allowinvite / +P permchannels; fix SWHOIS (full multi-word text, no doubled nick in WHOIS)

This commit is contained in:
Jean Chevronnet 2026-08-09 00:47:10 +00:00
parent 050ce37612
commit 8dc51a281b
8 changed files with 70 additions and 20 deletions

View file

@ -915,7 +915,7 @@ impl Server {
format!(":{prefix} PART {chan} :{reason}")
};
self.to_channel(&key, &line, None);
self.channels.retain(|_, c| !c.is_empty());
self.channels.retain(|_, c| c.keep_alive());
let fwd = if reason.is_empty() {
format!(":{uuid} PART {chan}")
} else {
@ -950,7 +950,7 @@ impl Server {
for m in notify {
self.send(m, line.clone());
}
self.channels.retain(|_, c| !c.is_empty());
self.channels.retain(|_, c| c.keep_alive());
if let Some(ru) = self.remote_users.remove(uuid) {
self.remote_nick.remove(&ru.nick.to_ascii_lowercase());
}
@ -1056,7 +1056,7 @@ impl Server {
&format!(":{prefix} KICK {chan} {victim} :{reason}"),
None,
);
self.channels.retain(|_, c| !c.is_empty());
self.channels.retain(|_, c| c.keep_alive());
self.propagate(&format!(":{src} KICK {chan} {victim} :{reason}"), Some(via));
}