botserv: introduce bots as live pseudo-clients (slice 2)
The engine now reconciles the bot registry against the network: at burst and after each command it introduces any bot not yet live (minting a SID-prefixed uid) and quits (QuitUser) any removed from the registry. So BOT ADD makes the bot appear immediately and BOT DEL removes it; a reconnect re-introduces all registered bots fresh. Adds set_sid + per-connection bot-uid tracking. Next: ASSIGN a bot to a channel, then in-channel fantasy commands.
This commit is contained in:
parent
577c05ad2e
commit
f94b0afcd9
2 changed files with 92 additions and 8 deletions
|
|
@ -90,6 +90,7 @@ async fn main() -> Result<()> {
|
|||
let (irc_tx, irc_rx) = tokio::sync::mpsc::unbounded_channel();
|
||||
engine.lock().await.set_irc_out(irc_tx);
|
||||
engine.lock().await.set_opers(cfg.opers());
|
||||
engine.lock().await.set_sid(cfg.server.sid.clone());
|
||||
|
||||
if let Some(gossip) = cfg.gossip.clone() {
|
||||
tracing::info!(peers = cfg.peer.len(), "starting gossip");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue