diff --git a/ChatSaver.lua b/ChatSaver.lua index 811debf..932312c 100644 --- a/ChatSaver.lua +++ b/ChatSaver.lua @@ -148,9 +148,11 @@ function core:LeaveChannel(msg) self.hooks[SlashCmdList].LEAVE(msg); local id = gsub(msg,"%s*([^%s]+).*","%1"); - local _,name = core:GetChannelInfo(id); - ChatSaverDB[name] = nil; + if(strlen(id) > 0) then + local _,name = core:GetChannelInfo(id); + ChatSaverDB[name] = nil; + end end function core:ToggleChatChannel(checked,channel)