View Single Post
10-22-12, 06:51 PM   #8
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Search your addon files for "RequestTimePlayed", which is the function that gets that information. Any addon calling that function to update its records should also hide it when it wasn't requested by the user. Here are the relevant bits from Broker_PlayedTime; feel free to point the author of Altoholic at this thread for copypasta.

Code:
local requesting

local o = ChatFrame_DisplayTimePlayed
ChatFrame_DisplayTimePlayed = function(...)
	if requesting then
		requesting = false
		return
	end
	return o(...)
end

function addon:RequestTimePlayed()
	requesting = true
	RequestTimePlayed()
end

function addon:TIME_PLAYED_MSG(timePlayed)
	-- do something with the timePlayed here
end
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote