<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>Config.lua</filename>
    </added>
    <added>
      <filename>tekKonfig/LibStub.lua</filename>
    </added>
    <added>
      <filename>tekKonfig/tekKonfig.xml</filename>
    </added>
    <added>
      <filename>tekKonfig/tekKonfigAboutPanel.lua</filename>
    </added>
    <added>
      <filename>tekKonfig/tekKonfigButton.lua</filename>
    </added>
    <added>
      <filename>tekKonfig/tekKonfigDropdown.lua</filename>
    </added>
    <added>
      <filename>tekKonfig/tekKonfigHeading.lua</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -25,41 +25,14 @@ local L = setmetatable(GetLocale() == &quot;deDE&quot; and {
 
 local colorneed, colorgreed = &quot;|cffff0000&quot;, &quot;|cffffff00&quot;
 local coloredwords = {[L.Greed] = colorgreed..L.Greed, [L.Need] = colorneed..L.Need}
-local rolls = {}
+local rolls, db = {}
 
-local function Print(...) ChatFrame1:AddMessage(string.join(&quot; &quot;, &quot;|cFF33FF99GreedBeacon|r:&quot;, ...)) end
+local function Print(...) print(&quot;|cFF33FF99GreedBeacon|r:&quot;, ...) end
 
 local debugf = tekDebug and tekDebug:GetFrame(&quot;GreedBeacon&quot;)
 local function Debug(...) if debugf then debugf:AddMessage(string.join(&quot;, &quot;, ...)) end end
 
 
-local chatframes = {[ChatFrame1] = false, [ChatFrame2] = false, [ChatFrame3] = false, [ChatFrame4] = false, [ChatFrame5] = false, [ChatFrame6] = false, [ChatFrame7] = false}
-for frame in pairs(chatframes) do
-	for i,v in pairs(frame.messageTypeList) do
-		if v == &quot;LOOT&quot; then
-			chatframes[frame] = true
-			Debug(&quot;Initializing&quot;, frame:GetName())
-		end
-	end
-end
-
-local origadd, origrem = ChatFrame_AddMessageGroup, ChatFrame_RemoveMessageGroup
-ChatFrame_AddMessageGroup = function(frame, channel, ...)
-	if channel == &quot;LOOT&quot; then
-		chatframes[frame] = true
-		Debug(&quot;ChatFrame_AddMessageGroup&quot;, frame:GetName())
-	end
-	return origadd(frame, channel, ...)
-end
-ChatFrame_RemoveMessageGroup = function(frame, channel, ...)
-	if channel == &quot;LOOT&quot; then
-		chatframes[frame] = false
-		Debug(&quot;ChatFrame_RemoveMessageGroup&quot;, frame:GetName())
-	end
-	return origrem(frame, channel, ...)
-end
-
-
 local function FindRoll(link, player, hasselected)
 	for i,roll in ipairs(rolls) do
 		if roll._link == link and not roll._winner and (not roll[player] or hasselected) then return roll end
@@ -72,41 +45,58 @@ end
 
 
 local f = CreateFrame(&quot;Frame&quot;)
-f:RegisterEvent(&quot;CHAT_MSG_LOOT&quot;)
-f:SetScript(&quot;OnEvent&quot;, function(self, event, msg)
-	local rolltype, rollval, link, player = msg:match(L[&quot;(.+) Roll . (%d+) for (.+) by (.+)&quot;])
-	if player then
-		local roll = FindRoll(link, player, true)
-		Debug(&quot;Roll detected&quot;, player, rolltype, rollval, link)
-		roll[player] = (rolltype == &quot;Need&quot; and colorneed or colorgreed)..rollval
-		roll._type = rolltype
-		return
+f:RegisterEvent(&quot;ADDON_LOADED&quot;)
+f:SetScript(&quot;OnEvent&quot;, function(self, event, addon)
+	if addon:lower() ~= &quot;greedbeacon&quot; then return end
+
+	GreedBeaconDB = GreedBeaconDB or {}
+	db = GreedBeaconDB
+	if not db.frame then
+		db.frame = &quot;ChatFrame1&quot;
+		for i=7,1,-1 do
+			local name = &quot;ChatFrame&quot;..i
+			for i,v in pairs(_G[name].messageTypeList) do if v == &quot;LOOT&quot; then db.frame = name end end
+		end
+		Debug(&quot;Initializing DB to&quot;, db.frame)
 	end
 
-	local player, selection, link = msg:match(L[&quot;(.*) has?v?e? selected (.+) for: (.+)&quot;])
-	if player and player ~= &quot;&quot; then
-		player = player == YOU and UnitName(&quot;player&quot;) or player
-		Debug(&quot;Selection detected&quot;, player, selection, link)
-		FindRoll(link, player)[player] = coloredwords[selection]
-		return
-	end
+	f:UnregisterEvent(&quot;ADDON_LOADED&quot;)
+	f:RegisterEvent(&quot;CHAT_MSG_LOOT&quot;)
+	f:SetScript(&quot;OnEvent&quot;, function(self, event, msg)
+		local rolltype, rollval, link, player = msg:match(L[&quot;(.+) Roll . (%d+) for (.+) by (.+)&quot;])
+		if player then
+			local roll = FindRoll(link, player, true)
+			Debug(&quot;Roll detected&quot;, player, rolltype, rollval, link)
+			roll[player] = (rolltype == &quot;Need&quot; and colorneed or colorgreed)..rollval
+			roll._type = rolltype
+			return
+		end
+
+		local player, selection, link = msg:match(L[&quot;(.*) has?v?e? selected (.+) for: (.+)&quot;])
+		if player and player ~= &quot;&quot; then
+			player = player == YOU and UnitName(&quot;player&quot;) or player
+			Debug(&quot;Selection detected&quot;, player, selection, link)
+			FindRoll(link, player)[player] = coloredwords[selection]
+			return
+		end
 
-	local player, link = msg:match(L[&quot;(.*) won: (.+)&quot;])
-	if player then
-		player = player == YOU and UnitName(&quot;player&quot;) or player
-		for i,roll in ipairs(rolls) do
-			if roll._link == link and roll[player] and not roll._printed then
-				roll._printed = true
-				roll._winner = player
-				Debug(&quot;Roll completed&quot;, roll._type or &quot;nil&quot;, i, player, link)
-				local msg = string.format(L[&quot;%s|Hgreedbeacon:%d|h[%s roll]|h|r %s won %s &quot;], roll._type == L.Need and colorneed or colorgreed, i, roll._type or &quot;???&quot;, player, link)
-				for frame,val in pairs(chatframes) do if val then frame:AddMessage(msg) end end
-				return
+		local player, link = msg:match(L[&quot;(.*) won: (.+)&quot;])
+		if player then
+			player = player == YOU and UnitName(&quot;player&quot;) or player
+			for i,roll in ipairs(rolls) do
+				if roll._link == link and roll[player] and not roll._printed then
+					roll._printed = true
+					roll._winner = player
+					Debug(&quot;Roll completed&quot;, roll._type or &quot;nil&quot;, i, player, link)
+					local msg = string.format(L[&quot;%s|Hgreedbeacon:%d|h[%s roll]|h|r %s won %s &quot;], roll._type == L.Need and colorneed or colorgreed, i, roll._type or &quot;???&quot;, player, link)
+					_G[db.frame]:AddMessage(msg)
+					return
+				end
 			end
+			Print(&quot;ERROR: No match found for&quot;, msg)
+			return
 		end
-		Print(&quot;No match found for&quot;, msg)
-		return
-	end
+	end)
 end)
 
 </diff>
      <filename>GreedBeacon.lua</filename>
    </modified>
    <modified>
      <diff>@@ -4,11 +4,18 @@
 ## Notes: Track down those needy and greedy party members.
 ## Author: Tekkub Stoutwrithe
 ## Version: Alpha
+## X-Website: http://www.tekkub.net/
+## X-Email: tekkub-wow@googlegroups.com
 ## X-Category: Inventory
 
+## SavedVariables: GreedBeaconDB
+
 ## OptionalDeps: tekErr, tekDebug
 
 ## LoadManagers: AddonLoader
 ## X-LoadOn-Always: delayed
 
+tekKonfig\tekKonfig.xml
+
 GreedBeacon.lua
+Config.lua</diff>
      <filename>GreedBeacon.toc</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>ee16d5740dcaeb9d0ef45b777e6848eade5f429e</id>
    </parent>
  </parents>
  <author>
    <name>Tekkub</name>
    <email>tekkub@gmail.com</email>
  </author>
  <url>http://github.com/tekkub/greedbeacon/commit/05c6a5cc8fade17aff3743174ab2d11cf53f8bfe</url>
  <id>05c6a5cc8fade17aff3743174ab2d11cf53f8bfe</id>
  <committed-date>2009-01-10T19:48:20-08:00</committed-date>
  <authored-date>2009-01-10T19:48:20-08:00</authored-date>
  <message>Add config instead of relying on Blizzy's somewhat buggy chat settings</message>
  <tree>3acc5023fb1654e5cfb7007ba701c9095dcdf0fc</tree>
  <committer>
    <name>Tekkub</name>
    <email>tekkub@gmail.com</email>
  </committer>
</commit>
