vanilla-wow-addons – Blame information for rev 1

Subversion Repositories:
Rev:
Rev Author Line No. Line
1 office 1 local version = "6"
2  
3 local topEnable = true -- move edit bar to top of chatframe?
4 local stickyEnable = true -- enable sticky channel list?
5 local mouseEnable = true -- enable the mousewheel to scroll?
6 local timeStamp = true -- timestamp the incoming messages?
7  
8 -- channel list...
9 -- SAY, YELL, EMOTE, PARTY, RAID, GUILD, OFFICER, WHISPER, CHANNEL, SYSTEM
10 -- CHANNEL refers to all numbered channels
11 local stickyList = {"OFFICER","CHANNEL"}
12 local unstickyList = {"YELL","EMOTE"}
13  
14 local mouseScrollNum = 2 -- how many lines do you wanna scroll?
15  
16  
17 -- keep your mitts off below... =)
18  
19 function tc_AddMessage(self,text,red,green,blue,alpha,hold)
20 if(text) then
21 tc_OldAddMessage(self,"["..date("%H:%M").."] "..text,red,green,blue,alpha,hold)
22 else
23 tc_OldAddMessage(self,text,red,green,blue,alpha,hold)
24 end
25 end
26 function tc_ChatScroll(x)
27 if(x) then
28 if(x > 0) then
29 for i=1,mouseScrollNum do this:ScrollUp() end
30 else
31 for i=1,mouseScrollNum do this:ScrollDown() end
32 end
33 end
34 end
35  
36 if(topEnable) then
37 ChatFrameEditBox:ClearAllPoints()
38 ChatFrameEditBox:SetPoint("BOTTOMLEFT", ChatFrame1, "TOPLEFT")
39 ChatFrameEditBox:SetPoint("BOTTOMRIGHT", ChatFrame1, "TOPRIGHT")
40 end
41 if(stickyEnable) then
42 local z=0
43 for z in stickyList do
44 ChatTypeInfo[stickyList[z]].sticky = 1
45 end
46 for z in unstickyList do
47 ChatTypeInfo[unstickyList[z]].sticky = nil
48 end
49 end
50 if(mouseEnable) then
51 for i=1,9 do
52 if(getglobal("ChatFrame"..i)) then
53 getglobal("ChatFrame"..i):EnableMouseWheel(true)
54 getglobal("ChatFrame"..i):SetScript("OnMouseWheel", function() tc_ChatScroll(arg1) end)
55 end
56 end
57 end
58 if(timeStamp) then
59 if(DEFAULT_CHAT_FRAME) then
60 tc_OldAddMessage = DEFAULT_CHAT_FRAME.AddMessage
61 DEFAULT_CHAT_FRAME.AddMessage = tc_AddMessage
62 end
63 end
64  
65 if(ChatFrame2) then ChatFrame2:AddMessage(":: topChat version "..version.." loaded ::",0,0.8,1.0) end