|
|
@ -267,14 +267,14 @@ function Console.removeCurrentTab()
|
|
|
|
local tab = consoleTabBar:getCurrentTab()
|
|
|
|
local tab = consoleTabBar:getCurrentTab()
|
|
|
|
if tab:getText() == "Default" or tab:getText() == "Server Log" then return end
|
|
|
|
if tab:getText() == "Default" or tab:getText() == "Server Log" then return end
|
|
|
|
|
|
|
|
|
|
|
|
consoleTabBar:removeTab(tab)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- notificate the server that we are leaving the channel
|
|
|
|
-- notificate the server that we are leaving the channel
|
|
|
|
if tab.channelId then
|
|
|
|
if tab.channelId then
|
|
|
|
g_game.leaveChannel(tab.channelId)
|
|
|
|
g_game.leaveChannel(tab.channelId)
|
|
|
|
elseif tab:getText() == "NPCs" then
|
|
|
|
elseif tab:getText() == "NPCs" then
|
|
|
|
g_game.closeNpcChannel()
|
|
|
|
g_game.closeNpcChannel()
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
consoleTabBar:removeTab(tab)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
function Console.getTab(name)
|
|
|
|
function Console.getTab(name)
|
|
|
|