summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/scripts/lua/require/login.lua11
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