Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --put this on line 19
- function oq_getlastchannel()
- if(DEFAULT_CHAT_FRAME:GetID()) then
- local chatchannels = { GetChatWindowChannels(DEFAULT_CHAT_FRAME:GetID()) }
- local i
- if (#chatchannels ~= 0) then
- local numchannels = (#chatchannels / 2)
- local oqc_present = 0
- if (numchannels >= 1) then
- for i = 1, #chatchannels do
- if (chatchannels[i] == "oqchannel") then
- oqc_present = 1
- if (i ~= (#chatchannels - 1)) then
- --oqchannel not the last channel
- --should do a reset on the channel
- OQ_LASTCHANNEL = numchannels + 1
- elseif (i == (#chatchannels - 1)) then
- OQ_LASTCHANNEL = i
- end
- end
- end
- if (oqc_present == 0) then
- --no oq channel found
- --tell the other functions to just join
- --as it should auto correct on the next check
- OQ_LASTCHANNEL = 2
- end
- else
- OQ_LASTCHANNEL = 1
- end
- else
- OQ_LASTCHANNEL = 1
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment