feat: persist invite-joined channels for auto-rejoin on connect

When the bot accepts an admin INVITE, the channel is stored in
bot.state under chanmgmt/autojoin:<channel>. On reconnect, persisted
channels are rejoined alongside configured ones. If the bot is kicked,
the channel is removed from the auto-rejoin list.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
user
2026-02-15 22:22:24 +01:00
parent 122785b1f3
commit 83a1d37b98
3 changed files with 37 additions and 2 deletions

View File

@@ -103,7 +103,8 @@ IRC operators are auto-detected via WHO on connect and on user JOIN
!mode +o nick # Give ops
```
Auto-joins channels when invited by an admin/ircop.
Auto-joins channels when invited by an admin/ircop. Persists across restarts.
Removed from auto-rejoin list if bot is kicked.
## State Store (admin)

View File

@@ -302,7 +302,10 @@ The bot must have channel operator status for these commands to take effect.
### Invite Auto-Join
When an admin or IRC operator sends an `INVITE`, the bot automatically joins
the target channel. Non-admin invites are silently ignored.
the target channel and persists it for auto-rejoin on reconnect. Non-admin
invites are silently ignored. If the bot is kicked from a persisted channel,
it is removed from the auto-rejoin list. Channels already in the config
`[bot] channels` are skipped (they rejoin via the normal path).
## Plugin State Persistence