Skip to content

Commit

Permalink
Fixed per-server configuration load @ write
Browse files Browse the repository at this point in the history
  • Loading branch information
zygzagZ committed Mar 15, 2017
1 parent 1aebca6 commit 94f5b33
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions candybot.lua
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ function CandyBot.getWriteDir()
end

function CandyBot.getOptions()
local char = g_game.getCharacterName() .. '@' .. tostring(G.host) .. ':' .. tostring(G.port)
local char = g_game.getCharacterName() .. '@' .. tostring(G.host) .. '@' .. tostring(G.port)
return CandyBot.options and CandyBot.options[char] or CandyBot.defaultOptions
end

Expand All @@ -176,7 +176,7 @@ end

function CandyBot.loadOptions()
local char = g_game.getCharacterName()
local server = tostring(G.host) .. ':' .. tostring(G.port)
local server = tostring(G.host) .. '@' .. tostring(G.port)

if CandyBot.options[char .. '@' .. server] ~= nil then
for i, v in pairs(CandyBot.options[char .. '@' .. server]) do
Expand Down Expand Up @@ -246,7 +246,7 @@ function CandyBot.changeOption(key, state, loading)

Modules.notifyChange(key, state)

local char = g_game.getCharacterName() .. '@' .. tostring(G.host) .. ':' .. tostring(G.port)
local char = g_game.getCharacterName() .. '@' .. tostring(G.host) .. '@' .. tostring(G.port)

if CandyBot.options[char] == nil then
CandyBot.options[char] = {}
Expand Down

0 comments on commit 94f5b33

Please sign in to comment.