Broadcast a session's QUIT once when its clients leave together (closes #154) #168

Merged
clawbot merged 1 commits from issue-154-quit-once into next 2026-10-21 01:48:27 +02:00
1 Commits
Author SHA1 Message Date
clawbot 0ca6ae6c2f Broadcast a session's QUIT once when its clients leave together (closes #154)
check / check (push) Canceled after 0s
Logout deleted the client, counted the session's clients and ran
BroadcastQuit as separate statements, and BroadcastQuit read the peers,
parted, deleted empty channels and deleted the session separately too.
Two logouts or QUITs of one session at once both sent its QUIT, and a
JOIN landing between a part and the channel's deletion got into a +k
channel without the key.

db.QuitSession now does all of that in one transaction, parting each
channel as PartChannelAndDeleteIfEmpty does, and stores and queues the
QUIT in it only when it deleted the session, so the QUIT is queued
before the nick is free. db.LogoutClient deletes the client and counts
the rest in the same transaction.

Model: opus-5-5
2026-10-20 23:24:51 +00:00