Skip to content

Commit

Permalink
fix:
Browse files Browse the repository at this point in the history
Added some checks to also prevent saving blank names to Events and Channels. they will just default back to New. incase this was an accident.
  • Loading branch information
grimmier378 committed Apr 23, 2024
1 parent b211c00 commit 8b78e74
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions init.lua
Expand Up @@ -287,10 +287,10 @@ function ChatWin.EventChat(channelID, eventName, line)
gSize = gSize -1

if txtBuffer then
local fCount = 0
local haveFilters = false
for fID, fData in pairs(eventDetails.Filters) do
if fID > 0 and not fMatch then
fCount = fID
haveFilters = true
local fString = fData.filterString -- String value we are filtering for
if string.find(fString, 'M3') then
fString = string.gsub(fString,'M3', myName)
Expand Down Expand Up @@ -330,7 +330,7 @@ function ChatWin.EventChat(channelID, eventName, line)
-- end
end
--print(tostring(#eventDetails.Filters))
if not fMatch and fCount > 0 then return end -- we had filters and didn't match so leave
if not fMatch and haveFilters then return end -- we had filters and didn't match so leave
local i = getNextID(txtBuffer)
if timeStamps then
local tStamp = mq.TLO.Time.Time24()
Expand All @@ -342,7 +342,6 @@ function ChatWin.EventChat(channelID, eventName, line)
ChatWin.Consoles[channelID].console:AppendText(colorCode, line)
end
-- write main console

if tempSettings.Channels[channelID].MainEnable then

console:AppendText(colorCode,line)
Expand Down

0 comments on commit 8b78e74

Please sign in to comment.