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
|
end
|
||||||
|
|
||||||
if(found == false) then
|
if(found == false) then
|
||||||
print('Chat Saver: Restoring lost channel, ',channel);
|
|
||||||
JoinPermanentChannel(channel);
|
JoinPermanentChannel(channel);
|
||||||
for index,shown in pairs(ChatSaverDB[channel].frames) do
|
for index,shown in pairs(ChatSaverDB[channel].frames) do
|
||||||
if(shown) then
|
if(shown) then
|
||||||
|
@ -55,10 +54,12 @@ function core:JoinChannel(msg)
|
||||||
|
|
||||||
local name = gsub(msg, "%s*([^%s]+).*", "%1");
|
local name = gsub(msg, "%s*([^%s]+).*", "%1");
|
||||||
|
|
||||||
|
if(strlen(name) > 0 and string.match(name,"%a+")) then
|
||||||
ChatSaverDB[name] = {};
|
ChatSaverDB[name] = {};
|
||||||
ChatSaverDB[name]['frames'] = {};
|
ChatSaverDB[name]['frames'] = {};
|
||||||
ChatSaverDB[name]['index'] = GetChannelName(name);
|
ChatSaverDB[name]['index'] = GetChannelName(name);
|
||||||
ChatSaverDB[name]['frames'][DEFAULT_CHAT_FRAME:GetID()] = true;
|
ChatSaverDB[name]['frames'][DEFAULT_CHAT_FRAME:GetID()] = true;
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function core:LeaveChannel(msg)
|
function core:LeaveChannel(msg)
|
||||||
|
|
Loading…
Reference in a new issue