diff --git a/BasicConfig.lua b/BasicConfig.lua index fd20f89..83bec8a 100644 --- a/BasicConfig.lua +++ b/BasicConfig.lua @@ -55,7 +55,7 @@ BCM.modules[#BCM.modules+1] = function() BCM_PlayerSeparator:SetText(bcmDB.playerSeparator) elseif panel == "BCM_ChannelNames" and BCM_ChanName_Input then BCM_ChanName_Input:SetText("1234567890") - BCM_ChanName_Input:SetText(bcmDB.shortNames[1]) + BCM_ChanName_Input:SetText(bcmDB.replacementNames[1]) elseif panel == "BCM_PlayerNames" and BCM_PlayerLevel_Button then BCM_PlayerBrackDesc:SetParent(frame) BCM_PlayerBrackDesc:SetPoint("TOPLEFT", 16, -240) @@ -316,10 +316,10 @@ BCM.modules[#BCM.modules+1] = function() local input = BCM_ChanName_Input input:EnableMouse(true) input:SetText("1234567890") --for some reason the text wont display without calling something long - input:SetText(bcmDB.shortNames[v.value]) + input:SetText(bcmDB.replacementNames[v.value]) input.value = v.value end - local tbl = {BCM.GENERAL, BCM.TRADE_SERVICES, BCM.TRADE, BCM.WORLDDEFENSE, BCM.LOCALDEFENSE, BCM.LFG, BCM.GUILDRECRUIT, INSTANCE_CHAT, INSTANCE_CHAT_LEADER, GUILD, PARTY, PARTY_LEADER, gsub(CHAT_PARTY_GUIDE_GET, ".*%[(.*)%].*", "%1"), OFFICER, RAID, RAID_LEADER, RAID_WARNING, BCM.CUSTOMCHANNEL} + local tbl = {BCM.GENERAL, BCM.TRADE_SERVICES, BCM.TRADE, BCM.WORLDDEFENSE, BCM.LOCALDEFENSE, BCM.LFG, BCM.NEWCOMER_CHAT, BCM.GUILDRECRUIT, INSTANCE_CHAT, INSTANCE_CHAT_LEADER, GUILD, PARTY, PARTY_LEADER, gsub(CHAT_PARTY_GUIDE_GET, ".*%[(.*)%].*", "%1"), OFFICER, RAID, RAID_LEADER, RAID_WARNING, BCM.CUSTOMCHANNEL} for i=1, #tbl do info.text = tbl[i] info.value = i @@ -339,7 +339,7 @@ BCM.modules[#BCM.modules+1] = function() chanNameInput:SetMaxLetters(10) chanNameInput:EnableMouse(false) chanNameInput:SetScript("OnTextChanged", function(frame, changed) - if changed then bcmDB.shortNames[frame.value] = frame:GetText() end + if changed then bcmDB.replacementNames[frame.value] = frame:GetText() end end) chanNameInput:SetScript("OnEnterPressed", chanNameInput:GetScript("OnEscapePressed")) end diff --git a/Locales/deDE.lua b/Locales/deDE.lua index ed03a5c..5fa238b 100644 --- a/Locales/deDE.lua +++ b/Locales/deDE.lua @@ -55,3 +55,4 @@ L["WORLDDEFENSE"] = "Weltverteidigung" --L.protectedText = "" --L.TRADE_SERVICES = "Trade (Services)" +--L.NEWCOMER = "Newcomer Chat" diff --git a/Locales/enUS.lua b/Locales/enUS.lua index e8476f8..692f7ba 100644 --- a/Locales/enUS.lua +++ b/Locales/enUS.lua @@ -46,6 +46,7 @@ L.TRADE_SERVICES = "Trade (Services)" L.WORLDDEFENSE = "WorldDefense" L.LOCALDEFENSE = "LocalDefense" L.LFG = "LookingForGroup" +L.NEWCOMER_CHAT = "Newcomer Chat" L.GUILDRECRUIT = "GuildRecruitment" L.CHANNELNUMBER = "Channel Number" L.CHANNELNAME = "Channel Name" diff --git a/Locales/esES.lua b/Locales/esES.lua index 99e70d3..e3a5323 100644 --- a/Locales/esES.lua +++ b/Locales/esES.lua @@ -51,3 +51,4 @@ L["WORLDDEFENSE"] = "DefensaGeneral" --L.protectedText = "" --L.TRADE_SERVICES = "Trade (Services)" +--L.NEWCOMER = "Newcomer Chat" \ No newline at end of file diff --git a/Locales/frFR.lua b/Locales/frFR.lua index fcf1130..5d55a7d 100644 --- a/Locales/frFR.lua +++ b/Locales/frFR.lua @@ -51,3 +51,4 @@ L["WORLDDEFENSE"] = "DéfenseUniverselle" --L.protectedText = "" --L.TRADE_SERVICES = "Trade (Services)" +--L.NEWCOMER = "Newcomer Chat" \ No newline at end of file diff --git a/Locales/itIT.lua b/Locales/itIT.lua index 99c4571..9ab79cd 100644 --- a/Locales/itIT.lua +++ b/Locales/itIT.lua @@ -51,3 +51,4 @@ local _, L = ... --L.protectedText = "" --L.TRADE_SERVICES = "Trade (Services)" +--L.NEWCOMER = "Newcomer Chat" \ No newline at end of file diff --git a/Locales/koKR.lua b/Locales/koKR.lua index b63da59..17900b5 100644 --- a/Locales/koKR.lua +++ b/Locales/koKR.lua @@ -60,3 +60,4 @@ L["CLICKTOCOPY"] = "Shift-클릭으로 대화를 복사합니다." --BCM.protectedText = "" --L.TRADE_SERVICES = "Trade (Services)" +--L.NEWCOMER = "Newcomer Chat" \ No newline at end of file diff --git a/Locales/ptBR.lua b/Locales/ptBR.lua index 868fc38..34c1fb5 100644 --- a/Locales/ptBR.lua +++ b/Locales/ptBR.lua @@ -51,3 +51,4 @@ local _, L = ... --L.protectedText = "" --L.TRADE_SERVICES = "Trade (Services)" +--L.NEWCOMER = "Newcomer Chat" \ No newline at end of file diff --git a/Locales/ruRU.lua b/Locales/ruRU.lua index a39eb8c..28a843b 100644 --- a/Locales/ruRU.lua +++ b/Locales/ruRU.lua @@ -51,3 +51,4 @@ L["WORLDDEFENSE"] = "Оборона: глобальный" L.protectedText = "" --L.TRADE_SERVICES = "Trade (Services)" +--L.NEWCOMER = "Newcomer Chat" \ No newline at end of file diff --git a/Locales/zhCN.lua b/Locales/zhCN.lua index 96fc2ca..dada699 100644 --- a/Locales/zhCN.lua +++ b/Locales/zhCN.lua @@ -51,3 +51,4 @@ L["WORLDDEFENSE"] = "世界防务" L.protectedText = "<被保护的文本>" --L.TRADE_SERVICES = "Trade (Services)" +--L.NEWCOMER = "Newcomer Chat" \ No newline at end of file diff --git a/Locales/zhTW.lua b/Locales/zhTW.lua index f38c590..85d3cc5 100644 --- a/Locales/zhTW.lua +++ b/Locales/zhTW.lua @@ -51,3 +51,4 @@ L["WORLDDEFENSE"] = "世界防務" L.protectedText = "<受保護的文本>" --L.TRADE_SERVICES = "Trade (Services)" +--L.NEWCOMER = "Newcomer Chat" \ No newline at end of file diff --git a/channelnames.lua b/channelnames.lua index 16fd120..f28d39d 100644 --- a/channelnames.lua +++ b/channelnames.lua @@ -1,19 +1,27 @@ --[[ Channel Name Replacements Module ]]-- - +channelnames_version = 10 -- Update if you need to clear old names. local _, BCM = ... BCM.modules[#BCM.modules+1] = function() - bcmDB.replacements = nil -- Remove old SV, 10.0.5 - if bcmDB.BCM_ChannelNames then bcmDB.shortNames = nil return end + if not bcmDB.channelnames_version then + bcmDB.channelnames_version = channelnames_version + bcmDB.replacements = nil -- Remove old SV, 10.0.5 + bcmDB.shortNames = nil -- Remove old SV, 11.0.5 + end + if bcmDB.channelnames_version ~= channelnames_version then + bcmDB.replacementNames = nil -- Clean old SV for updated module + end + if bcmDB.BCM_ChannelNames then bcmDB.replacementNames = nil return end - if not bcmDB.shortNames then - bcmDB.shortNames = { + if not bcmDB.replacementNames then + bcmDB.replacementNames = { "[GEN]", --General "[T(S)]", --Trade (Services) "[T]", --Trade "[WD]", --WorldDefense "[LD]", --LocalDefense "[LFG]", --LookingForGroup + "[NEW]", --Newcomer Chat "[GR]", --GuildRecruitment "[I]", --Instance "[IL]", --Instance Leader @@ -29,7 +37,7 @@ BCM.modules[#BCM.modules+1] = function() } end - local rplc = bcmDB.shortNames + local rplc = bcmDB.replacementNames local gsub = gsub local chn = { "%[%d%d?%. General[^%]]*%]", @@ -38,6 +46,7 @@ BCM.modules[#BCM.modules+1] = function() "%[%d%d?%. WorldDefense[^%]]*%]", "%[%d%d?%. LocalDefense[^%]]*%]", "%[%d%d?%. LookingForGroup[^%]]*%]", + "%[%d%d?%. Newcomer Chat[^%]]*%]", "%[%d%d?%. GuildRecruitment[^%]]*%]", gsub(CHAT_INSTANCE_CHAT_GET, ".*%[(.*)%].*", "%%[%1%%]"), gsub(CHAT_INSTANCE_CHAT_LEADER_GET, ".*%[(.*)%].*", "%%[%1%%]"),