From 4f7e7f40aeb6f651e6dac50a840493a620dd857c Mon Sep 17 00:00:00 2001 From: atomaka Date: Thu, 26 May 2011 00:01:58 -0400 Subject: [PATCH] Only store valid channle names. --- ChatSaver.lua | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/ChatSaver.lua b/ChatSaver.lua index 5e2cb63..18b5323 100644 --- a/ChatSaver.lua +++ b/ChatSaver.lua @@ -39,7 +39,6 @@ function core:RejoinChannels(event,message,...) end if(found == false) then - print('Chat Saver: Restoring lost channel, ',channel); JoinPermanentChannel(channel); for index,shown in pairs(ChatSaverDB[channel].frames) do if(shown) then @@ -55,10 +54,12 @@ function core:JoinChannel(msg) local name = gsub(msg, "%s*([^%s]+).*", "%1"); - ChatSaverDB[name] = {}; - ChatSaverDB[name]['frames'] = {}; - ChatSaverDB[name]['index'] = GetChannelName(name); - ChatSaverDB[name]['frames'][DEFAULT_CHAT_FRAME:GetID()] = true; + if(strlen(name) > 0 and string.match(name,"%a+")) then + ChatSaverDB[name] = {}; + ChatSaverDB[name]['frames'] = {}; + ChatSaverDB[name]['index'] = GetChannelName(name); + ChatSaverDB[name]['frames'][DEFAULT_CHAT_FRAME:GetID()] = true; + end end function core:LeaveChannel(msg)