Do not attempt to process '/leave' with no message

This commit is contained in:
Andrew Tomaka 2011-06-03 09:43:27 -04:00
parent 3e27e26db1
commit 61e66753a2

View file

@ -148,9 +148,11 @@ function core:LeaveChannel(msg)
self.hooks[SlashCmdList].LEAVE(msg); self.hooks[SlashCmdList].LEAVE(msg);
local id = gsub(msg,"%s*([^%s]+).*","%1"); 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 end
function core:ToggleChatChannel(checked,channel) function core:ToggleChatChannel(checked,channel)