summaryrefslogtreecommitdiff
path: root/indra/newview/llluamanager.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2023-09-14 20:44:12 +0100
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2023-09-14 20:44:12 +0100
commit110e442bc335b88fc3e52ea83f52cb46514dd0a7 (patch)
treef92fe3fc3652d2c160a60f94a2650e7af1b26e86 /indra/newview/llluamanager.cpp
parent1d5db5e5926954b9f22469cd736d6cfb396491f4 (diff)
parenta93e6c12fbf8a0b05bd2db820a41aa2e1182c143 (diff)
Merge branch 'DRTVWR-589' of github.com:/secondlife/viewer-private into DRTVWR-589
Diffstat (limited to 'indra/newview/llluamanager.cpp')
-rw-r--r--indra/newview/llluamanager.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/indra/newview/llluamanager.cpp b/indra/newview/llluamanager.cpp
index b251ebb6d5..7045379964 100644
--- a/indra/newview/llluamanager.cpp
+++ b/indra/newview/llluamanager.cpp
@@ -271,3 +271,22 @@ void LLLUAmanager::runScriptLine(const std::string &cmd, script_finished_fn cb)
}
});
}
+
+void LLLUAmanager::runScriptOnLogin()
+{
+ std::string filename = gSavedSettings.getString("AutorunLuaScriptName");
+ if (filename.empty())
+ {
+ LL_INFOS() << "Script name wasn't set." << LL_ENDL;
+ return;
+ }
+
+ filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, filename);
+ if (!gDirUtilp->fileExists(filename))
+ {
+ LL_INFOS() << filename << " was not found." << LL_ENDL;
+ return;
+ }
+
+ runScriptFile(filename);
+}