diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2024-09-19 15:00:37 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2024-09-19 15:00:37 -0400 |
commit | 50513bab2d6b1823f983c145553b8a6af44c2f28 (patch) | |
tree | 5a7759cf3b6f840ec0f3cedd5bd0138a2ffe80f6 /indra/newview | |
parent | 1154e02fdded191147284997707a3b18ee3b43fd (diff) |
Make login.lua enhance plain grid='agni' to required form.
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/scripts/lua/require/login.lua | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/indra/newview/scripts/lua/require/login.lua b/indra/newview/scripts/lua/require/login.lua index 919434f3a5..37c9093a21 100644 --- a/indra/newview/scripts/lua/require/login.lua +++ b/indra/newview/scripts/lua/require/login.lua @@ -18,16 +18,25 @@ local function ensure_login_state(op) end end +local function fullgrid(grid) + if string.find(grid, '.', 1, true) then + return grid + else + return `util.{grid}.secondlife.com` + end +end + function login.login(...) ensure_login_state('login') local args = mapargs('username,grid,slurl', ...) args.op = 'login' + args.grid = fullgrid(args.grid) return leap.request('LLPanelLogin', args) end function login.savedLogins(grid) ensure_login_state('savedLogins') - return leap.request('LLPanelLogin', {op='savedLogins', grid=grid})['logins'] + return leap.request('LLPanelLogin', {op='savedLogins', grid=fullgrid(grid)})['logins'] end return login |