state

Plugin last modified: 2026-05-12

Writes a snapshot of the bot's live IRC state to a JSON file on disk. BCP reads these files to display channel membership, privilege levels, and permission data on the bot detail page.

The snapshot is written every 60 seconds and immediately on any JOIN, PART, QUIT, KICK, or MODE event.

Output

Files are written to /data/state/<botnick>.json and contain:

  • nick — the bot's current IRC nick
  • updated_at — ISO 8601 timestamp of the last write
  • channels — map of channel name → user count and list of privileged users with their privilege bitmask
  • group_flags — current GroupServ group membership cache (populated by extrapermissions)
  • permissions_config — the bot's [permissions] section

Configuration

No configuration required.