Improve encrypt/decrypt algorithms

This commit is contained in:
Eduardo Bart
2013-01-29 11:50:24 -02:00
parent f492d291eb
commit 4751941e4f
5 changed files with 35 additions and 23 deletions

View File

@@ -89,9 +89,7 @@ function init()
-- generate machine uuid, this is a security measure for storing passwords
if not g_crypt.setMachineUUID(g_configs.get('uuid')) then
local uuid = g_crypt.genUUID()
g_crypt.setMachineUUID(uuid)
g_configs.set('uuid', uuid)
g_configs.set('uuid', g_crypt.getMachineUUID())
g_configs.save()
end

View File

@@ -553,7 +553,7 @@ function processMouseAction(menuPosition, mouseButton, autoWalkPos, lookThing, u
player:stopAutoWalk()
if autoWalkPos and keyboardModifiers == KeyboardNoModifier and mouseButton == MouseLeftButton then
player.onAutoWalkFail = function() modules.game_textmessage.displayStatusMessage(tr('There is no way.')) end
player.onAutoWalkFail = function() modules.game_textmessage.displayFailureMessage(tr('There is no way.')) end
player:autoWalk(autoWalkPos)
return true
end

View File

@@ -387,7 +387,7 @@ end
function minimapAutoWalk(pos)
local player = g_game.getLocalPlayer()
if not player:autoWalk(pos) then
modules.game_textmessage.displayStatusMessage(tr('There is no way.'))
player.onAutoWalkFail = function() modules.game_textmessage.displayFailureMessage(tr('There is no way.')) end
return false
else
return true