Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/gui/prelobby/prelobby.js
Show First 20 Lines • Show All 185 Lines • ▼ Show 20 Lines | case "registered": | ||||
Engine.GetGUIObjectByName("connectPassword").caption = password; | Engine.GetGUIObjectByName("connectPassword").caption = password; | ||||
Engine.StopXmppClient(); | Engine.StopXmppClient(); | ||||
switchPage("connect"); | switchPage("connect"); | ||||
break; | break; | ||||
case "connected": | case "connected": | ||||
{ | { | ||||
Engine.PopGuiPage(); | Engine.PopGuiPage(); | ||||
Engine.SwitchGuiPage("page_lobby.xml"); | Engine.SwitchGuiPage("page_lobby.xml"); | ||||
Engine.ConfigDB_CreateValue("user", "playername.multiplayer", username); | |||||
Engine.ConfigDB_WriteValueToFile("user", "playername.multiplayer", username, "config/user.cfg"); | |||||
Engine.ConfigDB_CreateValue("user", "lobby.login", username); | Engine.ConfigDB_CreateValue("user", "lobby.login", username); | ||||
Engine.ConfigDB_WriteValueToFile("user", "lobby.login", username, "config/user.cfg"); | Engine.ConfigDB_WriteValueToFile("user", "lobby.login", username, "config/user.cfg"); | ||||
// We only store the encrypted password, so make sure to re-encrypt it if changed before saving. | // We only store the encrypted password, so make sure to re-encrypt it if changed before saving. | ||||
if (password != g_EncryptedPassword.substring(0, 10)) | if (password != g_EncryptedPassword.substring(0, 10)) | ||||
g_EncryptedPassword = Engine.EncryptPassword(password, username); | g_EncryptedPassword = Engine.EncryptPassword(password, username); | ||||
Engine.ConfigDB_CreateValue("user", "lobby.password", g_EncryptedPassword); | Engine.ConfigDB_CreateValue("user", "lobby.password", g_EncryptedPassword); | ||||
Engine.ConfigDB_WriteValueToFile("user", "lobby.password", g_EncryptedPassword, "config/user.cfg"); | Engine.ConfigDB_WriteValueToFile("user", "lobby.password", g_EncryptedPassword, "config/user.cfg"); | ||||
break; | break; | ||||
▲ Show 20 Lines • Show All 79 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator