Only store valid channle names.
This commit is contained in:
parent
8bac341153
commit
4f7e7f40ae
1 changed files with 6 additions and 5 deletions
|
@ -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,11 +54,13 @@ function core:JoinChannel(msg)
|
|||
|
||||
local name = gsub(msg, "%s*([^%s]+).*", "%1");
|
||||
|
||||
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)
|
||||
self.hooks[SlashCmdList].LEAVE(msg);
|
||||
|
|
Loading…
Reference in a new issue