Don't crash when user forgets last name on non-SL grids.

This commit is contained in:
Aleric Inglewood
2012-12-16 23:39:58 +01:00
parent 11f30bc28d
commit aab764a6e5
2 changed files with 25 additions and 0 deletions

View File

@@ -978,6 +978,15 @@ bool idle_startup()
LL_INFOS("AppInit") << "Attempting login as: " << firstname << " " << lastname << LL_ENDL;
gDebugInfo["LoginName"] = firstname + " " + lastname;
}
else
{
// User tried to login on a non-SecondLife grid with an empty lastname.
LLSD subs;
subs["GRIDNAME"] = gHippoGridManager->getConnectedGrid()->getGridName();
LLNotificationsUtil::add(firstname.empty() ? "EmptyFirstNameMessage" : "EmptyLastNameMessage", subs);
LLStartUp::setStartupState(STATE_LOGIN_SHOW);
return FALSE;
}
LLScriptEdCore::parseFunctions("lsl_functions_sl.xml"); //Singu Note: This parsing function essentially replaces the entirety of the lscript_library library

View File

@@ -264,6 +264,22 @@ An error occurred while updating [APP_NAME]. Please download the latest version
yestext="Ok"/>
</notification>
<notification
icon="alertmodal.tga"
name="EmptyFirstNameMessage"
type="alertmodal">
[GRIDNAME] requires a non-empty first name to login.
Please try again.
</notification>
<notification
icon="alertmodal.tga"
name="EmptyLastNameMessage"
type="alertmodal">
[GRIDNAME] requires a non-empty last name to login.
Please try again.
</notification>
<notification
icon="alertmodal.tga"
name="LoginFailedNoNetwork"