From 61e66753a26cd0366b6c265ac4a2f836e0db8073 Mon Sep 17 00:00:00 2001 From: atomaka Date: Fri, 3 Jun 2011 09:43:27 -0400 Subject: [PATCH] Do not attempt to process '/leave' with no message --- ChatSaver.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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)