diff options
author | Homer Horwitz | 2008-11-02 13:07:57 +0000 |
---|---|---|
committer | Homer Horwitz | 2008-11-02 13:07:57 +0000 |
commit | 499f1428f707cbb116349dc0a2f07a19658df668 (patch) | |
tree | 516cd76203c030773b0bc9bf3cd86e5581b09a46 /OpenSim/Framework/Util.cs | |
parent | Cause inventory to be fetched on scripted item gives if the destination (diff) | |
download | opensim-SC-499f1428f707cbb116349dc0a2f07a19658df668.zip opensim-SC-499f1428f707cbb116349dc0a2f07a19658df668.tar.gz opensim-SC-499f1428f707cbb116349dc0a2f07a19658df668.tar.bz2 opensim-SC-499f1428f707cbb116349dc0a2f07a19658df668.tar.xz |
- Add Util.isUUID
- Add tests for Util.isUUID
- First part of the fix for protocol interoperability between viewer 1.20 and 1.21 for friend offers.
Diffstat (limited to 'OpenSim/Framework/Util.cs')
-rw-r--r-- | OpenSim/Framework/Util.cs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs index c5334a8..b8080ec 100644 --- a/OpenSim/Framework/Util.cs +++ b/OpenSim/Framework/Util.cs | |||
@@ -64,6 +64,8 @@ namespace OpenSim.Framework | |||
64 | private static readonly DateTime unixEpoch = | 64 | private static readonly DateTime unixEpoch = |
65 | DateTime.ParseExact("1970-01-01 00:00:00 +0", "yyyy-MM-dd hh:mm:ss z", DateTimeFormatInfo.InvariantInfo).ToUniversalTime(); | 65 | DateTime.ParseExact("1970-01-01 00:00:00 +0", "yyyy-MM-dd hh:mm:ss z", DateTimeFormatInfo.InvariantInfo).ToUniversalTime(); |
66 | 66 | ||
67 | private static readonly Regex UUIDPattern = new Regex("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"); | ||
68 | |||
67 | #region Vector Equations | 69 | #region Vector Equations |
68 | 70 | ||
69 | /// <summary> | 71 | /// <summary> |
@@ -796,5 +798,10 @@ namespace OpenSim.Framework | |||
796 | x += rx; | 798 | x += rx; |
797 | y += ry; | 799 | y += ry; |
798 | } | 800 | } |
801 | |||
802 | public static bool isUUID(string s) | ||
803 | { | ||
804 | return UUIDPattern.IsMatch(s); | ||
805 | } | ||
799 | } | 806 | } |
800 | } | 807 | } |