summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Nikolenko <maximnproductengine@lindenlab.com>2024-10-30 19:44:39 +0200
committerGitHub <noreply@github.com>2024-10-30 19:44:39 +0200
commit6856c475e89a52568dcabfb730f42bff6d477203 (patch)
treec0099601b7e31c5ebdec95bdb31e532cfa1c0da1
parent9c2a4aad3025ada41e3ff39fb40375245613a14d (diff)
parent5484f34f9945a6f0060dd74d07ff2701d393f37b (diff)
Merge pull request #2909 from secondlife/maxim/viewer_2245
undefined
-rw-r--r--indra/newview/llfloaterimnearbychat.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/indra/newview/llfloaterimnearbychat.cpp b/indra/newview/llfloaterimnearbychat.cpp
index 6c3e8391cd..f108b5198e 100644
--- a/indra/newview/llfloaterimnearbychat.cpp
+++ b/indra/newview/llfloaterimnearbychat.cpp
@@ -37,6 +37,7 @@
#include "llfloatersidepanelcontainer.h"
#include "llfocusmgr.h"
#include "lllogchat.h"
+#include "llregex.h"
#include "llresizebar.h"
#include "llresizehandle.h"
#include "lldraghandle.h"
@@ -55,6 +56,7 @@
#include "llfloaterimnearbychatlistener.h"
#include "llagent.h" // gAgent
#include "llgesturemgr.h"
+#include "llluamanager.h"
#include "llmultigesture.h"
#include "llkeyboard.h"
#include "llanimationstates.h"
@@ -606,6 +608,13 @@ void LLFloaterIMNearbyChat::sendChat( EChatType type )
if(!LLGestureMgr::instance().triggerAndReviseString(utf8text, &utf8_revised_text))
{
utf8_revised_text = utf8text;
+ // check if the message is /filename.lua and execute the Lua script
+ static const boost::regex is_lua_script("^/.*\\.luau?(?:\\s+\\S+)*$");
+ if (ll_regex_match(utf8text, is_lua_script))
+ {
+ LLLUAmanager::runScriptFile(utf8text.substr(1));
+ utf8_revised_text.clear();
+ }
}
}
else