From e977761071a2d614a9a621437fbf86479b414759 Mon Sep 17 00:00:00 2001
From: SignpostMarv
Date: Tue, 23 Oct 2012 15:42:16 +0100
Subject: adding ability for listeners to be filtered by regular expressions
and a general-purpose function to see if a given string matches a given regex
---
.../Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs | 10 ++++++++++
OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs | 10 ++++++++++
2 files changed, 20 insertions(+)
(limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Runtime')
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs
index 62bd6b8..880841b 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs
@@ -716,5 +716,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
public static readonly LSLInteger RCERR_UNKNOWN = -1;
public static readonly LSLInteger RCERR_SIM_PERF_LOW = -2;
public static readonly LSLInteger RCERR_CAST_TIME_EXCEEDED = 3;
+
+ ///
+ /// process name parameter as regex
+ ///
+ public const int OS_LISTEN_REGEX_NAME = 0x1;
+
+ ///
+ /// process message parameter as regex
+ ///
+ public const int OS_LISTEN_REGEX_MESSAGE = 0x2;
}
}
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
index dee1b28..afa9ae0 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
@@ -992,5 +992,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
{
m_OSSL_Functions.osForceDropAttachmentAt(pos, rot);
}
+
+ public LSL_Integer osListenRegex(int channelID, string name, string ID, string msg, int regexBitfield)
+ {
+ return m_OSSL_Functions.osListenRegex(channelID, name, ID, msg, regexBitfield);
+ }
+
+ public LSL_Integer osRegexIsMatch(string input, string pattern)
+ {
+ return m_OSSL_Functions.osRegexIsMatch(input, pattern);
+ }
}
}
--
cgit v1.1