BotServ: NOBOT and PRIVATE assignment protections
SET <#channel> NOBOT <on|off> reserves (un)assigning a bot for services operators (the founder is refused). SET <bot> PRIVATE <on|off> (admin only) marks a bot operators-only to assign; it's flagged in BOT LIST and the private flag survives BOT CHANGE. Both gates live in the ASSIGN path.
This commit is contained in:
parent
1cc438f4ed
commit
5bc41f2e60
5 changed files with 92 additions and 13 deletions
|
|
@ -57,7 +57,8 @@ pub fn handle(me: &str, from: &Sender, args: &[&str], ctx: &mut ServiceCtx, db:
|
|||
}
|
||||
ctx.notice(me, from.uid, format!("Bots ({}):", bots.len()));
|
||||
for b in &bots {
|
||||
ctx.notice(me, from.uid, format!(" \x02{}\x02 ({}@{}) — {}", b.nick, b.user, b.host, b.gecos));
|
||||
let flag = if b.private { " \x02[private]\x02" } else { "" };
|
||||
ctx.notice(me, from.uid, format!(" \x02{}\x02 ({}@{}) — {}{flag}", b.nick, b.user, b.host, b.gecos));
|
||||
}
|
||||
}
|
||||
Some(other) => ctx.notice(me, from.uid, format!("Unknown BOT command \x02{other}\x02. Use \x02ADD\x02, \x02CHANGE\x02, \x02DEL\x02 or \x02LIST\x02.")),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue