modes: render the full channel mode set in MODE queries — +P/Q/A/U/D and params +B/J/d/K were set but never shown
This commit is contained in:
parent
5bf2116786
commit
dae0cb985b
1 changed files with 29 additions and 0 deletions
|
|
@ -280,6 +280,11 @@ impl ChanModes {
|
||||||
(self.reg_moderated, 'M'),
|
(self.reg_moderated, 'M'),
|
||||||
(self.censor, 'G'),
|
(self.censor, 'G'),
|
||||||
(self.auditorium, 'u'),
|
(self.auditorium, 'u'),
|
||||||
|
(self.permanent, 'P'),
|
||||||
|
(self.nokicks, 'Q'),
|
||||||
|
(self.allowinvite, 'A'),
|
||||||
|
(self.opmoderated, 'U'),
|
||||||
|
(self.delayjoin, 'D'),
|
||||||
] {
|
] {
|
||||||
if on {
|
if on {
|
||||||
s.push(ch);
|
s.push(ch);
|
||||||
|
|
@ -306,6 +311,18 @@ impl ChanModes {
|
||||||
if self.history.is_some() {
|
if self.history.is_some() {
|
||||||
s.push('H');
|
s.push('H');
|
||||||
}
|
}
|
||||||
|
if self.anticaps.is_some() {
|
||||||
|
s.push('B');
|
||||||
|
}
|
||||||
|
if self.kicknorejoin.is_some() {
|
||||||
|
s.push('J');
|
||||||
|
}
|
||||||
|
if self.delaymsg.is_some() {
|
||||||
|
s.push('d');
|
||||||
|
}
|
||||||
|
if self.repeat.is_some() {
|
||||||
|
s.push('K');
|
||||||
|
}
|
||||||
if params {
|
if params {
|
||||||
if let Some(k) = &self.key {
|
if let Some(k) = &self.key {
|
||||||
s.push(' ');
|
s.push(' ');
|
||||||
|
|
@ -332,6 +349,18 @@ impl ChanModes {
|
||||||
if let Some((n, t)) = &self.history {
|
if let Some((n, t)) = &self.history {
|
||||||
s.push_str(&format!(" {n}:{t}"));
|
s.push_str(&format!(" {n}:{t}"));
|
||||||
}
|
}
|
||||||
|
if let Some(p) = self.anticaps {
|
||||||
|
s.push_str(&format!(" {p}"));
|
||||||
|
}
|
||||||
|
if let Some(secs) = self.kicknorejoin {
|
||||||
|
s.push_str(&format!(" {secs}"));
|
||||||
|
}
|
||||||
|
if let Some(secs) = self.delaymsg {
|
||||||
|
s.push_str(&format!(" {secs}"));
|
||||||
|
}
|
||||||
|
if let Some(n) = self.repeat {
|
||||||
|
s.push_str(&format!(" {n}"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
s
|
s
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue