Log file saves specific to server and character

Changed it so when you save a log file, the log file name includes the
server name and the characters name, in the file name.

This is to improve organization, to separate logs based off the server
you are on, and the character you are logged in.
master
Sportacus 8 years ago committed by Eduardo Bart
parent 13789c5612
commit a9f6f7662f

@ -709,6 +709,8 @@ function processChannelTabMenu(tab, mousePos, mouseButton)
local menu = g_ui.createWidget('PopupMenu') local menu = g_ui.createWidget('PopupMenu')
menu:setGameMenu(true) menu:setGameMenu(true)
local worldName = g_game.getWorldName()
local characterName = g_game.getCharacterName()
channelName = tab:getText() channelName = tab:getText()
if tab ~= defaultTab and tab ~= serverTab then if tab ~= defaultTab and tab ~= serverTab then
menu:addOption(tr('Close'), function() removeTab(channelName) end) menu:addOption(tr('Close'), function() removeTab(channelName) end)
@ -726,7 +728,7 @@ function processChannelTabMenu(tab, mousePos, mouseButton)
table.insert(lines, label:getText()) table.insert(lines, label:getText())
end end
local filename = channelName .. '.txt' local filename = worldName .. ' - ' .. characterName .. ' - ' .. channelName .. '.txt'
local filepath = '/' .. filename local filepath = '/' .. filename
-- extra information at the beginning -- extra information at the beginning

Loading…
Cancel
Save