fix: separate bot vs viewer WebSocket connections, add client identification

The dashboard's own WS connection was being counted as a bot subscriber,
causing "1 bot connected" with no bots actually present. Now WS clients
send a role ("bot" or "viewer") in the subscribe message. Only bots count
toward the subscriber total. Bot plugins also send a configurable client_id
so the dashboard shows which specific bots are connected.

Made-with: Cursor
This commit is contained in:
cottongin
2026-03-12 07:51:55 -04:00
parent 658c0d4a15
commit d6d5ac10e6
8 changed files with 184 additions and 35 deletions

View File

@@ -61,3 +61,12 @@ conf.registerGlobalValue(
"""IRC channel to send announce messages to.""",
),
)
conf.registerGlobalValue(
NtrPlaylist,
"clientId",
registry.String(
"limnoria",
"""Identifier for this bot when connecting to the announce WebSocket.""",
),
)