dont reset password on connection errors

master
Eduardo Bart 13 years ago
parent 196a95f4c0
commit 4a179cd212

@ -18,10 +18,12 @@ local function clearAccountFields()
Settings.remove('password')
end
local function onError(protocol, error)
local function onError(protocol, message, connectionError)
loadBox:destroy()
clearAccountFields()
local errorBox = displayErrorBox('Login Error', error)
if not connectionError then
clearAccountFields()
end
local errorBox = displayErrorBox('Login Error', message)
errorBox.onOk = EnterGame.show
end

@ -2,8 +2,10 @@
-- you can place any custom user code here
Hotkeys.bind('F1', function() Game.talk('exura gran') end)
Hotkeys.bind('F2', function() Game.talk('exori flam') end)
Hotkeys.bind('F2', function() Game.talk('exori frigo') end)
Hotkeys.bind('F3', function() Game.talk('exevo flam hur') end)
Hotkeys.bind('F4', function() Game.talk('exevo pan') end)
Hotkeys.bind('F5', function() Game.talk('exani tera') end)
Hotkeys.bind('Ctrl+R', function() runscript('otclientrc.lua') end)
if rcloaded then

@ -82,7 +82,7 @@ void ProtocolLogin::onRecv(InputMessage& inputMessage)
void ProtocolLogin::onError(const boost::system::error_code& error)
{
callLuaField("onError", error.message());
callLuaField("onError", error.message(), true);
}
void ProtocolLogin::sendLoginPacket()
@ -121,7 +121,7 @@ void ProtocolLogin::sendLoginPacket()
void ProtocolLogin::parseError(InputMessage& inputMessage)
{
std::string error = inputMessage.getString();
callLuaField("onError", error);
callLuaField("onError", error, false);
}
void ProtocolLogin::parseMOTD(InputMessage& inputMessage)

Loading…
Cancel
Save