local addon = CreateFrame("Frame")
local playerGuid = nil
local format = "Interrupted by %s: %s (%s)"
local grouped = nil
addon:SetScript("OnEvent", function(self, event, _, eventType, srcGUID, _, _, _, dstName, _, _, spellName, _, _, interruptedSpellName)
	if event == "PARTY_MEMBERS_CHANGED" then
		local n = GetNumPartyMembers()
		if not grouped and n > 0 then
			self:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
			grouped = true
		elseif grouped and n == 0 then
			self:UnregisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
			grouped = nil
		end
	elseif event == "PLAYER_LOGIN" then
		playerGuid = UnitGUID("player")
	else
		if eventType == "SPELL_INTERRUPT" and srcGUID == playerGuid then
			local msg = format:format(spellName, interruptedSpellName, dstName)
			SendChatMessage(msg, "YELL")
		end
	end
end)
addon:RegisterEvent("PARTY_MEMBERS_CHANGED")
addon:RegisterEvent("PLAYER_LOGIN")
