BotServ GREET + NickServ SET GREET
Members set a personal greet with NickServ SET GREET; a channel founder enables display with BotServ SET <#channel> GREET ON. On join, if greets are enabled and the member has channel access and a non-empty greet, the assigned bot shows [account] greet in the channel. Per-account greet is a typed field on Account (AccountGreetSet event, rides the account snapshot); the per-channel toggle is a new ChanSetting::BotGreet bool. Greet is public in NickServ INFO.
This commit is contained in:
parent
801bfc5c96
commit
ad8041bd9d
8 changed files with 172 additions and 5 deletions
|
|
@ -307,6 +307,9 @@ pub struct AccountView {
|
|||
pub email: Option<String>,
|
||||
pub ts: u64,
|
||||
pub verified: bool,
|
||||
// Personal greet shown by a bot when this account joins a greet-enabled
|
||||
// channel (empty = none).
|
||||
pub greet: String,
|
||||
}
|
||||
|
||||
// One channel access-list entry (account -> level, e.g. "op" / "voice").
|
||||
|
|
@ -383,6 +386,8 @@ pub struct ChannelView {
|
|||
pub topic: String,
|
||||
// BotServ bot assigned to this channel, if any.
|
||||
pub assigned_bot: Option<String>,
|
||||
// BotServ: whether members' personal greets are shown on join.
|
||||
pub bot_greet: bool,
|
||||
}
|
||||
|
||||
// A single ChanServ SET option, named for the typed `set_channel_setting` call.
|
||||
|
|
@ -394,6 +399,8 @@ pub enum ChanSetting {
|
|||
SecureOps,
|
||||
KeepTopic,
|
||||
TopicLock,
|
||||
// BotServ: show members' personal greets on join.
|
||||
BotGreet,
|
||||
}
|
||||
|
||||
impl ChannelView {
|
||||
|
|
@ -507,6 +514,7 @@ pub trait Store {
|
|||
fn note_auth(&mut self, account: &str, success: bool);
|
||||
fn verify_account(&mut self, account: &str) -> Result<(), RegError>;
|
||||
fn set_email(&mut self, account: &str, email: Option<String>) -> Result<(), RegError>;
|
||||
fn set_greet(&mut self, account: &str, greet: &str) -> Result<(), RegError>;
|
||||
fn group_nick(&mut self, nick: &str, account: &str) -> Result<(), RegError>;
|
||||
fn ungroup_nick(&mut self, nick: &str) -> Result<bool, RegError>;
|
||||
fn drop_account(&mut self, account: &str) -> Result<bool, RegError>;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue