mirror of
https://github.com/edubart/otclient.git
synced 2025-10-15 03:54:54 +02:00
Update todo, fix minor error
This commit is contained in:
@@ -562,13 +562,15 @@ end
|
||||
function onGameStart()
|
||||
-- open last channels
|
||||
local lastChannelsOpen = g_settings.getNode('lastChannelsOpen')
|
||||
local savedChannels = lastChannelsOpen[g_game.getLocalPlayer():getName()]
|
||||
if savedChannels then
|
||||
for channelName, channelId in pairs(savedChannels) do
|
||||
channelId = tonumber(channelId)
|
||||
if channelId ~= 0 then
|
||||
if not table.find(channels, channelId) then
|
||||
g_game.joinChannel(channelId)
|
||||
if lastChannelsOpen then
|
||||
local savedChannels = lastChannelsOpen[g_game.getLocalPlayer():getName()]
|
||||
if savedChannels then
|
||||
for channelName, channelId in pairs(savedChannels) do
|
||||
channelId = tonumber(channelId)
|
||||
if channelId ~= 0 then
|
||||
if not table.find(channels, channelId) then
|
||||
g_game.joinChannel(channelId)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user