From a9f6f7662f21cedf1b171545dc1bf2de1188abcc Mon Sep 17 00:00:00 2001 From: Sportacus Date: Fri, 8 Jan 2016 08:20:17 -0500 Subject: [PATCH] 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. --- modules/game_console/console.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/game_console/console.lua b/modules/game_console/console.lua index c06f3263..25c2e7a7 100644 --- a/modules/game_console/console.lua +++ b/modules/game_console/console.lua @@ -709,6 +709,8 @@ function processChannelTabMenu(tab, mousePos, mouseButton) local menu = g_ui.createWidget('PopupMenu') menu:setGameMenu(true) + local worldName = g_game.getWorldName() + local characterName = g_game.getCharacterName() channelName = tab:getText() if tab ~= defaultTab and tab ~= serverTab then menu:addOption(tr('Close'), function() removeTab(channelName) end) @@ -726,7 +728,7 @@ function processChannelTabMenu(tab, mousePos, mouseButton) table.insert(lines, label:getText()) end - local filename = channelName .. '.txt' + local filename = worldName .. ' - ' .. characterName .. ' - ' .. channelName .. '.txt' local filepath = '/' .. filename -- extra information at the beginning