aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorUbitUmarov2019-04-08 13:50:51 +0100
committerUbitUmarov2019-04-08 13:50:51 +0100
commitb104934a258c34a77c0470b8495d9d286c82f4f5 (patch)
treedab6471bc23aea9ebea3f1132a99d958be63552f
parentmake robust ban by MAC options visible, thx Bill Blight (diff)
downloadopensim-SC-b104934a258c34a77c0470b8495d9d286c82f4f5.zip
opensim-SC-b104934a258c34a77c0470b8495d9d286c82f4f5.tar.gz
opensim-SC-b104934a258c34a77c0470b8495d9d286c82f4f5.tar.bz2
opensim-SC-b104934a258c34a77c0470b8495d9d286c82f4f5.tar.xz
add osGetPSTWallclock() returns wall clock in PST or PDT, for those that for some odd reason think need it. OpenSim girds shoudl use UTC (gtm) but whatever
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs23
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs1
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs6
-rw-r--r--bin/ScriptSyntax.xml47
4 files changed, 55 insertions, 22 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index 7348499..4a74c15 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -145,6 +145,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
145 protected IUrlModule m_UrlModule = null; 145 protected IUrlModule m_UrlModule = null;
146 protected ISoundModule m_SoundModule = null; 146 protected ISoundModule m_SoundModule = null;
147 internal IConfig m_osslconfig; 147 internal IConfig m_osslconfig;
148 internal TimeZoneInfo PSTTimeZone = null;
148 149
149 public void Initialize( 150 public void Initialize(
150 IScriptEngine scriptEngine, SceneObjectPart host, TaskInventoryItem item) 151 IScriptEngine scriptEngine, SceneObjectPart host, TaskInventoryItem item)
@@ -201,7 +202,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
201 default: 202 default:
202 break; 203 break;
203 } 204 }
204 } 205
206 try
207 {
208 PSTTimeZone = TimeZoneInfo.FindSystemTimeZoneById("Pacific Standard Time");
209 }
210 catch
211 {
212 PSTTimeZone = null;
213 }
214 }
205 215
206 public override Object InitializeLifetimeService() 216 public override Object InitializeLifetimeService()
207 { 217 {
@@ -5441,5 +5451,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5441 return String.Empty; 5451 return String.Empty;
5442 return detectedParams.Key.ToString(); 5452 return detectedParams.Key.ToString();
5443 } 5453 }
5454
5455 // returns PST or PDT wall clock
5456 public LSL_Float osGetPSTWallclock()
5457 {
5458 m_host.AddScriptLPS(1);
5459 if(PSTTimeZone == null)
5460 return DateTime.Now.TimeOfDay.TotalSeconds;
5461
5462 DateTime time = TimeZoneInfo.ConvertTime(DateTime.UtcNow, PSTTimeZone);
5463 return time.TimeOfDay.TotalSeconds;
5464 }
5444 } 5465 }
5445} \ No newline at end of file 5466} \ No newline at end of file
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
index 49b3f74..26bac00 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
@@ -549,5 +549,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
549 LSL_String osGetInventoryName(LSL_Key itemId); 549 LSL_String osGetInventoryName(LSL_Key itemId);
550 LSL_String osGetInventoryDesc(LSL_String itemNameOrId); 550 LSL_String osGetInventoryDesc(LSL_String itemNameOrId);
551 LSL_Key osGetLastChangedEventKey(); 551 LSL_Key osGetLastChangedEventKey();
552 LSL_Float osGetPSTWallclock();
552 } 553 }
553} 554}
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
index fb491e4..7a4a5fb 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
@@ -1381,5 +1381,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
1381 { 1381 {
1382 return m_OSSL_Functions.osGetLastChangedEventKey(); 1382 return m_OSSL_Functions.osGetLastChangedEventKey();
1383 } 1383 }
1384
1385 public LSL_Float osGetPSTWallclock()
1386 {
1387 return m_OSSL_Functions.osGetPSTWallclock();
1388 }
1389
1384 } 1390 }
1385} 1391}
diff --git a/bin/ScriptSyntax.xml b/bin/ScriptSyntax.xml
index 8f2f6002..989984a 100644
--- a/bin/ScriptSyntax.xml
+++ b/bin/ScriptSyntax.xml
@@ -1,4 +1,4 @@
120392e48-fad2-094e-bc5b-cda003a1e940 1e796a21f-5a66-e4ec-833f-c4896b8e87e4
2<llsd><map><key>llsd-lsl-syntax-version</key><integer>2</integer> 2<llsd><map><key>llsd-lsl-syntax-version</key><integer>2</integer>
3<key>controls</key> 3<key>controls</key>
4<map> 4<map>
@@ -6116,14 +6116,15 @@
6116 <key>arguments</key><array> 6116 <key>arguments</key><array>
6117 <map><key>a</key><map><key>type</key><string>float</string></map></map> 6117 <map><key>a</key><map><key>type</key><string>float</string></map></map>
6118 <map><key>b</key><map><key>type</key><string>float</string></map></map> 6118 <map><key>b</key><map><key>type</key><string>float</string></map></map>
6119 <map><key>margin</key><map><key>type</key><string>float</string></map></map>
6119 </array> 6120 </array>
6120 </map> 6121 </map>
6121 <key>osApproxEquals</key> 6122 <key>osApproxEquals</key>
6122 <map> 6123 <map>
6123 <key>return</key><string>integer</string> 6124 <key>return</key><string>integer</string>
6124 <key>arguments</key><array> 6125 <key>arguments</key><array>
6125 <map><key>a</key><map><key>type</key><string>float</string></map></map> 6126 <map><key>ra</key><map><key>type</key><string>rotation</string></map></map>
6126 <map><key>b</key><map><key>type</key><string>float</string></map></map> 6127 <map><key>rb</key><map><key>type</key><string>rotation</string></map></map>
6127 <map><key>margin</key><map><key>type</key><string>float</string></map></map> 6128 <map><key>margin</key><map><key>type</key><string>float</string></map></map>
6128 </array> 6129 </array>
6129 </map> 6130 </map>
@@ -6148,17 +6149,16 @@
6148 <map> 6149 <map>
6149 <key>return</key><string>integer</string> 6150 <key>return</key><string>integer</string>
6150 <key>arguments</key><array> 6151 <key>arguments</key><array>
6151 <map><key>ra</key><map><key>type</key><string>rotation</string></map></map> 6152 <map><key>va</key><map><key>type</key><string>vector</string></map></map>
6152 <map><key>rb</key><map><key>type</key><string>rotation</string></map></map> 6153 <map><key>vb</key><map><key>type</key><string>vector</string></map></map>
6153 <map><key>margin</key><map><key>type</key><string>float</string></map></map>
6154 </array> 6154 </array>
6155 </map> 6155 </map>
6156 <key>osApproxEquals</key> 6156 <key>osApproxEquals</key>
6157 <map> 6157 <map>
6158 <key>return</key><string>integer</string> 6158 <key>return</key><string>integer</string>
6159 <key>arguments</key><array> 6159 <key>arguments</key><array>
6160 <map><key>va</key><map><key>type</key><string>vector</string></map></map> 6160 <map><key>a</key><map><key>type</key><string>float</string></map></map>
6161 <map><key>vb</key><map><key>type</key><string>vector</string></map></map> 6161 <map><key>b</key><map><key>type</key><string>float</string></map></map>
6162 </array> 6162 </array>
6163 </map> 6163 </map>
6164 <key>osAvatarName2Key</key> 6164 <key>osAvatarName2Key</key>
@@ -6284,6 +6284,8 @@
6284 <key>return</key><string>string</string> 6284 <key>return</key><string>string</string>
6285 <key>arguments</key><array> 6285 <key>arguments</key><array>
6286 <map><key>drawList</key><map><key>type</key><string>string</string></map></map> 6286 <map><key>drawList</key><map><key>type</key><string>string</string></map></map>
6287 <map><key>startX</key><map><key>type</key><string>integer</string></map></map>
6288 <map><key>startY</key><map><key>type</key><string>integer</string></map></map>
6287 <map><key>endX</key><map><key>type</key><string>integer</string></map></map> 6289 <map><key>endX</key><map><key>type</key><string>integer</string></map></map>
6288 <map><key>endY</key><map><key>type</key><string>integer</string></map></map> 6290 <map><key>endY</key><map><key>type</key><string>integer</string></map></map>
6289 </array> 6291 </array>
@@ -6293,8 +6295,6 @@
6293 <key>return</key><string>string</string> 6295 <key>return</key><string>string</string>
6294 <key>arguments</key><array> 6296 <key>arguments</key><array>
6295 <map><key>drawList</key><map><key>type</key><string>string</string></map></map> 6297 <map><key>drawList</key><map><key>type</key><string>string</string></map></map>
6296 <map><key>startX</key><map><key>type</key><string>integer</string></map></map>
6297 <map><key>startY</key><map><key>type</key><string>integer</string></map></map>
6298 <map><key>endX</key><map><key>type</key><string>integer</string></map></map> 6298 <map><key>endX</key><map><key>type</key><string>integer</string></map></map>
6299 <map><key>endY</key><map><key>type</key><string>integer</string></map></map> 6299 <map><key>endY</key><map><key>type</key><string>integer</string></map></map>
6300 </array> 6300 </array>
@@ -6433,13 +6433,13 @@
6433 <map> 6433 <map>
6434 <key>arguments</key><array> 6434 <key>arguments</key><array>
6435 <map><key>avatar</key><map><key>type</key><string>string</string></map></map> 6435 <map><key>avatar</key><map><key>type</key><string>string</string></map></map>
6436 <map><key>target</key><map><key>type</key><string>string</string></map></map>
6437 </array> 6436 </array>
6438 </map> 6437 </map>
6439 <key>osForceOtherSit</key> 6438 <key>osForceOtherSit</key>
6440 <map> 6439 <map>
6441 <key>arguments</key><array> 6440 <key>arguments</key><array>
6442 <map><key>avatar</key><map><key>type</key><string>string</string></map></map> 6441 <map><key>avatar</key><map><key>type</key><string>string</string></map></map>
6442 <map><key>target</key><map><key>type</key><string>string</string></map></map>
6443 </array> 6443 </array>
6444 </map> 6444 </map>
6445 <key>osFormatString</key> 6445 <key>osFormatString</key>
@@ -6653,6 +6653,11 @@
6653 <map><key>rules</key><map><key>type</key><string>list</string></map></map> 6653 <map><key>rules</key><map><key>type</key><string>list</string></map></map>
6654 </array> 6654 </array>
6655 </map> 6655 </map>
6656 <key>osGetPSTWallclock</key>
6657 <map>
6658 <key>return</key><string>float</string>
6659 <key>arguments</key><undef/>
6660 </map>
6656 <key>osGetRegionMapTexture</key> 6661 <key>osGetRegionMapTexture</key>
6657 <map> 6662 <map>
6658 <key>return</key><string>key</string> 6663 <key>return</key><string>key</string>
@@ -6865,6 +6870,7 @@
6865 <map><key>name</key><map><key>type</key><string>string</string></map></map> 6870 <map><key>name</key><map><key>type</key><string>string</string></map></map>
6866 <map><key>position</key><map><key>type</key><string>vector</string></map></map> 6871 <map><key>position</key><map><key>type</key><string>vector</string></map></map>
6867 <map><key>notecard</key><map><key>type</key><string>string</string></map></map> 6872 <map><key>notecard</key><map><key>type</key><string>string</string></map></map>
6873 <map><key>options</key><map><key>type</key><string>integer</string></map></map>
6868 </array> 6874 </array>
6869 </map> 6875 </map>
6870 <key>osNpcCreate</key> 6876 <key>osNpcCreate</key>
@@ -6875,7 +6881,6 @@
6875 <map><key>name</key><map><key>type</key><string>string</string></map></map> 6881 <map><key>name</key><map><key>type</key><string>string</string></map></map>
6876 <map><key>position</key><map><key>type</key><string>vector</string></map></map> 6882 <map><key>position</key><map><key>type</key><string>vector</string></map></map>
6877 <map><key>notecard</key><map><key>type</key><string>string</string></map></map> 6883 <map><key>notecard</key><map><key>type</key><string>string</string></map></map>
6878 <map><key>options</key><map><key>type</key><string>integer</string></map></map>
6879 </array> 6884 </array>
6880 </map> 6885 </map>
6881 <key>osNpcGetOwner</key> 6886 <key>osNpcGetOwner</key>
@@ -7100,13 +7105,13 @@
7100 <key>osRegionNotice</key> 7105 <key>osRegionNotice</key>
7101 <map> 7106 <map>
7102 <key>arguments</key><array> 7107 <key>arguments</key><array>
7103 <map><key>agentID</key><map><key>type</key><string>key</string></map></map>
7104 <map><key>msg</key><map><key>type</key><string>string</string></map></map> 7108 <map><key>msg</key><map><key>type</key><string>string</string></map></map>
7105 </array> 7109 </array>
7106 </map> 7110 </map>
7107 <key>osRegionNotice</key> 7111 <key>osRegionNotice</key>
7108 <map> 7112 <map>
7109 <key>arguments</key><array> 7113 <key>arguments</key><array>
7114 <map><key>agentID</key><map><key>type</key><string>key</string></map></map>
7110 <map><key>msg</key><map><key>type</key><string>string</string></map></map> 7115 <map><key>msg</key><map><key>type</key><string>string</string></map></map>
7111 </array> 7116 </array>
7112 </map> 7117 </map>
@@ -7478,6 +7483,8 @@
7478 <key>arguments</key><array> 7483 <key>arguments</key><array>
7479 <map><key>src</key><map><key>type</key><string>string</string></map></map> 7484 <map><key>src</key><map><key>type</key><string>string</string></map></map>
7480 <map><key>value</key><map><key>type</key><string>string</string></map></map> 7485 <map><key>value</key><map><key>type</key><string>string</string></map></map>
7486 <map><key>start</key><map><key>type</key><string>integer</string></map></map>
7487 <map><key>count</key><map><key>type</key><string>integer</string></map></map>
7481 <map><key>ignorecase</key><map><key>type</key><string>integer</string></map></map> 7488 <map><key>ignorecase</key><map><key>type</key><string>integer</string></map></map>
7482 </array> 7489 </array>
7483 </map> 7490 </map>
@@ -7487,8 +7494,6 @@
7487 <key>arguments</key><array> 7494 <key>arguments</key><array>
7488 <map><key>src</key><map><key>type</key><string>string</string></map></map> 7495 <map><key>src</key><map><key>type</key><string>string</string></map></map>
7489 <map><key>value</key><map><key>type</key><string>string</string></map></map> 7496 <map><key>value</key><map><key>type</key><string>string</string></map></map>
7490 <map><key>start</key><map><key>type</key><string>integer</string></map></map>
7491 <map><key>count</key><map><key>type</key><string>integer</string></map></map>
7492 <map><key>ignorecase</key><map><key>type</key><string>integer</string></map></map> 7497 <map><key>ignorecase</key><map><key>type</key><string>integer</string></map></map>
7493 </array> 7498 </array>
7494 </map> 7499 </map>
@@ -7554,8 +7559,7 @@
7554 <map> 7559 <map>
7555 <key>arguments</key><array> 7560 <key>arguments</key><array>
7556 <map><key>agent</key><map><key>type</key><string>string</string></map></map> 7561 <map><key>agent</key><map><key>type</key><string>string</string></map></map>
7557 <map><key>regionX</key><map><key>type</key><string>integer</string></map></map> 7562 <map><key>regionName</key><map><key>type</key><string>string</string></map></map>
7558 <map><key>regionY</key><map><key>type</key><string>integer</string></map></map>
7559 <map><key>position</key><map><key>type</key><string>vector</string></map></map> 7563 <map><key>position</key><map><key>type</key><string>vector</string></map></map>
7560 <map><key>lookat</key><map><key>type</key><string>vector</string></map></map> 7564 <map><key>lookat</key><map><key>type</key><string>vector</string></map></map>
7561 </array> 7565 </array>
@@ -7564,6 +7568,8 @@
7564 <map> 7568 <map>
7565 <key>arguments</key><array> 7569 <key>arguments</key><array>
7566 <map><key>agent</key><map><key>type</key><string>string</string></map></map> 7570 <map><key>agent</key><map><key>type</key><string>string</string></map></map>
7571 <map><key>regionX</key><map><key>type</key><string>integer</string></map></map>
7572 <map><key>regionY</key><map><key>type</key><string>integer</string></map></map>
7567 <map><key>position</key><map><key>type</key><string>vector</string></map></map> 7573 <map><key>position</key><map><key>type</key><string>vector</string></map></map>
7568 <map><key>lookat</key><map><key>type</key><string>vector</string></map></map> 7574 <map><key>lookat</key><map><key>type</key><string>vector</string></map></map>
7569 </array> 7575 </array>
@@ -7572,7 +7578,6 @@
7572 <map> 7578 <map>
7573 <key>arguments</key><array> 7579 <key>arguments</key><array>
7574 <map><key>agent</key><map><key>type</key><string>string</string></map></map> 7580 <map><key>agent</key><map><key>type</key><string>string</string></map></map>
7575 <map><key>regionName</key><map><key>type</key><string>string</string></map></map>
7576 <map><key>position</key><map><key>type</key><string>vector</string></map></map> 7581 <map><key>position</key><map><key>type</key><string>vector</string></map></map>
7577 <map><key>lookat</key><map><key>type</key><string>vector</string></map></map> 7582 <map><key>lookat</key><map><key>type</key><string>vector</string></map></map>
7578 </array> 7583 </array>
@@ -7590,6 +7595,7 @@
7590 <key>osTeleportOwner</key> 7595 <key>osTeleportOwner</key>
7591 <map> 7596 <map>
7592 <key>arguments</key><array> 7597 <key>arguments</key><array>
7598 <map><key>regionName</key><map><key>type</key><string>string</string></map></map>
7593 <map><key>position</key><map><key>type</key><string>vector</string></map></map> 7599 <map><key>position</key><map><key>type</key><string>vector</string></map></map>
7594 <map><key>lookat</key><map><key>type</key><string>vector</string></map></map> 7600 <map><key>lookat</key><map><key>type</key><string>vector</string></map></map>
7595 </array> 7601 </array>
@@ -7597,7 +7603,8 @@
7597 <key>osTeleportOwner</key> 7603 <key>osTeleportOwner</key>
7598 <map> 7604 <map>
7599 <key>arguments</key><array> 7605 <key>arguments</key><array>
7600 <map><key>regionName</key><map><key>type</key><string>string</string></map></map> 7606 <map><key>regionX</key><map><key>type</key><string>integer</string></map></map>
7607 <map><key>regionY</key><map><key>type</key><string>integer</string></map></map>
7601 <map><key>position</key><map><key>type</key><string>vector</string></map></map> 7608 <map><key>position</key><map><key>type</key><string>vector</string></map></map>
7602 <map><key>lookat</key><map><key>type</key><string>vector</string></map></map> 7609 <map><key>lookat</key><map><key>type</key><string>vector</string></map></map>
7603 </array> 7610 </array>
@@ -7605,8 +7612,6 @@
7605 <key>osTeleportOwner</key> 7612 <key>osTeleportOwner</key>
7606 <map> 7613 <map>
7607 <key>arguments</key><array> 7614 <key>arguments</key><array>
7608 <map><key>regionX</key><map><key>type</key><string>integer</string></map></map>
7609 <map><key>regionY</key><map><key>type</key><string>integer</string></map></map>
7610 <map><key>position</key><map><key>type</key><string>vector</string></map></map> 7615 <map><key>position</key><map><key>type</key><string>vector</string></map></map>
7611 <map><key>lookat</key><map><key>type</key><string>vector</string></map></map> 7616 <map><key>lookat</key><map><key>type</key><string>vector</string></map></map>
7612 </array> 7617 </array>