Compare commits
481 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
aab719dc18 | ||
|
|
90d71d423c | ||
|
|
3f6feec914 | ||
|
|
6874d56452 | ||
|
|
23df5768c3 | ||
|
|
f52cee9732 | ||
|
|
37e4186ad8 | ||
|
|
5be2483e93 | ||
|
|
6418b89fd6 | ||
|
|
c67f791097 | ||
|
|
001bbb0b16 | ||
|
|
365292e38f | ||
|
|
fb2de29f77 | ||
|
|
251a70338a | ||
|
|
e210dc188a | ||
|
|
e61117669e | ||
|
|
97fcc97902 | ||
|
|
eab1b1b9f8 | ||
|
|
87d50974f8 | ||
|
|
78814adf01 | ||
|
|
341dcbede6 | ||
|
|
901aa4153e | ||
|
|
f99ba6f506 | ||
|
|
85f32f184c | ||
|
|
982d3d3faa | ||
|
|
744ed1b313 | ||
|
|
69ca1498ef | ||
|
|
9a60039d36 | ||
|
|
f030f1dbfb | ||
|
|
16641e5bd0 | ||
|
|
10db078aa4 | ||
|
|
afc93d7ac4 | ||
|
|
fa5e1dde64 | ||
|
|
0810f5f449 | ||
|
|
56e245e5e9 | ||
|
|
89362dbc4e | ||
|
|
2f6ddc68b0 | ||
|
|
25b539e593 | ||
|
|
25a9ad1722 | ||
|
|
d3bbfcc97b | ||
|
|
c3cbba7778 | ||
|
|
648932458a | ||
|
|
f1b978cdf0 | ||
|
|
cb26e8a6c6 | ||
|
|
7b8dc102d2 | ||
|
|
cf04e09521 | ||
|
|
3f50de6445 | ||
|
|
18659dfaea | ||
|
|
ba175ee50b | ||
|
|
995976c6db | ||
|
|
cfc9270bae | ||
|
|
b2b6fd6aad | ||
|
|
96454ddee2 | ||
|
|
4a0b9c411e | ||
|
|
e67b84613d | ||
|
|
d4f9982936 | ||
|
|
873ce644d3 | ||
|
|
1f8e43dd93 | ||
|
|
7bfd369b24 | ||
|
|
1da5a1ab21 | ||
|
|
af30d9b07e | ||
|
|
b2c893a7be | ||
|
|
3f80ac23b6 | ||
|
|
701109c8c9 | ||
|
|
5cbda393cd | ||
|
|
98d0440c42 | ||
|
|
8148d7e204 | ||
|
|
b43a6b0199 | ||
|
|
d01943fa40 | ||
|
|
b6daf4d4c6 | ||
|
|
4495ecd158 | ||
|
|
85df66db51 | ||
|
|
3024d0e61c | ||
|
|
5ac0447e0f | ||
|
|
bb42862639 | ||
|
|
39b8f339ce | ||
|
|
af99e5e74a | ||
|
|
f79800246a | ||
|
|
4c1b1d89eb | ||
|
|
a473482413 | ||
|
|
535ec23646 | ||
|
|
245d6435e3 | ||
|
|
8728d4ce6a | ||
|
|
44901f0b31 | ||
|
|
5054a07be2 | ||
|
|
2f1cc6a06a | ||
|
|
ff7693a14b | ||
|
|
e89f93c78c | ||
|
|
d51aee876d | ||
|
|
3ad03d41e6 | ||
|
|
69104f38f9 | ||
|
|
c6bb0d9662 | ||
|
|
73717f2ce7 | ||
|
|
03bc92d112 | ||
|
|
fd015c1ed7 | ||
|
|
8e548e4c8a | ||
|
|
44adf909b0 | ||
|
|
d43863af78 | ||
|
|
83c70dc914 | ||
|
|
10c1b15f12 | ||
|
|
be5c6658bb | ||
|
|
f0a936832b | ||
|
|
ce5c2ee506 | ||
|
|
bd33953c60 | ||
|
|
ab22de03b8 | ||
|
|
61af272956 | ||
|
|
e43ddcd5ea | ||
|
|
4041cb54f3 | ||
|
|
87b4f335af | ||
|
|
f9bb9191cf | ||
|
|
4ab7697f00 | ||
|
|
d1ba3ea60d | ||
|
|
e597b33926 | ||
|
|
3bb3a8f39b | ||
|
|
561626fe1b | ||
|
|
86519bd407 | ||
|
|
35a1949fb8 | ||
|
|
586a331a95 | ||
|
|
9b0f784c63 | ||
|
|
ac0f5e75bd | ||
|
|
f283ff5949 | ||
|
|
04ee863c33 | ||
|
|
16349c1368 | ||
|
|
7caf21c8a8 | ||
|
|
c98d215242 | ||
|
|
76cfab35a5 | ||
|
|
2e02f49fd9 | ||
|
|
548deb9153 | ||
|
|
150c4faa79 | ||
|
|
6693ef8288 | ||
|
|
ba93e36fce | ||
|
|
9ab580d1ea | ||
|
|
7deb2d9646 | ||
|
|
c77728ebf8 | ||
|
|
83487bfbec | ||
|
|
e6f475735f | ||
|
|
48486b137a | ||
|
|
4490020197 | ||
|
|
770caad0ad | ||
|
|
13e29ae3f7 | ||
|
|
b52ac8c5d1 | ||
|
|
97a907ad84 | ||
|
|
7ced077821 | ||
|
|
fdbd448cc7 | ||
|
|
d8c88f4894 | ||
|
|
d558bbfa35 | ||
|
|
992dc1c2c7 | ||
|
|
ce1d3e9c96 | ||
|
|
a8a712e1f8 | ||
|
|
5a71cbe530 | ||
|
|
c2bdb36c11 | ||
|
|
6d03a5d01b | ||
|
|
ad75cb2682 | ||
|
|
f46478f1df | ||
|
|
7c811c39c8 | ||
|
|
e18d6c0956 | ||
|
|
a7af8345a5 | ||
|
|
b5ecc31096 | ||
|
|
3a297c7fe6 | ||
|
|
c3243ce0ce | ||
|
|
ace552ecc5 | ||
|
|
1d75570c59 | ||
|
|
70ccc63b83 | ||
|
|
31373ee099 | ||
|
|
afaf7b5b94 | ||
|
|
6d0f66ae87 | ||
|
|
207233335e | ||
|
|
e9fbfd0905 | ||
|
|
c35f974637 | ||
|
|
a4007cbe71 | ||
|
|
d70e0b1189 | ||
|
|
a9ce40a722 | ||
|
|
8d207fd8e6 | ||
|
|
2487adf0b1 | ||
|
|
4aa725f60b | ||
|
|
0686a2fba9 | ||
|
|
b6305011db | ||
|
|
9cdf5199df | ||
|
|
632dad337b | ||
|
|
08234d0097 | ||
|
|
d68ba391fc | ||
|
|
603a140eb7 | ||
|
|
fd31f05cf0 | ||
|
|
a8152c57b3 | ||
|
|
4753d14a19 | ||
|
|
ee5e61d448 | ||
|
|
41b76c4b9e | ||
|
|
314de0fc49 | ||
|
|
93f7e4fb9d | ||
|
|
f8adf4de2f | ||
|
|
08f0274b5a | ||
|
|
94748aab84 | ||
|
|
468d1cf03e | ||
|
|
e8e6bc0c6a | ||
|
|
c7b9d460e0 | ||
|
|
e263368656 | ||
|
|
4b6a9d107d | ||
|
|
ee5454fd4a | ||
|
|
38d2d6a20c | ||
|
|
7e493b9665 | ||
|
|
b7c1a37676 | ||
|
|
4fe042aa7f | ||
|
|
a83218fd08 | ||
|
|
221af2da70 | ||
|
|
c6c6ac0a3e | ||
|
|
a5fdfd6343 | ||
|
|
72e0c77f91 | ||
|
|
862f595e5d | ||
|
|
db045e69f9 | ||
|
|
6a54cb871b | ||
|
|
3619a83b28 | ||
|
|
e3927d2868 | ||
|
|
fe503de17a | ||
|
|
5498a64a9f | ||
|
|
3148a231db | ||
|
|
bffdf20721 | ||
|
|
a4b64d4854 | ||
|
|
fe195e0a9c | ||
|
|
9d70f48207 | ||
|
|
d83df8c1cf | ||
|
|
c7c6c12146 | ||
|
|
e83a4c24ee | ||
|
|
a1669be6c3 | ||
|
|
e36799f515 | ||
|
|
186fe5f7b0 | ||
|
|
27206eccef | ||
|
|
62c0d60d3e | ||
|
|
c39342df3e | ||
|
|
458a103529 | ||
|
|
c22a37e7a6 | ||
|
|
01a8a65d75 | ||
|
|
28ced402d8 | ||
|
|
95e35fe84a | ||
|
|
3692ff2bdb | ||
|
|
7235a5fed4 | ||
|
|
614e5b52b8 | ||
|
|
35ab31fb5f | ||
|
|
636994eea6 | ||
|
|
146ac5ceda | ||
|
|
5413bfec30 | ||
|
|
f39c2cd714 | ||
|
|
e0ef2bdf81 | ||
|
|
efc09e8022 | ||
|
|
1790355f3e | ||
|
|
d0d004c6ff | ||
|
|
ee4abb681e | ||
|
|
9e3605d952 | ||
|
|
0df4927710 | ||
|
|
9d4415429d | ||
|
|
c86ac36876 | ||
|
|
4a4d800523 | ||
|
|
01c148bbce | ||
|
|
1cbe4363a3 | ||
|
|
c0254d914f | ||
|
|
53112f1e80 | ||
|
|
0f312c58ca | ||
|
|
2ca520c1eb | ||
|
|
c9b7ac2ae5 | ||
|
|
6e2ffd7050 | ||
|
|
8726748e22 | ||
|
|
73c2db9e8f | ||
|
|
c1cab3e752 | ||
|
|
713fdda7f8 | ||
|
|
baa599e5b0 | ||
|
|
014c533ebe | ||
|
|
53d87510ce | ||
|
|
43aa74d139 | ||
|
|
ada9238907 | ||
|
|
4d98cdf829 | ||
|
|
547043047e | ||
|
|
9d3b68411a | ||
|
|
470f8d3c04 | ||
|
|
da00b57d4b | ||
|
|
caedac67e0 | ||
|
|
2b5dc4eba4 | ||
|
|
39b8d01e71 | ||
|
|
fca3154982 | ||
|
|
cef158c42d | ||
|
|
177c3bcfe6 | ||
|
|
35766f2c3a | ||
|
|
e175cf543c | ||
|
|
96b0d1276e | ||
|
|
301546289e | ||
|
|
813778b39e | ||
|
|
6c3eceb197 | ||
|
|
0afc43eed7 | ||
|
|
6eb260d4eb | ||
|
|
63f1efc414 | ||
|
|
e685f7ab68 | ||
|
|
ac8f420adb | ||
|
|
fa16f132e3 | ||
|
|
7a5782c3e3 | ||
|
|
cf98691a3d | ||
|
|
09aa87ba26 | ||
|
|
38fb0430bf | ||
|
|
ec82e2fde8 | ||
|
|
fba2864cbc | ||
|
|
60c6d3e108 | ||
|
|
92f9750ded | ||
|
|
23106bce76 | ||
|
|
15acba1972 | ||
|
|
909d4dca82 | ||
|
|
5676f1d037 | ||
|
|
d864d76254 | ||
|
|
9ff4d38cc9 | ||
|
|
8dadbf706d | ||
|
|
ff968cbe43 | ||
|
|
582540657f | ||
|
|
05eeee6ee8 | ||
|
|
cd6f3b147d | ||
|
|
86f519ba57 | ||
|
|
febc6bae30 | ||
|
|
48f818bf07 | ||
|
|
c2d21bb8cc | ||
|
|
39fe1ba028 | ||
|
|
7112e860dc | ||
|
|
4606137882 | ||
|
|
8eab6b7701 | ||
|
|
71cd68eec1 | ||
|
|
168c3b78f4 | ||
|
|
d175e49e15 | ||
|
|
79624d762e | ||
|
|
3ec9eec257 | ||
|
|
e5ac4a72b7 | ||
|
|
470ea6cf70 | ||
|
|
45dc7ac7d1 | ||
|
|
2905eaa8ff | ||
|
|
deb068050b | ||
|
|
8f803c5a7d | ||
|
|
601c7998eb | ||
|
|
5a686d40de | ||
|
|
57837a1e81 | ||
|
|
5162ebd2cc | ||
|
|
1f869ab36d | ||
|
|
e912e52e15 | ||
|
|
14b0c03d5b | ||
|
|
8414ec9429 | ||
|
|
ac03b1b82f | ||
|
|
d5c999553e | ||
|
|
371df42d3f | ||
|
|
a4a0396850 | ||
|
|
83ad75b997 | ||
|
|
3f45d4ba9d | ||
|
|
2fa8bc201a | ||
|
|
e6b99ec849 | ||
|
|
e5c665384c | ||
|
|
5bb1273b3d | ||
|
|
5629f5141e | ||
|
|
15aef01b34 | ||
|
|
67a010298f | ||
|
|
7c398a532b | ||
|
|
eefd39a0d5 | ||
|
|
176b1c85c0 | ||
|
|
2da6cfde80 | ||
|
|
8068c083f6 | ||
|
|
bbe04aab95 | ||
|
|
d31a951d94 | ||
|
|
c27a158961 | ||
|
|
068e97cf0e | ||
|
|
aa45d831f3 | ||
|
|
eff8448154 | ||
|
|
badd7f1578 | ||
|
|
e12cb7bca9 | ||
|
|
23fe2a2103 | ||
|
|
e684e426af | ||
|
|
e65959b6f7 | ||
|
|
8041af6d18 | ||
|
|
56873b319b | ||
|
|
b315fab771 | ||
|
|
05342ed677 | ||
|
|
487bf31e06 | ||
|
|
6f3b2ea632 | ||
|
|
307fdeff78 | ||
|
|
8df3edcc30 | ||
|
|
a43e282efa | ||
|
|
7374690957 | ||
|
|
0c69575670 | ||
|
|
148cad1976 | ||
|
|
7db4e00b14 | ||
|
|
a00f745eba | ||
|
|
9ae335fafc | ||
|
|
6bd7639d66 | ||
|
|
c336309234 | ||
|
|
41d217321d | ||
|
|
2226dd1efb | ||
|
|
44699b07e4 | ||
|
|
6739f0752b | ||
|
|
1ebde81d6a | ||
|
|
195625b5e7 | ||
|
|
951c2702ff | ||
|
|
02b90df6ff | ||
|
|
f7c01c8e90 | ||
|
|
e8c964efaf | ||
|
|
74baab6f0f | ||
|
|
bff0ea2fc3 | ||
|
|
e474c19c40 | ||
|
|
a2a81f1bb7 | ||
|
|
c291284629 | ||
|
|
7f7ad71def | ||
|
|
7dfc0f30cc | ||
|
|
c14e67a8bb | ||
|
|
75b7e6009a | ||
|
|
63df56d613 | ||
|
|
f2e1f3e659 | ||
|
|
b1b7d3b004 | ||
|
|
f2c12d4fba | ||
|
|
3a60c9c8c8 | ||
|
|
44cd864205 | ||
|
|
f70d7013a5 | ||
|
|
ac1e902d59 | ||
|
|
b67bdee3cf | ||
|
|
83d4fa98f0 | ||
|
|
70a968b342 | ||
|
|
8e576f7511 | ||
|
|
4526424436 | ||
|
|
fd43620e87 | ||
|
|
56b8d331cb | ||
|
|
14bfba8b3b | ||
|
|
af8d3ae790 | ||
|
|
e6bb7e99be | ||
|
|
97c56adb9d | ||
|
|
f8612b0d1b | ||
|
|
a2a46a18ae | ||
|
|
1cf888b71f | ||
|
|
0109603cdc | ||
|
|
c7c750d127 | ||
|
|
b738b50cd6 | ||
|
|
351daf90f1 | ||
|
|
19d9acf63a | ||
|
|
eb40d3b6fc | ||
|
|
f5da23d9db | ||
|
|
b412bce095 | ||
|
|
0b57ddd753 | ||
|
|
d0a6d82a23 | ||
|
|
ba2792bd1f | ||
|
|
3f8c09e006 | ||
|
|
8f39268761 | ||
|
|
cd8c8d78a9 | ||
|
|
980678846d | ||
|
|
9a92d8d57e | ||
|
|
b155c601d7 | ||
|
|
536f2c085a | ||
|
|
2602d4f16e | ||
|
|
174addc426 | ||
|
|
849053681e | ||
|
|
a8d8ea7990 | ||
|
|
10e6493f9f | ||
|
|
8c4f911935 | ||
|
|
62bc85b5c7 | ||
|
|
76eba917f9 | ||
|
|
84a046eaf5 | ||
|
|
8d1d314f49 | ||
|
|
9395f12584 | ||
|
|
b97f58d597 | ||
|
|
30c36a3960 | ||
|
|
206eccc2b6 | ||
|
|
2358a623e3 | ||
|
|
87850bd6dc | ||
|
|
d80eda202f | ||
|
|
3edfa585ec | ||
|
|
fa13a6a8da | ||
|
|
9d5e7c89d9 | ||
|
|
590bf0bcc0 | ||
|
|
b199a2dea3 | ||
|
|
f1d4b8d83e | ||
|
|
0088661356 | ||
|
|
1a7e3cabc0 | ||
|
|
132d701b3e | ||
|
|
3b97241716 | ||
|
|
f82d090df3 | ||
|
|
7399d3e953 | ||
|
|
cab546ecee | ||
|
|
7dc1c7d841 | ||
|
|
fbff51f387 | ||
|
|
b714fb0c39 | ||
|
|
f37038013d | ||
|
|
5e98e2b7c7 | ||
|
|
35f8f3ff79 | ||
|
|
7ec8e7e025 | ||
|
|
c6efebdd8c | ||
|
|
760047abc5 |
@@ -47,7 +47,7 @@
|
||||
<delete>
|
||||
<fileset basedir="${distbindir}">
|
||||
<include name="compile.bat"/>
|
||||
<include name="BUILDING.txt"/>
|
||||
<include name="BUILDING.md"/>
|
||||
<include name="Makefile"/>
|
||||
<include name="nant-color"/>
|
||||
<include name="OpenSim.*"/>
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
# Building on Windows
|
||||
==== Building OpenSim ====
|
||||
|
||||
=== Building on Windows ===
|
||||
|
||||
Steps:
|
||||
* runprebuild.bat
|
||||
@@ -7,15 +9,16 @@ Steps:
|
||||
* copy OpenSim.ini.example to OpenSim.ini and other appropriate files in bin/config-include
|
||||
* run OpenSim.exe
|
||||
|
||||
# Building on Linux
|
||||
=== Building on Linux ===
|
||||
|
||||
Prereqs:
|
||||
* Mono >= 2.4.3
|
||||
* Nant >= 0.85
|
||||
* On some Linux distributions you may need to install additional packages.
|
||||
See http://opensimulator.org/wiki/Dependencies for more information.
|
||||
* May also use xbuild (included in mono distributions)
|
||||
* May use Monodevelop, a cross-platform IDE
|
||||
* Mono >= 2.4.3
|
||||
* Nant >= 0.85
|
||||
* On some Linux distributions you may need to install additional packages.
|
||||
See http://opensimulator.org/wiki/Dependencies for more information.
|
||||
|
||||
* May also use xbuild (included in mono distributions)
|
||||
* May use Monodevelop, a cross-platform IDE
|
||||
|
||||
From the distribution type:
|
||||
* ./runprebuild.sh
|
||||
@@ -24,13 +27,13 @@ From the distribution type:
|
||||
* copy OpenSim.ini.example to OpenSim.ini and other appropriate files in bin/config-include
|
||||
* run mono OpenSim.exe
|
||||
|
||||
# Using Monodevelop
|
||||
=== Using Monodevelop ===
|
||||
|
||||
From the distribution type:
|
||||
* ./runprebuild.sh
|
||||
* type monodevelop OpenSim.sln
|
||||
|
||||
# References
|
||||
=== References ===
|
||||
|
||||
Helpful resources:
|
||||
* http://opensimulator.org/wiki/Build_Instructions
|
||||
@@ -1,5 +1,5 @@
|
||||
<<<>>>>The following people have contributed to OpenSim (Thank you
|
||||
for your effort!)
|
||||
for your effort!)
|
||||
|
||||
= Current OpenSim Developers (in very rough order of appearance) =
|
||||
These folks represent the current core team for OpenSim, and are the
|
||||
@@ -16,7 +16,7 @@ people that make the day to day of OpenSim happen.
|
||||
* BlueWall (James Hughes)
|
||||
* Nebadon Izumi (Michael Cerquoni, OSgrid)
|
||||
* Snoopy Pfeffer
|
||||
* Robert Adams (Intel)
|
||||
* Richard Adams (Intel)
|
||||
|
||||
= Core Developers Following the White Rabbit =
|
||||
Core developers who have temporarily (we hope) gone chasing the white rabbit.
|
||||
@@ -92,8 +92,6 @@ what it is today.
|
||||
* Flyte Xevious
|
||||
* Garmin Kawaguichi
|
||||
* Gryc Ueusp
|
||||
* Hiro Lecker
|
||||
* Iain Oliver
|
||||
* Imaze Rhiano
|
||||
* Intimidated
|
||||
* Jeremy Bongio (IBM)
|
||||
@@ -183,14 +181,12 @@ what it is today.
|
||||
|
||||
This software uses components from the following developers:
|
||||
* Sleepycat Software (Berkeley DB)
|
||||
* Aurora-Sim (http://aurora-sim.org)
|
||||
* SQLite (Public Domain)
|
||||
* XmlRpcCS (http://xmlrpccs.sf.net/)
|
||||
* MySQL, Inc. (MySQL Connector/NET)
|
||||
* NUnit (http://www.nunit.org)
|
||||
* AGEIA Inc. (PhysX)
|
||||
* Russel L. Smith (ODE)
|
||||
* Erwin Coumans (Bullet)
|
||||
* Prebuild (http://sourceforge.net/projects/dnpb/)
|
||||
* LibOpenMetaverse (http://lib.openmetaverse.org/)
|
||||
* DotNetOpenMail v0.5.8b (http://dotnetopenmail.sourceforge.net)
|
||||
@@ -212,4 +208,3 @@ In addition, we would like to thank:
|
||||
* The NANT Developers
|
||||
* Microsoft (.NET, MSSQL-Adapters)
|
||||
*x
|
||||
|
||||
|
||||
@@ -99,12 +99,12 @@ namespace OpenSim.ApplicationPlugins.LoadRegions
|
||||
RegionInfo[] regionsToLoad = regionLoader.LoadRegions();
|
||||
|
||||
m_log.Info("[LOAD REGIONS PLUGIN]: Loading specific shared modules...");
|
||||
//m_log.Info("[LOAD REGIONS PLUGIN]: DynamicTextureModule...");
|
||||
//m_openSim.ModuleLoader.LoadDefaultSharedModule(new DynamicTextureModule());
|
||||
//m_log.Info("[LOAD REGIONS PLUGIN]: LoadImageURLModule...");
|
||||
//m_openSim.ModuleLoader.LoadDefaultSharedModule(new LoadImageURLModule());
|
||||
//m_log.Info("[LOAD REGIONS PLUGIN]: XMLRPCModule...");
|
||||
//m_openSim.ModuleLoader.LoadDefaultSharedModule(new XMLRPCModule());
|
||||
m_log.Info("[LOAD REGIONS PLUGIN]: DynamicTextureModule...");
|
||||
m_openSim.ModuleLoader.LoadDefaultSharedModule(new DynamicTextureModule());
|
||||
m_log.Info("[LOAD REGIONS PLUGIN]: LoadImageURLModule...");
|
||||
m_openSim.ModuleLoader.LoadDefaultSharedModule(new LoadImageURLModule());
|
||||
m_log.Info("[LOAD REGIONS PLUGIN]: XMLRPCModule...");
|
||||
m_openSim.ModuleLoader.LoadDefaultSharedModule(new XMLRPCModule());
|
||||
// m_log.Info("[LOADREGIONSPLUGIN]: AssetTransactionModule...");
|
||||
// m_openSim.ModuleLoader.LoadDefaultSharedModule(new AssetTransactionModule());
|
||||
m_log.Info("[LOAD REGIONS PLUGIN]: Done.");
|
||||
@@ -136,6 +136,9 @@ namespace OpenSim.ApplicationPlugins.LoadRegions
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
m_openSim.ModuleLoader.PostInitialise();
|
||||
m_openSim.ModuleLoader.ClearCache();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
|
||||
@@ -60,7 +60,7 @@ using System.Runtime.InteropServices;
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("0.7.5.*")]
|
||||
// [assembly: AssemblyVersion("0.6.5.*")]
|
||||
|
||||
[assembly : AssemblyVersion("0.7.5.*")]
|
||||
[assembly : AssemblyVersion("0.6.5.*")]
|
||||
[assembly : AssemblyFileVersion("0.6.5.0")]
|
||||
@@ -1,33 +0,0 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("OpenSim.ApplicationPlugins.RegionModulesController")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("http://opensimulator.org")]
|
||||
[assembly: AssemblyProduct("OpenSim")]
|
||||
[assembly: AssemblyCopyright("OpenSimulator developers")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("c023816d-194e-40c1-9195-a0f281d4ac5d")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
[assembly: AssemblyVersion("0.7.5.*")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
@@ -215,7 +215,7 @@ namespace OpenSim.ApplicationPlugins.RegionModulesController
|
||||
}
|
||||
}
|
||||
|
||||
#region Region Module interfacesController implementation
|
||||
#region IRegionModulesController implementation
|
||||
|
||||
/// <summary>
|
||||
/// Check that the given module is no disabled in the [Modules] section of the config files.
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("OpenSim.ApplicationPlugins.RemoteController")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("http://opensimulator.org")]
|
||||
[assembly: AssemblyProduct("OpenSim")]
|
||||
[assembly: AssemblyCopyright("Copyright OpenSimulator developers © 2012")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("efec6e69-fc4a-4e21-86e6-4a261c12d4db")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
[assembly: AssemblyVersion("0.7.5.*")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
@@ -728,6 +728,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||
responseData["success"] = true;
|
||||
responseData["region_name"] = region.RegionName;
|
||||
responseData["region_id"] = region.RegionID.ToString();
|
||||
responseData["region_uuid"] = region.RegionID.ToString(); //Deprecate July 2012
|
||||
|
||||
m_log.Info("[RADMIN]: CreateRegion: request complete");
|
||||
}
|
||||
@@ -1368,8 +1369,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||
/// <description>profile url</description></item>
|
||||
/// <item><term>noassets</term>
|
||||
/// <description>true if no assets should be saved</description></item>
|
||||
/// <item><term>all</term>
|
||||
/// <description>true to save all the regions in the simulator</description></item>
|
||||
/// <item><term>perm</term>
|
||||
/// <description>C and/or T</description></item>
|
||||
/// </list>
|
||||
@@ -1426,11 +1425,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||
options["checkPermissions"] = (string)requestData["perm"];
|
||||
}
|
||||
|
||||
if ((string)requestData["all"] == "true")
|
||||
{
|
||||
options["all"] = (string)requestData["all"];
|
||||
}
|
||||
|
||||
IRegionArchiverModule archiver = scene.RequestModuleInterface<IRegionArchiverModule>();
|
||||
|
||||
if (archiver != null)
|
||||
@@ -1880,6 +1874,29 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||
{
|
||||
return;
|
||||
}
|
||||
#region Deprecate July 2012
|
||||
//region_ID, regionid, region_uuid will be deprecated in July 2012!!!!!!
|
||||
else if (requestData.ContainsKey("regionid") &&
|
||||
!String.IsNullOrEmpty((string)requestData["regionid"]))
|
||||
{
|
||||
m_log.WarnFormat("[RADMIN]: Use of parameter regionid will be deprecated as of July 2012. Use region_id instead");
|
||||
}
|
||||
else if (requestData.ContainsKey("region_ID") &&
|
||||
!String.IsNullOrEmpty((string)requestData["region_ID"]))
|
||||
{
|
||||
m_log.WarnFormat("[RADMIN]: Use of parameter region_ID will be deprecated as of July 2012. Use region_id instead");
|
||||
}
|
||||
else if (requestData.ContainsKey("regionID") &&
|
||||
!String.IsNullOrEmpty((string)requestData["regionID"]))
|
||||
{
|
||||
m_log.WarnFormat("[RADMIN]: Use of parameter regionID will be deprecated as of July 2012. Use region_id instead");
|
||||
}
|
||||
else if (requestData.ContainsKey("region_uuid") &&
|
||||
!String.IsNullOrEmpty((string)requestData["region_uuid"]))
|
||||
{
|
||||
m_log.WarnFormat("[RADMIN]: Use of parameter region_uuid will be deprecated as of July 2012. Use region_id instead");
|
||||
}
|
||||
#endregion
|
||||
else
|
||||
{
|
||||
responseData["accepted"] = false;
|
||||
@@ -1901,6 +1918,56 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||
throw new Exception(String.Format("Region ID {0} not found", regionID));
|
||||
}
|
||||
}
|
||||
#region Deprecate July 2012
|
||||
else if (requestData.ContainsKey("regionid") &&
|
||||
!String.IsNullOrEmpty((string)requestData["regionid"]))
|
||||
{
|
||||
m_log.WarnFormat("[RADMIN]: Use of parameter regionid will be deprecated as of July 2012. Use region_id instead");
|
||||
|
||||
UUID regionID = (UUID)(string)requestData["regionid"];
|
||||
if (!m_application.SceneManager.TryGetScene(regionID, out scene))
|
||||
{
|
||||
responseData["error"] = String.Format("Region ID {0} not found", regionID);
|
||||
throw new Exception(String.Format("Region ID {0} not found", regionID));
|
||||
}
|
||||
}
|
||||
else if (requestData.ContainsKey("region_ID") &&
|
||||
!String.IsNullOrEmpty((string)requestData["region_ID"]))
|
||||
{
|
||||
m_log.WarnFormat("[RADMIN]: Use of parameter region_ID will be deprecated as of July 2012. Use region_id instead");
|
||||
|
||||
UUID regionID = (UUID)(string)requestData["region_ID"];
|
||||
if (!m_application.SceneManager.TryGetScene(regionID, out scene))
|
||||
{
|
||||
responseData["error"] = String.Format("Region ID {0} not found", regionID);
|
||||
throw new Exception(String.Format("Region ID {0} not found", regionID));
|
||||
}
|
||||
}
|
||||
else if (requestData.ContainsKey("regionID") &&
|
||||
!String.IsNullOrEmpty((string)requestData["regionID"]))
|
||||
{
|
||||
m_log.WarnFormat("[RADMIN]: Use of parameter regionID will be deprecated as of July 2012. Use region_id instead");
|
||||
|
||||
UUID regionID = (UUID)(string)requestData["regionID"];
|
||||
if (!m_application.SceneManager.TryGetScene(regionID, out scene))
|
||||
{
|
||||
responseData["error"] = String.Format("Region ID {0} not found", regionID);
|
||||
throw new Exception(String.Format("Region ID {0} not found", regionID));
|
||||
}
|
||||
}
|
||||
else if (requestData.ContainsKey("region_uuid") &&
|
||||
!String.IsNullOrEmpty((string)requestData["region_uuid"]))
|
||||
{
|
||||
m_log.WarnFormat("[RADMIN]: Use of parameter region_uuid will be deprecated as of July 2012. Use region_id instead");
|
||||
|
||||
UUID regionID = (UUID)(string)requestData["region_uuid"];
|
||||
if (!m_application.SceneManager.TryGetScene(regionID, out scene))
|
||||
{
|
||||
responseData["error"] = String.Format("Region ID {0} not found", regionID);
|
||||
throw new Exception(String.Format("Region ID {0} not found", regionID));
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
else if (requestData.ContainsKey("region_name") &&
|
||||
!String.IsNullOrEmpty((string)requestData["region_name"]))
|
||||
{
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("OpenSim.Capabilities.Handlers")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("http://opensimulator.org")]
|
||||
[assembly: AssemblyProduct("OpenSim")]
|
||||
[assembly: AssemblyCopyright("OpenSimulator developers")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("32350823-e1df-45e3-b7fa-0a58b4372433")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
[assembly: AssemblyVersion("0.7.5.*")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
@@ -1,33 +0,0 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("OpenSim.Capabilities")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("http://opensimulator.org")]
|
||||
[assembly: AssemblyProduct("OpenSim")]
|
||||
[assembly: AssemblyCopyright("OpenSimulator developers")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("7d1a55b1-8fab-42ff-9c83-066a9cc34d76")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
[assembly: AssemblyVersion("0.7.5.*")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
@@ -1,33 +0,0 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("OpenSim.ConsoleClient")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("http://opensimulator.org")]
|
||||
[assembly: AssemblyProduct("OpenSim")]
|
||||
[assembly: AssemblyCopyright("OpenSimulator developers")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("8945df94-2e5e-475b-88fa-35a7cdde6fd7")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
[assembly: AssemblyVersion("0.7.5.*")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
@@ -53,6 +53,5 @@ namespace OpenSim.Data
|
||||
bool ReportAgent(UUID sessionID, UUID regionID);
|
||||
PresenceData[] Get(string field, string data);
|
||||
bool Delete(string field, string val);
|
||||
bool VerifyAgent(UUID agentId, UUID secureSessionID);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -85,6 +85,21 @@ namespace OpenSim.Data
|
||||
List<RegionData> GetHyperlinks(UUID scopeID);
|
||||
}
|
||||
|
||||
[Flags]
|
||||
public enum RegionFlags : int
|
||||
{
|
||||
DefaultRegion = 1, // Used for new Rez. Random if multiple defined
|
||||
FallbackRegion = 2, // Regions we redirect to when the destination is down
|
||||
RegionOnline = 4, // Set when a region comes online, unset when it unregisters and DeleteOnUnregister is false
|
||||
NoDirectLogin = 8, // Region unavailable for direct logins (by name)
|
||||
Persistent = 16, // Don't remove on unregister
|
||||
LockedOut = 32, // Don't allow registration
|
||||
NoMove = 64, // Don't allow moving this region
|
||||
Reservation = 128, // This is an inactive reservation
|
||||
Authenticate = 256, // Require authentication
|
||||
Hyperlink = 512 // Record represents a HG link
|
||||
}
|
||||
|
||||
public class RegionDataDistanceCompare : IComparer<RegionData>
|
||||
{
|
||||
private Vector2 m_origin;
|
||||
|
||||
@@ -1,71 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) Contributors, http://opensimulator.org/
|
||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of the OpenSimulator Project nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using OpenMetaverse;
|
||||
using OpenSim.Framework;
|
||||
|
||||
namespace OpenSim.Data
|
||||
{
|
||||
public class XGroup
|
||||
{
|
||||
public UUID groupID;
|
||||
public UUID ownerRoleID;
|
||||
public string name;
|
||||
public string charter;
|
||||
public bool showInList;
|
||||
public UUID insigniaID;
|
||||
public int membershipFee;
|
||||
public bool openEnrollment;
|
||||
public bool allowPublish;
|
||||
public bool maturePublish;
|
||||
public UUID founderID;
|
||||
public ulong everyonePowers;
|
||||
public ulong ownersPowers;
|
||||
|
||||
public XGroup Clone()
|
||||
{
|
||||
return (XGroup)MemberwiseClone();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Early stub interface for groups data, not final.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Currently in-use only for regression test purposes. Needs to be filled out over time.
|
||||
/// </remarks>
|
||||
public interface IXGroupData
|
||||
{
|
||||
bool StoreGroup(XGroup group);
|
||||
XGroup[] GetGroups(string field, string val);
|
||||
XGroup[] GetGroups(string[] fields, string[] vals);
|
||||
bool DeleteGroups(string field, string val);
|
||||
bool DeleteGroups(string[] fields, string[] vals);
|
||||
}
|
||||
}
|
||||
@@ -100,18 +100,5 @@ namespace OpenSim.Data.MSSQL
|
||||
return true;
|
||||
}
|
||||
|
||||
public bool VerifyAgent(UUID agentId, UUID secureSessionID)
|
||||
{
|
||||
PresenceData[] ret = Get("SecureSessionID",
|
||||
secureSessionID.ToString());
|
||||
|
||||
if (ret.Length == 0)
|
||||
return false;
|
||||
|
||||
if(ret[0].UserID != agentId.ToString())
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,7 +37,6 @@ using OpenMetaverse;
|
||||
using OpenSim.Framework;
|
||||
using OpenSim.Region.Framework.Interfaces;
|
||||
using OpenSim.Region.Framework.Scenes;
|
||||
using RegionFlags = OpenSim.Framework.RegionFlags;
|
||||
|
||||
namespace OpenSim.Data.MSSQL
|
||||
{
|
||||
|
||||
@@ -2202,18 +2202,5 @@ VALUES
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void SaveExtra(UUID regionID, string name, string value)
|
||||
{
|
||||
}
|
||||
|
||||
public void RemoveExtra(UUID regionID, string name)
|
||||
{
|
||||
}
|
||||
|
||||
public Dictionary<string, string> GetExtra(UUID regionID)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,5 +61,5 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly : AssemblyVersion("0.7.5.*")]
|
||||
[assembly : AssemblyVersion("0.6.5.*")]
|
||||
[assembly : AssemblyFileVersion("0.6.5.0")]
|
||||
|
||||
@@ -95,19 +95,5 @@ namespace OpenSim.Data.MySQL
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public bool VerifyAgent(UUID agentId, UUID secureSessionID)
|
||||
{
|
||||
PresenceData[] ret = Get("SecureSessionID",
|
||||
secureSessionID.ToString());
|
||||
|
||||
if (ret.Length == 0)
|
||||
return false;
|
||||
|
||||
if(ret[0].UserID != agentId.ToString())
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -30,11 +30,11 @@ using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Reflection;
|
||||
using MySql.Data.MySqlClient;
|
||||
|
||||
using OpenMetaverse;
|
||||
using OpenSim.Framework;
|
||||
using OpenSim.Data;
|
||||
using RegionFlags = OpenSim.Framework.RegionFlags;
|
||||
using MySql.Data.MySqlClient;
|
||||
|
||||
namespace OpenSim.Data.MySQL
|
||||
{
|
||||
|
||||
@@ -1985,74 +1985,5 @@ namespace OpenSim.Data.MySQL
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void SaveExtra(UUID regionID, string name, string val)
|
||||
{
|
||||
lock (m_dbLock)
|
||||
{
|
||||
using (MySqlConnection dbcon = new MySqlConnection(m_connectionString))
|
||||
{
|
||||
dbcon.Open();
|
||||
|
||||
using (MySqlCommand cmd = dbcon.CreateCommand())
|
||||
{
|
||||
cmd.CommandText = "replace into regionextra values (?RegionID, ?Name, ?value)";
|
||||
cmd.Parameters.AddWithValue("?RegionID", regionID.ToString());
|
||||
cmd.Parameters.AddWithValue("?Name", name);
|
||||
cmd.Parameters.AddWithValue("?value", val);
|
||||
|
||||
cmd.ExecuteNonQuery();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void RemoveExtra(UUID regionID, string name)
|
||||
{
|
||||
lock (m_dbLock)
|
||||
{
|
||||
using (MySqlConnection dbcon = new MySqlConnection(m_connectionString))
|
||||
{
|
||||
dbcon.Open();
|
||||
|
||||
using (MySqlCommand cmd = dbcon.CreateCommand())
|
||||
{
|
||||
cmd.CommandText = "delete from regionextra where RegionID=?RegionID and Name=?Name";
|
||||
cmd.Parameters.AddWithValue("?RegionID", regionID.ToString());
|
||||
cmd.Parameters.AddWithValue("?Name", name);
|
||||
|
||||
cmd.ExecuteNonQuery();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public Dictionary<string, string> GetExtra(UUID regionID)
|
||||
{
|
||||
Dictionary<string, string> ret = new Dictionary<string, string>();
|
||||
|
||||
lock (m_dbLock)
|
||||
{
|
||||
using (MySqlConnection dbcon = new MySqlConnection(m_connectionString))
|
||||
{
|
||||
dbcon.Open();
|
||||
|
||||
using (MySqlCommand cmd = dbcon.CreateCommand())
|
||||
{
|
||||
cmd.CommandText = "select * from regionextra where RegionID=?RegionID";
|
||||
cmd.Parameters.AddWithValue("?RegionID", regionID.ToString());
|
||||
using (IDataReader r = cmd.ExecuteReader())
|
||||
{
|
||||
while (r.Read())
|
||||
{
|
||||
ret[r["Name"].ToString()] = r["value"].ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,5 +61,5 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly : AssemblyVersion("0.7.5.*")]
|
||||
[assembly : AssemblyVersion("0.6.5.*")]
|
||||
[assembly : AssemblyFileVersion("0.6.5.0")]
|
||||
|
||||
@@ -17,8 +17,3 @@ CREATE TABLE `GridUser` (
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
COMMIT;
|
||||
|
||||
:VERSION 2 # --------------------------
|
||||
BEGIN;
|
||||
|
||||
COMMIT;
|
||||
|
||||
@@ -895,10 +895,3 @@ CREATE TABLE `regionenvironment` (
|
||||
|
||||
COMMIT;
|
||||
|
||||
:VERSION 45
|
||||
|
||||
BEGIN;
|
||||
|
||||
CREATE TABLE `regionextra` (`RegionID` char(36) not null, `Name` varchar(32) not null, `value` text, primary key(`RegionID`, `Name`));
|
||||
|
||||
COMMIT;
|
||||
|
||||
@@ -1,67 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) Contributors, http://opensimulator.org/
|
||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of the OpenSimulator Project nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using log4net;
|
||||
using OpenMetaverse;
|
||||
using OpenSim.Framework;
|
||||
using OpenSim.Data;
|
||||
|
||||
namespace OpenSim.Data.Null
|
||||
{
|
||||
/// <summary>
|
||||
/// Not a proper generic data handler yet - probably needs to actually store the data as well instead of relying
|
||||
/// on descendent classes
|
||||
/// </summary>
|
||||
public class NullGenericDataHandler
|
||||
{
|
||||
protected List<T> Get<T>(string[] fields, string[] vals, List<T> inputEntities)
|
||||
{
|
||||
List<T> entities = inputEntities;
|
||||
|
||||
for (int i = 0; i < fields.Length; i++)
|
||||
{
|
||||
entities
|
||||
= entities.Where(
|
||||
e =>
|
||||
{
|
||||
FieldInfo fi = typeof(T).GetField(fields[i]);
|
||||
if (fi == null)
|
||||
throw new NotImplementedException(string.Format("No field {0} for val {1}", fields[i], vals[i]));
|
||||
|
||||
return fi.GetValue(e).ToString() == vals[i];
|
||||
}
|
||||
).ToList();
|
||||
}
|
||||
|
||||
return entities;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -222,13 +222,5 @@ namespace OpenSim.Data.Null
|
||||
return true;
|
||||
}
|
||||
|
||||
public bool VerifyAgent(UUID agentId, UUID secureSessionID)
|
||||
{
|
||||
if (Instance != this)
|
||||
return Instance.VerifyAgent(agentId, secureSessionID);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,7 +33,6 @@ using OpenSim.Framework;
|
||||
using OpenSim.Data;
|
||||
using System.Reflection;
|
||||
using log4net;
|
||||
using RegionFlags = OpenSim.Framework.RegionFlags;
|
||||
|
||||
namespace OpenSim.Data.Null
|
||||
{
|
||||
|
||||
@@ -151,18 +151,5 @@ namespace OpenSim.Data.Null
|
||||
public void Shutdown()
|
||||
{
|
||||
}
|
||||
|
||||
public void SaveExtra(UUID regionID, string name, string value)
|
||||
{
|
||||
}
|
||||
|
||||
public void RemoveExtra(UUID regionID, string name)
|
||||
{
|
||||
}
|
||||
|
||||
public Dictionary<string, string> GetExtra(UUID regionID)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,90 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) Contributors, http://opensimulator.org/
|
||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of the OpenSimulator Project nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Threading;
|
||||
using log4net;
|
||||
using OpenMetaverse;
|
||||
using OpenSim.Framework;
|
||||
using OpenSim.Data;
|
||||
|
||||
namespace OpenSim.Data.Null
|
||||
{
|
||||
public class NullXGroupData : NullGenericDataHandler, IXGroupData
|
||||
{
|
||||
// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private Dictionary<UUID, XGroup> m_groups = new Dictionary<UUID, XGroup>();
|
||||
|
||||
public NullXGroupData(string connectionString, string realm) {}
|
||||
|
||||
public bool StoreGroup(XGroup group)
|
||||
{
|
||||
lock (m_groups)
|
||||
{
|
||||
m_groups[group.groupID] = group.Clone();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public XGroup[] GetGroups(string field, string val)
|
||||
{
|
||||
return GetGroups(new string[] { field }, new string[] { val });
|
||||
}
|
||||
|
||||
public XGroup[] GetGroups(string[] fields, string[] vals)
|
||||
{
|
||||
lock (m_groups)
|
||||
{
|
||||
List<XGroup> origGroups = Get<XGroup>(fields, vals, m_groups.Values.ToList());
|
||||
|
||||
return origGroups.Select(g => g.Clone()).ToArray();
|
||||
}
|
||||
}
|
||||
|
||||
public bool DeleteGroups(string field, string val)
|
||||
{
|
||||
return DeleteGroups(new string[] { field }, new string[] { val });
|
||||
}
|
||||
|
||||
public bool DeleteGroups(string[] fields, string[] vals)
|
||||
{
|
||||
lock (m_groups)
|
||||
{
|
||||
XGroup[] groupsToDelete = GetGroups(fields, vals);
|
||||
Array.ForEach(groupsToDelete, g => m_groups.Remove(g.groupID));
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -61,5 +61,5 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly : AssemblyVersion("0.7.5.*")]
|
||||
[assembly : AssemblyVersion("0.6.5.*")]
|
||||
[assembly : AssemblyFileVersion("0.6.5.0")]
|
||||
|
||||
@@ -61,5 +61,5 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly : AssemblyVersion("0.7.5.*")]
|
||||
[assembly : AssemblyVersion("0.6.5.*")]
|
||||
[assembly : AssemblyFileVersion("0.6.5.0")]
|
||||
|
||||
@@ -61,5 +61,5 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly : AssemblyVersion("0.7.5.*")]
|
||||
[assembly : AssemblyVersion("0.6.5.*")]
|
||||
[assembly : AssemblyFileVersion("0.6.5.0")]
|
||||
|
||||
@@ -1366,7 +1366,6 @@ namespace OpenSim.Data.SQLite
|
||||
createCol(land, "UserLookAtZ", typeof(Double));
|
||||
createCol(land, "AuthbuyerID", typeof(String));
|
||||
createCol(land, "OtherCleanTime", typeof(Int32));
|
||||
createCol(land, "Dwell", typeof(Int32));
|
||||
createCol(land, "MediaType", typeof(String));
|
||||
createCol(land, "MediaDescription", typeof(String));
|
||||
createCol(land, "MediaSize", typeof(String));
|
||||
@@ -1788,7 +1787,6 @@ namespace OpenSim.Data.SQLite
|
||||
newData.PassHours = Convert.ToSingle(row["PassHours"]);
|
||||
newData.PassPrice = Convert.ToInt32(row["PassPrice"]);
|
||||
newData.SnapshotID = (UUID)(String)row["SnapshotUUID"];
|
||||
newData.Dwell = Convert.ToInt32(row["Dwell"]);
|
||||
newData.MediaType = (String)row["MediaType"];
|
||||
newData.MediaDescription = (String)row["MediaDescription"];
|
||||
newData.MediaWidth = Convert.ToInt32((((string)row["MediaSize"]).Split(','))[0]);
|
||||
@@ -2209,7 +2207,6 @@ namespace OpenSim.Data.SQLite
|
||||
row["UserLookAtZ"] = land.UserLookAt.Z;
|
||||
row["AuthbuyerID"] = land.AuthBuyerID.ToString();
|
||||
row["OtherCleanTime"] = land.OtherCleanTime;
|
||||
row["Dwell"] = land.Dwell;
|
||||
row["MediaType"] = land.MediaType;
|
||||
row["MediaDescription"] = land.MediaDescription;
|
||||
row["MediaSize"] = String.Format("{0},{1}", land.MediaWidth, land.MediaHeight);
|
||||
@@ -2905,17 +2902,5 @@ namespace OpenSim.Data.SQLite
|
||||
}
|
||||
}
|
||||
|
||||
public void SaveExtra(UUID regionID, string name, string value)
|
||||
{
|
||||
}
|
||||
|
||||
public void RemoveExtra(UUID regionID, string name)
|
||||
{
|
||||
}
|
||||
|
||||
public Dictionary<string, string> GetExtra(UUID regionID)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,5 +59,5 @@ using System.Runtime.InteropServices;
|
||||
// Revision
|
||||
//
|
||||
|
||||
[assembly : AssemblyVersion("0.7.5.*")]
|
||||
[assembly : AssemblyVersion("0.6.5.*")]
|
||||
[assembly : AssemblyFileVersion("0.6.5.0")]
|
||||
@@ -1,33 +0,0 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("OpenSim.Framework.AssetLoader.Filesystem")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("http://opensimulator.org")]
|
||||
[assembly: AssemblyProduct("OpenSim")]
|
||||
[assembly: AssemblyCopyright("OpenSimulator developers")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("8cb9cf69-4771-4d3a-a2ba-bac7230de326")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
[assembly: AssemblyVersion("0.7.5.*")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
@@ -1,84 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
|
||||
using Nini.Config;
|
||||
using log4net;
|
||||
|
||||
using OpenMetaverse;
|
||||
|
||||
namespace OpenSim.Framework
|
||||
{
|
||||
public class AssetPermissions
|
||||
{
|
||||
private static readonly ILog m_log =
|
||||
LogManager.GetLogger(
|
||||
MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private bool[] m_DisallowExport, m_DisallowImport;
|
||||
private string[] m_AssetTypeNames;
|
||||
|
||||
public AssetPermissions(IConfig config)
|
||||
{
|
||||
Type enumType = typeof(AssetType);
|
||||
m_AssetTypeNames = Enum.GetNames(enumType);
|
||||
for (int i = 0; i < m_AssetTypeNames.Length; i++)
|
||||
m_AssetTypeNames[i] = m_AssetTypeNames[i].ToLower();
|
||||
int n = Enum.GetValues(enumType).Length;
|
||||
m_DisallowExport = new bool[n];
|
||||
m_DisallowImport = new bool[n];
|
||||
|
||||
LoadPermsFromConfig(config, "DisallowExport", m_DisallowExport);
|
||||
LoadPermsFromConfig(config, "DisallowImport", m_DisallowImport);
|
||||
|
||||
}
|
||||
|
||||
private void LoadPermsFromConfig(IConfig assetConfig, string variable, bool[] bitArray)
|
||||
{
|
||||
if (assetConfig == null)
|
||||
return;
|
||||
|
||||
string perms = assetConfig.GetString(variable, String.Empty);
|
||||
string[] parts = perms.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
|
||||
foreach (string s in parts)
|
||||
{
|
||||
int index = Array.IndexOf(m_AssetTypeNames, s.Trim().ToLower());
|
||||
if (index >= 0)
|
||||
bitArray[index] = true;
|
||||
else
|
||||
m_log.WarnFormat("[Asset Permissions]: Invalid AssetType {0}", s);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public bool AllowedExport(sbyte type)
|
||||
{
|
||||
string assetTypeName = ((AssetType)type).ToString();
|
||||
|
||||
int index = Array.IndexOf(m_AssetTypeNames, assetTypeName.ToLower());
|
||||
if (index >= 0 && m_DisallowExport[index])
|
||||
{
|
||||
m_log.DebugFormat("[Asset Permissions]: Export denied: configuration does not allow export of AssetType {0}", assetTypeName);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public bool AllowedImport(sbyte type)
|
||||
{
|
||||
string assetTypeName = ((AssetType)type).ToString();
|
||||
|
||||
int index = Array.IndexOf(m_AssetTypeNames, assetTypeName.ToLower());
|
||||
if (index >= 0 && m_DisallowImport[index])
|
||||
{
|
||||
m_log.DebugFormat("[Asset Permissions]: Import denied: configuration does not allow import of AssetType {0}", assetTypeName);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -306,8 +306,6 @@ namespace OpenSim.Framework
|
||||
|
||||
public AgentGroupData[] Groups;
|
||||
public Animation[] Anims;
|
||||
public Animation DefaultAnim = null;
|
||||
public Animation AnimState = null;
|
||||
|
||||
public UUID GranterID;
|
||||
|
||||
@@ -392,16 +390,6 @@ namespace OpenSim.Framework
|
||||
args["animations"] = anims;
|
||||
}
|
||||
|
||||
if (DefaultAnim != null)
|
||||
{
|
||||
args["default_animation"] = DefaultAnim.PackUpdateMessage();
|
||||
}
|
||||
|
||||
if (AnimState != null)
|
||||
{
|
||||
args["animation_state"] = AnimState.PackUpdateMessage();
|
||||
}
|
||||
|
||||
if (Appearance != null)
|
||||
args["packed_appearance"] = Appearance.Pack();
|
||||
|
||||
@@ -595,30 +583,6 @@ namespace OpenSim.Framework
|
||||
}
|
||||
}
|
||||
|
||||
if (args["default_animation"] != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
DefaultAnim = new Animation((OSDMap)args["default_animation"]);
|
||||
}
|
||||
catch
|
||||
{
|
||||
DefaultAnim = null;
|
||||
}
|
||||
}
|
||||
|
||||
if (args["animation_state"] != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
AnimState = new Animation((OSDMap)args["animation_state"]);
|
||||
}
|
||||
catch
|
||||
{
|
||||
AnimState = null;
|
||||
}
|
||||
}
|
||||
|
||||
//if ((args["agent_textures"] != null) && (args["agent_textures"]).Type == OSDType.Array)
|
||||
//{
|
||||
// OSDArray textures = (OSDArray)(args["agent_textures"]);
|
||||
|
||||
@@ -32,12 +32,12 @@ using System.Runtime.InteropServices;
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
|
||||
[assembly : AssemblyTitle("OpenSim.Framework.Communications")]
|
||||
[assembly : AssemblyTitle("OpenGrid.Framework.Communications")]
|
||||
[assembly : AssemblyDescription("")]
|
||||
[assembly : AssemblyConfiguration("")]
|
||||
[assembly : AssemblyCompany("http://opensimulator.org")]
|
||||
[assembly : AssemblyProduct("OpenSim")]
|
||||
[assembly : AssemblyCopyright("Copyright (c) OpenSimulator.org Developers")]
|
||||
[assembly : AssemblyProduct("OpenGrid.Framework.Communications")]
|
||||
[assembly : AssemblyCopyright("Copyright (c) OpenSimulator.org Developers 2007-2009")]
|
||||
[assembly : AssemblyTrademark("")]
|
||||
[assembly : AssemblyCulture("")]
|
||||
|
||||
@@ -61,5 +61,5 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly : AssemblyVersion("0.7.5.*")]
|
||||
[assembly : AssemblyVersion("0.6.5.*")]
|
||||
[assembly : AssemblyFileVersion("0.6.5.0")]
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("OpenSim.Framework.Configuration.HTTP")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("http://opensimulator.org")]
|
||||
[assembly: AssemblyProduct("OpenSim")]
|
||||
[assembly: AssemblyCopyright("OpenSimulator develoeprs")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("cb78b672-d000-4f93-88f9-dae151cc0061")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
[assembly: AssemblyVersion("0.7.5.*")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
@@ -1,33 +0,0 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("OpenSim.Framework.Configuration.XML")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("http://opensimulator.org")]
|
||||
[assembly: AssemblyProduct("OpenSim")]
|
||||
[assembly: AssemblyCopyright("OpenSimulator developers")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("eeb880df-0112-4c3d-87ed-b2108d614c55")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
[assembly: AssemblyVersion("0.7.5.*")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
@@ -39,7 +39,7 @@ using System.Runtime.InteropServices;
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("http://opensimulator.org")]
|
||||
[assembly : AssemblyProduct("ServerConsole")]
|
||||
[assembly: AssemblyCopyright("Copyright (c) OpenSimulator.org Developers")]
|
||||
[assembly: AssemblyCopyright("Copyright (c) OpenSimulator.org Developers 2007-2009")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
@@ -55,4 +55,4 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all values by your own or you can build default build and revision
|
||||
// numbers with the '*' character (the default):
|
||||
|
||||
[assembly : AssemblyVersion("0.7.5.*")]
|
||||
[assembly : AssemblyVersion("0.6.5.*")]
|
||||
|
||||
@@ -705,8 +705,6 @@ namespace OpenSim.Framework.Console
|
||||
{
|
||||
// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
public event OnOutputDelegate OnOutput;
|
||||
|
||||
public ICommands Commands { get; private set; }
|
||||
|
||||
public CommandConsole(string defaultPrompt) : base(defaultPrompt)
|
||||
@@ -726,13 +724,6 @@ namespace OpenSim.Framework.Console
|
||||
Output(s);
|
||||
}
|
||||
|
||||
protected void FireOnOutput(string text)
|
||||
{
|
||||
OnOutputDelegate onOutput = OnOutput;
|
||||
if (onOutput != null)
|
||||
onOutput(text);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Display a command prompt on the console and wait for user input
|
||||
/// </summary>
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using log4net;
|
||||
@@ -63,24 +62,6 @@ namespace OpenSim.Framework.Console
|
||||
|
||||
public const string VectorSeparator = ",";
|
||||
public static char[] VectorSeparatorChars = VectorSeparator.ToCharArray();
|
||||
|
||||
/// <summary>
|
||||
/// Check if the given file path exists.
|
||||
/// </summary>
|
||||
/// <remarks>If not, warning is printed to the given console.</remarks>
|
||||
/// <returns>true if the file does not exist, false otherwise.</returns>
|
||||
/// <param name='console'></param>
|
||||
/// <param name='path'></param>
|
||||
public static bool CheckFileDoesNotExist(ICommandConsole console, string path)
|
||||
{
|
||||
if (File.Exists(path))
|
||||
{
|
||||
console.OutputFormat("File {0} already exists. Please move or remove it.", path);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Try to parse a console UUID from the console.
|
||||
|
||||
@@ -319,8 +319,6 @@ namespace OpenSim.Framework.Console
|
||||
|
||||
public override void Output(string text, string level)
|
||||
{
|
||||
FireOnOutput(text);
|
||||
|
||||
lock (m_commandLine)
|
||||
{
|
||||
if (m_cursorYPosition == -1)
|
||||
@@ -511,4 +509,4 @@ namespace OpenSim.Framework.Console
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -40,8 +40,6 @@ namespace OpenSim.Framework.Console
|
||||
/// </summary>
|
||||
public class MockConsole : ICommandConsole
|
||||
{
|
||||
public event OnOutputDelegate OnOutput;
|
||||
|
||||
private MockCommands m_commands = new MockCommands();
|
||||
|
||||
public ICommands Commands { get { return m_commands; } }
|
||||
|
||||
@@ -100,7 +100,6 @@ namespace OpenSim.Framework.Console
|
||||
m_LineNumber++;
|
||||
m_Scrollback.Add(String.Format("{0}", m_LineNumber)+":"+level+":"+text);
|
||||
}
|
||||
FireOnOutput(text.Trim());
|
||||
System.Console.WriteLine(text.Trim());
|
||||
}
|
||||
|
||||
|
||||
@@ -44,6 +44,7 @@ namespace OpenSim.Framework
|
||||
public Vector3 Position;
|
||||
public byte[] binaryBucket;
|
||||
|
||||
|
||||
public uint ParentEstateID;
|
||||
public Guid RegionID;
|
||||
public uint timestamp;
|
||||
@@ -57,7 +58,7 @@ namespace OpenSim.Framework
|
||||
string _fromAgentName, UUID _toAgentID,
|
||||
byte _dialog, bool _fromGroup, string _message,
|
||||
UUID _imSessionID, bool _offline, Vector3 _position,
|
||||
byte[] _binaryBucket, bool addTimestamp)
|
||||
byte[] _binaryBucket)
|
||||
{
|
||||
fromAgentID = _fromAgentID.Guid;
|
||||
fromAgentName = _fromAgentName;
|
||||
@@ -78,9 +79,7 @@ namespace OpenSim.Framework
|
||||
ParentEstateID = scene.RegionInfo.EstateSettings.ParentEstateID;
|
||||
RegionID = scene.RegionInfo.RegionSettings.RegionUUID.Guid;
|
||||
}
|
||||
|
||||
if (addTimestamp)
|
||||
timestamp = (uint)Util.UnixTimeSinceEpoch();
|
||||
timestamp = (uint)Util.UnixTimeSinceEpoch();
|
||||
}
|
||||
|
||||
public GridInstantMessage(IScene scene, UUID _fromAgentID,
|
||||
@@ -88,7 +87,7 @@ namespace OpenSim.Framework
|
||||
string _message, bool _offline,
|
||||
Vector3 _position) : this(scene, _fromAgentID, _fromAgentName,
|
||||
_toAgentID, _dialog, false, _message,
|
||||
_fromAgentID ^ _toAgentID, _offline, _position, new byte[0], true)
|
||||
_fromAgentID ^ _toAgentID, _offline, _position, new byte[0])
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,12 +74,8 @@ namespace OpenSim.Framework
|
||||
XmlElement GetXml(XmlDocument doc);
|
||||
}
|
||||
|
||||
public delegate void OnOutputDelegate(string message);
|
||||
|
||||
public interface ICommandConsole : IConsole
|
||||
{
|
||||
event OnOutputDelegate OnOutput;
|
||||
|
||||
ICommands Commands { get; }
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -49,8 +49,8 @@ namespace OpenSim.Framework
|
||||
// use only one serializer to give the runtime a chance to
|
||||
// optimize it (it won't do that if you use a new instance
|
||||
// every time)
|
||||
private static XmlSerializer serializer = new XmlSerializer(typeof(LandData));
|
||||
|
||||
private static XmlSerializer serializer = new XmlSerializer(typeof (LandData));
|
||||
|
||||
private Vector3 _AABBMax = new Vector3();
|
||||
private Vector3 _AABBMin = new Vector3();
|
||||
private int _area = 0;
|
||||
@@ -65,11 +65,11 @@ namespace OpenSim.Framework
|
||||
private byte[] _bitmap = new byte[512];
|
||||
private string _description = String.Empty;
|
||||
|
||||
private uint _flags = (uint)ParcelFlags.AllowFly | (uint)ParcelFlags.AllowLandmark |
|
||||
(uint)ParcelFlags.AllowAPrimitiveEntry |
|
||||
(uint)ParcelFlags.AllowDeedToGroup | (uint)ParcelFlags.AllowTerraform |
|
||||
(uint)ParcelFlags.CreateObjects | (uint)ParcelFlags.AllowOtherScripts |
|
||||
(uint)ParcelFlags.SoundLocal | (uint)ParcelFlags.AllowVoiceChat;
|
||||
private uint _flags = (uint) ParcelFlags.AllowFly | (uint) ParcelFlags.AllowLandmark |
|
||||
(uint) ParcelFlags.AllowAPrimitiveEntry |
|
||||
(uint) ParcelFlags.AllowDeedToGroup | (uint) ParcelFlags.AllowTerraform |
|
||||
(uint) ParcelFlags.CreateObjects | (uint) ParcelFlags.AllowOtherScripts |
|
||||
(uint) ParcelFlags.SoundLocal | (uint) ParcelFlags.AllowVoiceChat;
|
||||
|
||||
private byte _landingType = 0;
|
||||
private string _name = "Your Parcel";
|
||||
@@ -97,36 +97,16 @@ namespace OpenSim.Framework
|
||||
private bool _mediaLoop = false;
|
||||
private bool _obscureMusic = false;
|
||||
private bool _obscureMedia = false;
|
||||
private float _dwell = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Traffic count of parcel
|
||||
/// </summary>
|
||||
[XmlIgnore]
|
||||
public float Dwell
|
||||
{
|
||||
get
|
||||
{
|
||||
return _dwell;
|
||||
}
|
||||
set
|
||||
{
|
||||
_dwell = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Whether to obscure parcel media URL
|
||||
/// </summary>
|
||||
[XmlIgnore]
|
||||
public bool ObscureMedia
|
||||
{
|
||||
get
|
||||
{
|
||||
public bool ObscureMedia {
|
||||
get {
|
||||
return _obscureMedia;
|
||||
}
|
||||
set
|
||||
{
|
||||
set {
|
||||
_obscureMedia = value;
|
||||
}
|
||||
}
|
||||
@@ -135,14 +115,11 @@ namespace OpenSim.Framework
|
||||
/// Whether to obscure parcel music URL
|
||||
/// </summary>
|
||||
[XmlIgnore]
|
||||
public bool ObscureMusic
|
||||
{
|
||||
get
|
||||
{
|
||||
public bool ObscureMusic {
|
||||
get {
|
||||
return _obscureMusic;
|
||||
}
|
||||
set
|
||||
{
|
||||
set {
|
||||
_obscureMusic = value;
|
||||
}
|
||||
}
|
||||
@@ -151,14 +128,11 @@ namespace OpenSim.Framework
|
||||
/// Whether to loop parcel media
|
||||
/// </summary>
|
||||
[XmlIgnore]
|
||||
public bool MediaLoop
|
||||
{
|
||||
get
|
||||
{
|
||||
public bool MediaLoop {
|
||||
get {
|
||||
return _mediaLoop;
|
||||
}
|
||||
set
|
||||
{
|
||||
set {
|
||||
_mediaLoop = value;
|
||||
}
|
||||
}
|
||||
@@ -167,14 +141,11 @@ namespace OpenSim.Framework
|
||||
/// Height of parcel media render
|
||||
/// </summary>
|
||||
[XmlIgnore]
|
||||
public int MediaHeight
|
||||
{
|
||||
get
|
||||
{
|
||||
public int MediaHeight {
|
||||
get {
|
||||
return _mediaHeight;
|
||||
}
|
||||
set
|
||||
{
|
||||
set {
|
||||
_mediaHeight = value;
|
||||
}
|
||||
}
|
||||
@@ -183,14 +154,11 @@ namespace OpenSim.Framework
|
||||
/// Width of parcel media render
|
||||
/// </summary>
|
||||
[XmlIgnore]
|
||||
public int MediaWidth
|
||||
{
|
||||
get
|
||||
{
|
||||
public int MediaWidth {
|
||||
get {
|
||||
return _mediaWidth;
|
||||
}
|
||||
set
|
||||
{
|
||||
set {
|
||||
_mediaWidth = value;
|
||||
}
|
||||
}
|
||||
@@ -199,14 +167,11 @@ namespace OpenSim.Framework
|
||||
/// Upper corner of the AABB for the parcel
|
||||
/// </summary>
|
||||
[XmlIgnore]
|
||||
public Vector3 AABBMax
|
||||
{
|
||||
get
|
||||
{
|
||||
public Vector3 AABBMax {
|
||||
get {
|
||||
return _AABBMax;
|
||||
}
|
||||
set
|
||||
{
|
||||
set {
|
||||
_AABBMax = value;
|
||||
}
|
||||
}
|
||||
@@ -214,14 +179,11 @@ namespace OpenSim.Framework
|
||||
/// Lower corner of the AABB for the parcel
|
||||
/// </summary>
|
||||
[XmlIgnore]
|
||||
public Vector3 AABBMin
|
||||
{
|
||||
get
|
||||
{
|
||||
public Vector3 AABBMin {
|
||||
get {
|
||||
return _AABBMin;
|
||||
}
|
||||
set
|
||||
{
|
||||
set {
|
||||
_AABBMin = value;
|
||||
}
|
||||
}
|
||||
@@ -229,14 +191,11 @@ namespace OpenSim.Framework
|
||||
/// <summary>
|
||||
/// Area in meters^2 the parcel contains
|
||||
/// </summary>
|
||||
public int Area
|
||||
{
|
||||
get
|
||||
{
|
||||
public int Area {
|
||||
get {
|
||||
return _area;
|
||||
}
|
||||
set
|
||||
{
|
||||
set {
|
||||
_area = value;
|
||||
}
|
||||
}
|
||||
@@ -244,14 +203,11 @@ namespace OpenSim.Framework
|
||||
/// <summary>
|
||||
/// ID of auction (3rd Party Integration) when parcel is being auctioned
|
||||
/// </summary>
|
||||
public uint AuctionID
|
||||
{
|
||||
get
|
||||
{
|
||||
public uint AuctionID {
|
||||
get {
|
||||
return _auctionID;
|
||||
}
|
||||
set
|
||||
{
|
||||
set {
|
||||
_auctionID = value;
|
||||
}
|
||||
}
|
||||
@@ -259,14 +215,11 @@ namespace OpenSim.Framework
|
||||
/// <summary>
|
||||
/// UUID of authorized buyer of parcel. This is UUID.Zero if anyone can buy it.
|
||||
/// </summary>
|
||||
public UUID AuthBuyerID
|
||||
{
|
||||
get
|
||||
{
|
||||
public UUID AuthBuyerID {
|
||||
get {
|
||||
return _authBuyerID;
|
||||
}
|
||||
set
|
||||
{
|
||||
set {
|
||||
_authBuyerID = value;
|
||||
}
|
||||
}
|
||||
@@ -274,14 +227,11 @@ namespace OpenSim.Framework
|
||||
/// <summary>
|
||||
/// Category of parcel. Used for classifying the parcel in classified listings
|
||||
/// </summary>
|
||||
public ParcelCategory Category
|
||||
{
|
||||
get
|
||||
{
|
||||
public ParcelCategory Category {
|
||||
get {
|
||||
return _category;
|
||||
}
|
||||
set
|
||||
{
|
||||
set {
|
||||
_category = value;
|
||||
}
|
||||
}
|
||||
@@ -289,14 +239,11 @@ namespace OpenSim.Framework
|
||||
/// <summary>
|
||||
/// Date that the current owner purchased or claimed the parcel
|
||||
/// </summary>
|
||||
public int ClaimDate
|
||||
{
|
||||
get
|
||||
{
|
||||
public int ClaimDate {
|
||||
get {
|
||||
return _claimDate;
|
||||
}
|
||||
set
|
||||
{
|
||||
set {
|
||||
_claimDate = value;
|
||||
}
|
||||
}
|
||||
@@ -304,14 +251,11 @@ namespace OpenSim.Framework
|
||||
/// <summary>
|
||||
/// The last price that the parcel was sold at
|
||||
/// </summary>
|
||||
public int ClaimPrice
|
||||
{
|
||||
get
|
||||
{
|
||||
public int ClaimPrice {
|
||||
get {
|
||||
return _claimPrice;
|
||||
}
|
||||
set
|
||||
{
|
||||
set {
|
||||
_claimPrice = value;
|
||||
}
|
||||
}
|
||||
@@ -319,14 +263,11 @@ namespace OpenSim.Framework
|
||||
/// <summary>
|
||||
/// Global ID for the parcel. (3rd Party Integration)
|
||||
/// </summary>
|
||||
public UUID GlobalID
|
||||
{
|
||||
get
|
||||
{
|
||||
public UUID GlobalID {
|
||||
get {
|
||||
return _globalID;
|
||||
}
|
||||
set
|
||||
{
|
||||
set {
|
||||
_globalID = value;
|
||||
}
|
||||
}
|
||||
@@ -334,14 +275,11 @@ namespace OpenSim.Framework
|
||||
/// <summary>
|
||||
/// Unique ID of the Group that owns
|
||||
/// </summary>
|
||||
public UUID GroupID
|
||||
{
|
||||
get
|
||||
{
|
||||
public UUID GroupID {
|
||||
get {
|
||||
return _groupID;
|
||||
}
|
||||
set
|
||||
{
|
||||
set {
|
||||
_groupID = value;
|
||||
}
|
||||
}
|
||||
@@ -349,14 +287,11 @@ namespace OpenSim.Framework
|
||||
/// <summary>
|
||||
/// Returns true if the Land Parcel is owned by a group
|
||||
/// </summary>
|
||||
public bool IsGroupOwned
|
||||
{
|
||||
get
|
||||
{
|
||||
public bool IsGroupOwned {
|
||||
get {
|
||||
return _isGroupOwned;
|
||||
}
|
||||
set
|
||||
{
|
||||
set {
|
||||
_isGroupOwned = value;
|
||||
}
|
||||
}
|
||||
@@ -364,14 +299,11 @@ namespace OpenSim.Framework
|
||||
/// <summary>
|
||||
/// jp2 data for the image representative of the parcel in the parcel dialog
|
||||
/// </summary>
|
||||
public byte[] Bitmap
|
||||
{
|
||||
get
|
||||
{
|
||||
public byte[] Bitmap {
|
||||
get {
|
||||
return _bitmap;
|
||||
}
|
||||
set
|
||||
{
|
||||
set {
|
||||
_bitmap = value;
|
||||
}
|
||||
}
|
||||
@@ -379,14 +311,11 @@ namespace OpenSim.Framework
|
||||
/// <summary>
|
||||
/// Parcel Description
|
||||
/// </summary>
|
||||
public string Description
|
||||
{
|
||||
get
|
||||
{
|
||||
public string Description {
|
||||
get {
|
||||
return _description;
|
||||
}
|
||||
set
|
||||
{
|
||||
set {
|
||||
_description = value;
|
||||
}
|
||||
}
|
||||
@@ -394,14 +323,11 @@ namespace OpenSim.Framework
|
||||
/// <summary>
|
||||
/// Parcel settings. Access flags, Fly, NoPush, Voice, Scripts allowed, etc. ParcelFlags
|
||||
/// </summary>
|
||||
public uint Flags
|
||||
{
|
||||
get
|
||||
{
|
||||
public uint Flags {
|
||||
get {
|
||||
return _flags;
|
||||
}
|
||||
set
|
||||
{
|
||||
set {
|
||||
_flags = value;
|
||||
}
|
||||
}
|
||||
@@ -410,14 +336,11 @@ namespace OpenSim.Framework
|
||||
/// Determines if people are able to teleport where they please on the parcel or if they
|
||||
/// get constrainted to a specific point on teleport within the parcel
|
||||
/// </summary>
|
||||
public byte LandingType
|
||||
{
|
||||
get
|
||||
{
|
||||
public byte LandingType {
|
||||
get {
|
||||
return _landingType;
|
||||
}
|
||||
set
|
||||
{
|
||||
set {
|
||||
_landingType = value;
|
||||
}
|
||||
}
|
||||
@@ -425,14 +348,11 @@ namespace OpenSim.Framework
|
||||
/// <summary>
|
||||
/// Parcel Name
|
||||
/// </summary>
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
public string Name {
|
||||
get {
|
||||
return _name;
|
||||
}
|
||||
set
|
||||
{
|
||||
set {
|
||||
_name = value;
|
||||
}
|
||||
}
|
||||
@@ -440,14 +360,11 @@ namespace OpenSim.Framework
|
||||
/// <summary>
|
||||
/// Status of Parcel, Leased, Abandoned, For Sale
|
||||
/// </summary>
|
||||
public ParcelStatus Status
|
||||
{
|
||||
get
|
||||
{
|
||||
public ParcelStatus Status {
|
||||
get {
|
||||
return _status;
|
||||
}
|
||||
set
|
||||
{
|
||||
set {
|
||||
_status = value;
|
||||
}
|
||||
}
|
||||
@@ -455,14 +372,11 @@ namespace OpenSim.Framework
|
||||
/// <summary>
|
||||
/// Internal ID of the parcel. Sometimes the client will try to use this value
|
||||
/// </summary>
|
||||
public int LocalID
|
||||
{
|
||||
get
|
||||
{
|
||||
public int LocalID {
|
||||
get {
|
||||
return _localID;
|
||||
}
|
||||
set
|
||||
{
|
||||
set {
|
||||
_localID = value;
|
||||
}
|
||||
}
|
||||
@@ -470,14 +384,11 @@ namespace OpenSim.Framework
|
||||
/// <summary>
|
||||
/// Determines if we scale the media based on the surface it's on
|
||||
/// </summary>
|
||||
public byte MediaAutoScale
|
||||
{
|
||||
get
|
||||
{
|
||||
public byte MediaAutoScale {
|
||||
get {
|
||||
return _mediaAutoScale;
|
||||
}
|
||||
set
|
||||
{
|
||||
set {
|
||||
_mediaAutoScale = value;
|
||||
}
|
||||
}
|
||||
@@ -485,14 +396,11 @@ namespace OpenSim.Framework
|
||||
/// <summary>
|
||||
/// Texture Guid to replace with the output of the media stream
|
||||
/// </summary>
|
||||
public UUID MediaID
|
||||
{
|
||||
get
|
||||
{
|
||||
public UUID MediaID {
|
||||
get {
|
||||
return _mediaID;
|
||||
}
|
||||
set
|
||||
{
|
||||
set {
|
||||
_mediaID = value;
|
||||
}
|
||||
}
|
||||
@@ -500,14 +408,11 @@ namespace OpenSim.Framework
|
||||
/// <summary>
|
||||
/// URL to the media file to display
|
||||
/// </summary>
|
||||
public string MediaURL
|
||||
{
|
||||
get
|
||||
{
|
||||
public string MediaURL {
|
||||
get {
|
||||
return _mediaURL;
|
||||
}
|
||||
set
|
||||
{
|
||||
set {
|
||||
_mediaURL = value;
|
||||
}
|
||||
}
|
||||
@@ -527,14 +432,11 @@ namespace OpenSim.Framework
|
||||
/// <summary>
|
||||
/// URL to the shoutcast music stream to play on the parcel
|
||||
/// </summary>
|
||||
public string MusicURL
|
||||
{
|
||||
get
|
||||
{
|
||||
public string MusicURL {
|
||||
get {
|
||||
return _musicURL;
|
||||
}
|
||||
set
|
||||
{
|
||||
set {
|
||||
_musicURL = value;
|
||||
}
|
||||
}
|
||||
@@ -543,14 +445,11 @@ namespace OpenSim.Framework
|
||||
/// Owner Avatar or Group of the parcel. Naturally, all land masses must be
|
||||
/// owned by someone
|
||||
/// </summary>
|
||||
public UUID OwnerID
|
||||
{
|
||||
get
|
||||
{
|
||||
public UUID OwnerID {
|
||||
get {
|
||||
return _ownerID;
|
||||
}
|
||||
set
|
||||
{
|
||||
set {
|
||||
_ownerID = value;
|
||||
}
|
||||
}
|
||||
@@ -558,14 +457,11 @@ namespace OpenSim.Framework
|
||||
/// <summary>
|
||||
/// List of access data for the parcel. User data, some bitflags, and a time
|
||||
/// </summary>
|
||||
public List<LandAccessEntry> ParcelAccessList
|
||||
{
|
||||
get
|
||||
{
|
||||
public List<LandAccessEntry> ParcelAccessList {
|
||||
get {
|
||||
return _parcelAccessList;
|
||||
}
|
||||
set
|
||||
{
|
||||
set {
|
||||
_parcelAccessList = value;
|
||||
}
|
||||
}
|
||||
@@ -573,14 +469,11 @@ namespace OpenSim.Framework
|
||||
/// <summary>
|
||||
/// How long in hours a Pass to the parcel is given
|
||||
/// </summary>
|
||||
public float PassHours
|
||||
{
|
||||
get
|
||||
{
|
||||
public float PassHours {
|
||||
get {
|
||||
return _passHours;
|
||||
}
|
||||
set
|
||||
{
|
||||
set {
|
||||
_passHours = value;
|
||||
}
|
||||
}
|
||||
@@ -588,14 +481,11 @@ namespace OpenSim.Framework
|
||||
/// <summary>
|
||||
/// Price to purchase a Pass to a restricted parcel
|
||||
/// </summary>
|
||||
public int PassPrice
|
||||
{
|
||||
get
|
||||
{
|
||||
public int PassPrice {
|
||||
get {
|
||||
return _passPrice;
|
||||
}
|
||||
set
|
||||
{
|
||||
set {
|
||||
_passPrice = value;
|
||||
}
|
||||
}
|
||||
@@ -603,14 +493,11 @@ namespace OpenSim.Framework
|
||||
/// <summary>
|
||||
/// When the parcel is being sold, this is the price to purchase the parcel
|
||||
/// </summary>
|
||||
public int SalePrice
|
||||
{
|
||||
get
|
||||
{
|
||||
public int SalePrice {
|
||||
get {
|
||||
return _salePrice;
|
||||
}
|
||||
set
|
||||
{
|
||||
set {
|
||||
_salePrice = value;
|
||||
}
|
||||
}
|
||||
@@ -619,14 +506,11 @@ namespace OpenSim.Framework
|
||||
/// Number of meters^2 in the Simulator
|
||||
/// </summary>
|
||||
[XmlIgnore]
|
||||
public int SimwideArea
|
||||
{
|
||||
get
|
||||
{
|
||||
public int SimwideArea {
|
||||
get {
|
||||
return _simwideArea;
|
||||
}
|
||||
set
|
||||
{
|
||||
set {
|
||||
_simwideArea = value;
|
||||
}
|
||||
}
|
||||
@@ -635,14 +519,11 @@ namespace OpenSim.Framework
|
||||
/// Number of SceneObjectPart in the Simulator
|
||||
/// </summary>
|
||||
[XmlIgnore]
|
||||
public int SimwidePrims
|
||||
{
|
||||
get
|
||||
{
|
||||
public int SimwidePrims {
|
||||
get {
|
||||
return _simwidePrims;
|
||||
}
|
||||
set
|
||||
{
|
||||
set {
|
||||
_simwidePrims = value;
|
||||
}
|
||||
}
|
||||
@@ -650,14 +531,11 @@ namespace OpenSim.Framework
|
||||
/// <summary>
|
||||
/// ID of the snapshot used in the client parcel dialog of the parcel
|
||||
/// </summary>
|
||||
public UUID SnapshotID
|
||||
{
|
||||
get
|
||||
{
|
||||
public UUID SnapshotID {
|
||||
get {
|
||||
return _snapshotID;
|
||||
}
|
||||
set
|
||||
{
|
||||
set {
|
||||
_snapshotID = value;
|
||||
}
|
||||
}
|
||||
@@ -666,14 +544,11 @@ namespace OpenSim.Framework
|
||||
/// When teleporting is restricted to a certain point, this is the location
|
||||
/// that the user will be redirected to
|
||||
/// </summary>
|
||||
public Vector3 UserLocation
|
||||
{
|
||||
get
|
||||
{
|
||||
public Vector3 UserLocation {
|
||||
get {
|
||||
return _userLocation;
|
||||
}
|
||||
set
|
||||
{
|
||||
set {
|
||||
_userLocation = value;
|
||||
}
|
||||
}
|
||||
@@ -682,14 +557,11 @@ namespace OpenSim.Framework
|
||||
/// When teleporting is restricted to a certain point, this is the rotation
|
||||
/// that the user will be positioned
|
||||
/// </summary>
|
||||
public Vector3 UserLookAt
|
||||
{
|
||||
get
|
||||
{
|
||||
public Vector3 UserLookAt {
|
||||
get {
|
||||
return _userLookAt;
|
||||
}
|
||||
set
|
||||
{
|
||||
set {
|
||||
_userLookAt = value;
|
||||
}
|
||||
}
|
||||
@@ -698,14 +570,11 @@ namespace OpenSim.Framework
|
||||
/// Autoreturn number of minutes to return SceneObjectGroup that are owned by someone who doesn't own
|
||||
/// the parcel and isn't set to the same 'group' as the parcel.
|
||||
/// </summary>
|
||||
public int OtherCleanTime
|
||||
{
|
||||
get
|
||||
{
|
||||
public int OtherCleanTime {
|
||||
get {
|
||||
return _otherCleanTime;
|
||||
}
|
||||
set
|
||||
{
|
||||
set {
|
||||
_otherCleanTime = value;
|
||||
}
|
||||
}
|
||||
@@ -713,14 +582,11 @@ namespace OpenSim.Framework
|
||||
/// <summary>
|
||||
/// parcel media description
|
||||
/// </summary>
|
||||
public string MediaDescription
|
||||
{
|
||||
get
|
||||
{
|
||||
public string MediaDescription {
|
||||
get {
|
||||
return _mediaDescription;
|
||||
}
|
||||
set
|
||||
{
|
||||
set {
|
||||
_mediaDescription = value;
|
||||
}
|
||||
}
|
||||
@@ -756,7 +622,7 @@ namespace OpenSim.Framework
|
||||
landData._mediaURL = _mediaURL;
|
||||
landData._musicURL = _musicURL;
|
||||
landData._ownerID = _ownerID;
|
||||
landData._bitmap = (byte[])_bitmap.Clone();
|
||||
landData._bitmap = (byte[]) _bitmap.Clone();
|
||||
landData._description = _description;
|
||||
landData._flags = _flags;
|
||||
landData._name = _name;
|
||||
@@ -777,7 +643,6 @@ namespace OpenSim.Framework
|
||||
landData._obscureMedia = _obscureMedia;
|
||||
landData._simwideArea = _simwideArea;
|
||||
landData._simwidePrims = _simwidePrims;
|
||||
landData._dwell = _dwell;
|
||||
|
||||
landData._parcelAccessList.Clear();
|
||||
foreach (LandAccessEntry entry in _parcelAccessList)
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("OpenSim.Framework.Monitoring")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("http://opensimulator.org")]
|
||||
[assembly: AssemblyProduct("OpenSim")]
|
||||
[assembly: AssemblyCopyright("OpenSimulator developers")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("74506fe3-2f9d-44c1-94c9-a30f79d9e0cb")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
[assembly: AssemblyVersion("0.7.5.*")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
@@ -1,563 +0,0 @@
|
||||
|
||||
/*
|
||||
* Copyright (c) Contributors, http://opensimulator.org/
|
||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of the OpenSimulator Project nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Linq;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using Mono.Addins;
|
||||
using Mono.Addins.Setup;
|
||||
using Mono.Addins.Description;
|
||||
using OpenSim.Framework;
|
||||
|
||||
|
||||
namespace OpenSim.Framework
|
||||
{
|
||||
/// <summary>
|
||||
/// Manager for registries and plugins
|
||||
/// </summary>
|
||||
public class PluginManager : SetupService
|
||||
{
|
||||
public AddinRegistry PluginRegistry;
|
||||
|
||||
public PluginManager(AddinRegistry registry): base (registry)
|
||||
{
|
||||
PluginRegistry = registry;
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Installs the plugin.
|
||||
/// </summary>
|
||||
/// <returns>
|
||||
/// The plugin.
|
||||
/// </returns>
|
||||
/// <param name='args'>
|
||||
/// Arguments.
|
||||
/// </param>
|
||||
public bool InstallPlugin(int ndx, out Dictionary<string, object> result)
|
||||
{
|
||||
Dictionary<string, object> res = new Dictionary<string, object>();
|
||||
|
||||
PackageCollection pack = new PackageCollection();
|
||||
PackageCollection toUninstall;
|
||||
DependencyCollection unresolved;
|
||||
|
||||
IProgressStatus ps = new ConsoleProgressStatus(false);
|
||||
|
||||
AddinRepositoryEntry[] available = GetSortedAvailbleAddins();
|
||||
|
||||
if (ndx > (available.Length - 1))
|
||||
{
|
||||
MainConsole.Instance.Output("Selection out of range");
|
||||
result = res;
|
||||
return false;
|
||||
}
|
||||
|
||||
AddinRepositoryEntry aentry = available[ndx];
|
||||
|
||||
Package p = Package.FromRepository(aentry);
|
||||
pack.Add(p);
|
||||
|
||||
ResolveDependencies(ps, pack, out toUninstall, out unresolved);
|
||||
|
||||
// Attempt to install the plugin disabled
|
||||
if (Install(ps, pack) == true)
|
||||
{
|
||||
MainConsole.Instance.Output("Ignore the following error...");
|
||||
PluginRegistry.Update(ps);
|
||||
Addin addin = PluginRegistry.GetAddin(aentry.Addin.Id);
|
||||
PluginRegistry.DisableAddin(addin.Id);
|
||||
addin.Enabled = false;
|
||||
|
||||
MainConsole.Instance.Output("Installation Success");
|
||||
ListInstalledAddins(out res);
|
||||
result = res;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
MainConsole.Instance.Output("Installation Failed");
|
||||
result = res;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Remove plugin
|
||||
/// <summary>
|
||||
/// Uns the install.
|
||||
/// </summary>
|
||||
/// <param name='args'>
|
||||
/// Arguments.
|
||||
/// </param>
|
||||
public void UnInstall(int ndx)
|
||||
{
|
||||
Addin[] addins = GetSortedAddinList("RobustPlugin");
|
||||
|
||||
if (ndx > (addins.Length -1))
|
||||
{
|
||||
MainConsole.Instance.Output("Selection out of range");
|
||||
return;
|
||||
}
|
||||
|
||||
Addin addin = addins[ndx];
|
||||
MainConsole.Instance.OutputFormat("Uninstalling plugin {0}", addin.Id);
|
||||
AddinManager.Registry.DisableAddin(addin.Id);
|
||||
addin.Enabled = false;
|
||||
IProgressStatus ps = new ConsoleProgressStatus(false);
|
||||
Uninstall(ps, addin.Id);
|
||||
MainConsole.Instance.Output("Uninstall Success - restart to complete operation");
|
||||
return;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Checks the installed.
|
||||
/// </summary>
|
||||
/// <returns>
|
||||
/// The installed.
|
||||
/// </returns>
|
||||
public string CheckInstalled()
|
||||
{
|
||||
return "CheckInstall";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Lists the installed addins.
|
||||
/// </summary>
|
||||
/// <param name='result'>
|
||||
/// Result.
|
||||
/// </param>
|
||||
public void ListInstalledAddins(out Dictionary<string, object> result)
|
||||
{
|
||||
Dictionary<string, object> res = new Dictionary<string, object>();
|
||||
|
||||
Addin[] addins = GetSortedAddinList("RobustPlugin");
|
||||
if(addins.Count() < 1)
|
||||
{
|
||||
MainConsole.Instance.Output("Error!");
|
||||
}
|
||||
int count = 0;
|
||||
foreach (Addin addin in addins)
|
||||
{
|
||||
Dictionary<string, object> r = new Dictionary<string, object>();
|
||||
r["enabled"] = addin.Enabled == true ? true : false;
|
||||
r["name"] = addin.LocalId;
|
||||
r["version"] = addin.Version;
|
||||
|
||||
res.Add(count.ToString(), r);
|
||||
|
||||
count++;
|
||||
}
|
||||
result = res;
|
||||
return;
|
||||
}
|
||||
|
||||
// List compatible plugins in registered repositories
|
||||
/// <summary>
|
||||
/// Lists the available.
|
||||
/// </summary>
|
||||
/// <param name='result'>
|
||||
/// Result.
|
||||
/// </param>
|
||||
public void ListAvailable(out Dictionary<string, object> result)
|
||||
{
|
||||
Dictionary<string, object> res = new Dictionary<string, object>();
|
||||
|
||||
AddinRepositoryEntry[] addins = GetSortedAvailbleAddins();
|
||||
|
||||
int count = 0;
|
||||
foreach (AddinRepositoryEntry addin in addins)
|
||||
{
|
||||
Dictionary<string, object> r = new Dictionary<string, object>();
|
||||
r["name"] = addin.Addin.Name;
|
||||
r["version"] = addin.Addin.Version;
|
||||
r["repository"] = addin.RepositoryName;
|
||||
|
||||
res.Add(count.ToString(), r);
|
||||
count++;
|
||||
}
|
||||
result = res;
|
||||
return;
|
||||
}
|
||||
|
||||
// List available updates ** 1
|
||||
/// <summary>
|
||||
/// Lists the updates.
|
||||
/// </summary>
|
||||
public void ListUpdates()
|
||||
{
|
||||
IProgressStatus ps = new ConsoleProgressStatus(true);
|
||||
Console.WriteLine ("Looking for updates...");
|
||||
Repositories.UpdateAllRepositories (ps);
|
||||
Console.WriteLine ("Available add-in updates:");
|
||||
bool found = false;
|
||||
AddinRepositoryEntry[] entries = Repositories.GetAvailableUpdates();
|
||||
|
||||
foreach (AddinRepositoryEntry entry in entries)
|
||||
{
|
||||
Console.WriteLine(String.Format("{0}",entry.Addin.Id));
|
||||
}
|
||||
}
|
||||
|
||||
// Sync to repositories
|
||||
/// <summary>
|
||||
/// Update this instance.
|
||||
/// </summary>
|
||||
public string Update()
|
||||
{
|
||||
IProgressStatus ps = new ConsoleProgressStatus(true);
|
||||
Repositories.UpdateAllRepositories(ps);
|
||||
return "Update";
|
||||
}
|
||||
|
||||
// Register a repository
|
||||
/// <summary>
|
||||
/// Register a repository with our server.
|
||||
/// </summary>
|
||||
/// <returns>
|
||||
/// result of the action
|
||||
/// </returns>
|
||||
/// <param name='repo'>
|
||||
/// The URL of the repository we want to add
|
||||
/// </param>
|
||||
public bool AddRepository(string repo)
|
||||
{
|
||||
Repositories.RegisterRepository(null, repo, true);
|
||||
PluginRegistry.Rebuild(null);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the repository.
|
||||
/// </summary>
|
||||
public void GetRepository()
|
||||
{
|
||||
Repositories.UpdateAllRepositories(new ConsoleProgressStatus(false));
|
||||
}
|
||||
|
||||
// Remove a repository from the list
|
||||
/// <summary>
|
||||
/// Removes the repository.
|
||||
/// </summary>
|
||||
/// <param name='args'>
|
||||
/// Arguments.
|
||||
/// </param>
|
||||
public void RemoveRepository(string[] args)
|
||||
{
|
||||
AddinRepository[] reps = Repositories.GetRepositories();
|
||||
Array.Sort(reps, (r1,r2) => r1.Title.CompareTo(r2.Title));
|
||||
if (reps.Length == 0)
|
||||
{
|
||||
MainConsole.Instance.Output("No repositories have been registered.");
|
||||
return;
|
||||
}
|
||||
|
||||
int n = Convert.ToInt16(args[2]);
|
||||
if (n > (reps.Length -1))
|
||||
{
|
||||
MainConsole.Instance.Output("Selection out of range");
|
||||
return;
|
||||
}
|
||||
|
||||
AddinRepository rep = reps[n];
|
||||
Repositories.RemoveRepository(rep.Url);
|
||||
return;
|
||||
}
|
||||
|
||||
// Enable repository
|
||||
/// <summary>
|
||||
/// Enables the repository.
|
||||
/// </summary>
|
||||
/// <param name='args'>
|
||||
/// Arguments.
|
||||
/// </param>
|
||||
public void EnableRepository(string[] args)
|
||||
{
|
||||
AddinRepository[] reps = Repositories.GetRepositories();
|
||||
Array.Sort(reps, (r1,r2) => r1.Title.CompareTo(r2.Title));
|
||||
if (reps.Length == 0)
|
||||
{
|
||||
MainConsole.Instance.Output("No repositories have been registered.");
|
||||
return;
|
||||
}
|
||||
|
||||
int n = Convert.ToInt16(args[2]);
|
||||
if (n > (reps.Length -1))
|
||||
{
|
||||
MainConsole.Instance.Output("Selection out of range");
|
||||
return;
|
||||
}
|
||||
|
||||
AddinRepository rep = reps[n];
|
||||
Repositories.SetRepositoryEnabled(rep.Url, true);
|
||||
return;
|
||||
}
|
||||
|
||||
// Disable a repository
|
||||
/// <summary>
|
||||
/// Disables the repository.
|
||||
/// </summary>
|
||||
/// <param name='args'>
|
||||
/// Arguments.
|
||||
/// </param>
|
||||
public void DisableRepository(string[] args)
|
||||
{
|
||||
AddinRepository[] reps = Repositories.GetRepositories();
|
||||
Array.Sort(reps, (r1,r2) => r1.Title.CompareTo(r2.Title));
|
||||
if (reps.Length == 0)
|
||||
{
|
||||
MainConsole.Instance.Output("No repositories have been registered.");
|
||||
return;
|
||||
}
|
||||
|
||||
int n = Convert.ToInt16(args[2]);
|
||||
if (n > (reps.Length -1))
|
||||
{
|
||||
MainConsole.Instance.Output("Selection out of range");
|
||||
return;
|
||||
}
|
||||
|
||||
AddinRepository rep = reps[n];
|
||||
Repositories.SetRepositoryEnabled(rep.Url, false);
|
||||
return;
|
||||
}
|
||||
|
||||
// List registered repositories
|
||||
/// <summary>
|
||||
/// Lists the repositories.
|
||||
/// </summary>
|
||||
/// <param name='result'>
|
||||
/// Result.
|
||||
/// </param>
|
||||
public void ListRepositories(out Dictionary<string, object> result)
|
||||
{
|
||||
Dictionary<string, object> res = new Dictionary<string, object>();
|
||||
result = res;
|
||||
|
||||
AddinRepository[] reps = GetSortedAddinRepo();
|
||||
if (reps.Length == 0)
|
||||
{
|
||||
MainConsole.Instance.Output("No repositories have been registered.");
|
||||
return;
|
||||
}
|
||||
|
||||
int count = 0;
|
||||
foreach (AddinRepository rep in reps)
|
||||
{
|
||||
Dictionary<string, object> r = new Dictionary<string, object>();
|
||||
r["enabled"] = rep.Enabled == true ? true : false;
|
||||
r["name"] = rep.Name;
|
||||
r["url"] = rep.Url;
|
||||
|
||||
res.Add(count.ToString(), r);
|
||||
count++;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates the registry.
|
||||
/// </summary>
|
||||
public void UpdateRegistry()
|
||||
{
|
||||
PluginRegistry.Update();
|
||||
}
|
||||
|
||||
// Show plugin info
|
||||
/// <summary>
|
||||
/// Addins the info.
|
||||
/// </summary>
|
||||
/// <returns>
|
||||
/// The info.
|
||||
/// </returns>
|
||||
/// <param name='args'>
|
||||
/// Arguments.
|
||||
/// </param>
|
||||
public bool AddinInfo(int ndx, out Dictionary<string, object> result)
|
||||
{
|
||||
Dictionary<string, object> res = new Dictionary<string, object>();
|
||||
result = res;
|
||||
|
||||
Addin[] addins = GetSortedAddinList("RobustPlugin");
|
||||
|
||||
if (ndx > (addins.Length - 1))
|
||||
{
|
||||
MainConsole.Instance.Output("Selection out of range");
|
||||
return false;
|
||||
}
|
||||
// author category description
|
||||
Addin addin = addins[ndx];
|
||||
|
||||
res["author"] = addin.Description.Author;
|
||||
res["category"] = addin.Description.Category;
|
||||
res["description"] = addin.Description.Description;
|
||||
res["name"] = addin.Name;
|
||||
res["url"] = addin.Description.Url;
|
||||
res["file_name"] = addin.Description.FileName;
|
||||
|
||||
result = res;
|
||||
return true;
|
||||
}
|
||||
|
||||
// Disable a plugin
|
||||
/// <summary>
|
||||
/// Disables the plugin.
|
||||
/// </summary>
|
||||
/// <param name='args'>
|
||||
/// Arguments.
|
||||
/// </param>
|
||||
public void DisablePlugin(string[] args)
|
||||
{
|
||||
Addin[] addins = GetSortedAddinList("RobustPlugin");
|
||||
|
||||
int n = Convert.ToInt16(args[2]);
|
||||
if (n > (addins.Length -1))
|
||||
{
|
||||
MainConsole.Instance.Output("Selection out of range");
|
||||
return;
|
||||
}
|
||||
|
||||
Addin addin = addins[n];
|
||||
AddinManager.Registry.DisableAddin(addin.Id);
|
||||
addin.Enabled = false;
|
||||
return;
|
||||
}
|
||||
|
||||
// Enable plugin
|
||||
/// <summary>
|
||||
/// Enables the plugin.
|
||||
/// </summary>
|
||||
/// <param name='args'>
|
||||
/// Arguments.
|
||||
/// </param>
|
||||
public void EnablePlugin(string[] args)
|
||||
{
|
||||
Addin[] addins = GetSortedAddinList("RobustPlugin");
|
||||
|
||||
int n = Convert.ToInt16(args[2]);
|
||||
if (n > (addins.Length -1))
|
||||
{
|
||||
MainConsole.Instance.Output("Selection out of range");
|
||||
return;
|
||||
}
|
||||
|
||||
Addin addin = addins[n];
|
||||
|
||||
addin.Enabled = true;
|
||||
AddinManager.Registry.EnableAddin(addin.Id);
|
||||
// AddinManager.Registry.Update();
|
||||
if(PluginRegistry.IsAddinEnabled(addin.Id))
|
||||
{
|
||||
ConsoleProgressStatus ps = new ConsoleProgressStatus(false);
|
||||
if (!AddinManager.AddinEngine.IsAddinLoaded(addin.Id))
|
||||
{
|
||||
MainConsole.Instance.Output("Ignore the following error...");
|
||||
AddinManager.Registry.Rebuild(ps);
|
||||
AddinManager.AddinEngine.LoadAddin(ps, addin.Id);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
MainConsole.Instance.OutputFormat("Not Enabled in this domain {0}", addin.Name);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#region Util
|
||||
private void Testing()
|
||||
{
|
||||
Addin[] list = Registry.GetAddins();
|
||||
|
||||
var addins = list.Where( a => a.Description.Category == "RobustPlugin");
|
||||
|
||||
foreach (Addin addin in addins)
|
||||
{
|
||||
MainConsole.Instance.OutputFormat("Addin {0}", addin.Name);
|
||||
}
|
||||
}
|
||||
|
||||
// These will let us deal with numbered lists instead
|
||||
// of needing to type in the full ids
|
||||
private AddinRepositoryEntry[] GetSortedAvailbleAddins()
|
||||
{
|
||||
ArrayList list = new ArrayList();
|
||||
list.AddRange(Repositories.GetAvailableAddins());
|
||||
|
||||
AddinRepositoryEntry[] addins = list.ToArray(typeof(AddinRepositoryEntry)) as AddinRepositoryEntry[];
|
||||
|
||||
Array.Sort(addins,(r1,r2) => r1.Addin.Id.CompareTo(r2.Addin.Id));
|
||||
|
||||
return addins;
|
||||
}
|
||||
|
||||
private AddinRepository[] GetSortedAddinRepo()
|
||||
{
|
||||
ArrayList list = new ArrayList();
|
||||
list.AddRange(Repositories.GetRepositories());
|
||||
|
||||
AddinRepository[] repos = list.ToArray(typeof(AddinRepository)) as AddinRepository[];
|
||||
Array.Sort (repos,(r1,r2) => r1.Name.CompareTo(r2.Name));
|
||||
|
||||
return repos;
|
||||
}
|
||||
|
||||
private Addin[] GetSortedAddinList(string category)
|
||||
{
|
||||
|
||||
ArrayList xlist = new ArrayList();
|
||||
ArrayList list = new ArrayList();
|
||||
try
|
||||
{
|
||||
list.AddRange(PluginRegistry.GetAddins());
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
Addin[] x = xlist.ToArray(typeof(Addin)) as Addin[];
|
||||
return x;
|
||||
}
|
||||
|
||||
foreach (Addin addin in list)
|
||||
{
|
||||
if (addin.Description.Category == category)
|
||||
xlist.Add(addin);
|
||||
}
|
||||
|
||||
Addin[] addins = xlist.ToArray(typeof(Addin)) as Addin[];
|
||||
Array.Sort(addins,(r1,r2) => r1.Id.CompareTo(r2.Id));
|
||||
|
||||
return addins;
|
||||
}
|
||||
#endregion Util
|
||||
}
|
||||
}
|
||||
@@ -1,53 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) Contributors, http://opensimulator.org/
|
||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of the OpenSimulator Project nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
using System;
|
||||
|
||||
namespace OpenSim.Framework
|
||||
{
|
||||
/// <summary>
|
||||
/// Region flags used internally by OpenSimulator to store installation specific information about regions.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Don't confuse with OpenMetaverse.RegionFlags which are client facing flags (i.e. they go over the wire).
|
||||
/// Returned by IGridService.GetRegionFlags()
|
||||
/// </remarks>
|
||||
[Flags]
|
||||
public enum RegionFlags : int
|
||||
{
|
||||
DefaultRegion = 1, // Used for new Rez. Random if multiple defined
|
||||
FallbackRegion = 2, // Regions we redirect to when the destination is down
|
||||
RegionOnline = 4, // Set when a region comes online, unset when it unregisters and DeleteOnUnregister is false
|
||||
NoDirectLogin = 8, // Region unavailable for direct logins (by name)
|
||||
Persistent = 16, // Don't remove on unregister
|
||||
LockedOut = 32, // Don't allow registration
|
||||
NoMove = 64, // Don't allow moving this region
|
||||
Reservation = 128, // This is an inactive reservation
|
||||
Authenticate = 256, // Require authentication
|
||||
Hyperlink = 512 // Record represents a HG link
|
||||
}
|
||||
}
|
||||
@@ -120,13 +120,10 @@ namespace OpenSim.Framework
|
||||
public UUID lastMapUUID = UUID.Zero;
|
||||
public string lastMapRefresh = "0";
|
||||
|
||||
private float m_nonphysPrimMin = 0;
|
||||
private int m_nonphysPrimMax = 0;
|
||||
private float m_physPrimMin = 0;
|
||||
private int m_physPrimMax = 0;
|
||||
private bool m_clampPrimSize = false;
|
||||
private int m_objectCapacity = 0;
|
||||
private int m_linksetCapacity = 0;
|
||||
private int m_agentCapacity = 0;
|
||||
private string m_regionType = String.Empty;
|
||||
private RegionLightShareData m_windlight = new RegionLightShareData();
|
||||
@@ -288,21 +285,11 @@ namespace OpenSim.Framework
|
||||
set { m_windlight = value; }
|
||||
}
|
||||
|
||||
public float NonphysPrimMin
|
||||
{
|
||||
get { return m_nonphysPrimMin; }
|
||||
}
|
||||
|
||||
public int NonphysPrimMax
|
||||
{
|
||||
get { return m_nonphysPrimMax; }
|
||||
}
|
||||
|
||||
public float PhysPrimMin
|
||||
{
|
||||
get { return m_physPrimMin; }
|
||||
}
|
||||
|
||||
public int PhysPrimMax
|
||||
{
|
||||
get { return m_physPrimMax; }
|
||||
@@ -318,11 +305,6 @@ namespace OpenSim.Framework
|
||||
get { return m_objectCapacity; }
|
||||
}
|
||||
|
||||
public int LinksetCapacity
|
||||
{
|
||||
get { return m_linksetCapacity; }
|
||||
}
|
||||
|
||||
public int AgentCapacity
|
||||
{
|
||||
get { return m_agentCapacity; }
|
||||
@@ -641,31 +623,16 @@ namespace OpenSim.Framework
|
||||
m_regionType = config.GetString("RegionType", String.Empty);
|
||||
allKeys.Remove("RegionType");
|
||||
|
||||
#region Prim stuff
|
||||
|
||||
m_nonphysPrimMin = config.GetFloat("NonPhysicalPrimMin", 0);
|
||||
allKeys.Remove("NonPhysicalPrimMin");
|
||||
|
||||
m_nonphysPrimMax = config.GetInt("NonPhysicalPrimMax", 0);
|
||||
allKeys.Remove("NonPhysicalPrimMax");
|
||||
|
||||
m_physPrimMin = config.GetFloat("PhysicalPrimMin", 0);
|
||||
allKeys.Remove("PhysicalPrimMin");
|
||||
|
||||
// Prim stuff
|
||||
//
|
||||
m_nonphysPrimMax = config.GetInt("NonphysicalPrimMax", 0);
|
||||
allKeys.Remove("NonphysicalPrimMax");
|
||||
m_physPrimMax = config.GetInt("PhysicalPrimMax", 0);
|
||||
allKeys.Remove("PhysicalPrimMax");
|
||||
|
||||
m_clampPrimSize = config.GetBoolean("ClampPrimSize", false);
|
||||
allKeys.Remove("ClampPrimSize");
|
||||
|
||||
m_objectCapacity = config.GetInt("MaxPrims", 15000);
|
||||
allKeys.Remove("MaxPrims");
|
||||
|
||||
m_linksetCapacity = config.GetInt("LinksetPrims", 0);
|
||||
allKeys.Remove("LinksetPrims");
|
||||
|
||||
#endregion
|
||||
|
||||
m_agentCapacity = config.GetInt("MaxAgents", 100);
|
||||
allKeys.Remove("MaxAgents");
|
||||
|
||||
@@ -701,27 +668,16 @@ namespace OpenSim.Framework
|
||||
|
||||
config.Set("ExternalHostName", m_externalHostName);
|
||||
|
||||
if (m_nonphysPrimMin > 0)
|
||||
config.Set("NonphysicalPrimMax", m_nonphysPrimMin);
|
||||
|
||||
if (m_nonphysPrimMax > 0)
|
||||
if (m_nonphysPrimMax != 0)
|
||||
config.Set("NonphysicalPrimMax", m_nonphysPrimMax);
|
||||
|
||||
if (m_physPrimMin > 0)
|
||||
config.Set("PhysicalPrimMax", m_physPrimMin);
|
||||
|
||||
if (m_physPrimMax > 0)
|
||||
if (m_physPrimMax != 0)
|
||||
config.Set("PhysicalPrimMax", m_physPrimMax);
|
||||
|
||||
config.Set("ClampPrimSize", m_clampPrimSize.ToString());
|
||||
|
||||
if (m_objectCapacity > 0)
|
||||
if (m_objectCapacity != 0)
|
||||
config.Set("MaxPrims", m_objectCapacity);
|
||||
|
||||
if (m_linksetCapacity > 0)
|
||||
config.Set("LinksetPrims", m_linksetCapacity);
|
||||
|
||||
if (m_agentCapacity > 0)
|
||||
if (m_agentCapacity != 0)
|
||||
config.Set("MaxAgents", m_agentCapacity);
|
||||
|
||||
if (ScopeID != UUID.Zero)
|
||||
@@ -798,15 +754,9 @@ namespace OpenSim.Framework
|
||||
configMember.addConfigurationOption("lastmap_refresh", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
|
||||
"Last Map Refresh", Util.UnixTimeSinceEpoch().ToString(), true);
|
||||
|
||||
configMember.addConfigurationOption("nonphysical_prim_min", ConfigurationOption.ConfigurationTypes.TYPE_FLOAT,
|
||||
"Minimum size for nonphysical prims", m_nonphysPrimMin.ToString(), true);
|
||||
|
||||
configMember.addConfigurationOption("nonphysical_prim_max", ConfigurationOption.ConfigurationTypes.TYPE_INT32,
|
||||
"Maximum size for nonphysical prims", m_nonphysPrimMax.ToString(), true);
|
||||
|
||||
configMember.addConfigurationOption("physical_prim_min", ConfigurationOption.ConfigurationTypes.TYPE_FLOAT,
|
||||
"Minimum size for nonphysical prims", m_physPrimMin.ToString(), true);
|
||||
|
||||
configMember.addConfigurationOption("physical_prim_max", ConfigurationOption.ConfigurationTypes.TYPE_INT32,
|
||||
"Maximum size for physical prims", m_physPrimMax.ToString(), true);
|
||||
|
||||
@@ -816,9 +766,6 @@ namespace OpenSim.Framework
|
||||
configMember.addConfigurationOption("object_capacity", ConfigurationOption.ConfigurationTypes.TYPE_INT32,
|
||||
"Max objects this sim will hold", m_objectCapacity.ToString(), true);
|
||||
|
||||
configMember.addConfigurationOption("linkset_capacity", ConfigurationOption.ConfigurationTypes.TYPE_INT32,
|
||||
"Max prims an object will hold", m_linksetCapacity.ToString(), true);
|
||||
|
||||
configMember.addConfigurationOption("agent_capacity", ConfigurationOption.ConfigurationTypes.TYPE_INT32,
|
||||
"Max avatars this sim will hold", m_agentCapacity.ToString(), true);
|
||||
|
||||
@@ -937,9 +884,6 @@ namespace OpenSim.Framework
|
||||
case "object_capacity":
|
||||
m_objectCapacity = (int)configuration_result;
|
||||
break;
|
||||
case "linkset_capacity":
|
||||
m_linksetCapacity = (int)configuration_result;
|
||||
break;
|
||||
case "agent_capacity":
|
||||
m_agentCapacity = (int)configuration_result;
|
||||
break;
|
||||
@@ -1070,4 +1014,4 @@ namespace OpenSim.Framework
|
||||
return kvp;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("OpenSim.Framework.RegionLoader.Filesystem")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("http://opensimulator.org")]
|
||||
[assembly: AssemblyProduct("OpenSim")]
|
||||
[assembly: AssemblyCopyright("OpenSimulator developers")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("4ab5c74b-e886-40a1-b67d-a04df285e706")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
[assembly: AssemblyVersion("0.7.5.*")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
@@ -1,33 +0,0 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("OpenSim.Framework.RegionLoader.Web")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("http://opensimulator.org")]
|
||||
[assembly: AssemblyProduct("OpenSim")]
|
||||
[assembly: AssemblyCopyright("OpenSimulator developers")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("985afff8-e7ed-4056-acce-39abf7a43d33")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
[assembly: AssemblyVersion("0.7.5.*")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
@@ -52,11 +52,6 @@ namespace OpenSim.Framework.Serialization
|
||||
/// </value>
|
||||
public const string INVENTORY_PATH = "inventory/";
|
||||
|
||||
/// <value>
|
||||
/// Path for regions in a multi-region archive
|
||||
/// </value>
|
||||
public const string REGIONS_PATH = "regions/";
|
||||
|
||||
/// <value>
|
||||
/// Path for the prims file
|
||||
/// </value>
|
||||
@@ -154,11 +149,6 @@ namespace OpenSim.Framework.Serialization
|
||||
EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "trashfolder.txt"] = (sbyte)AssetType.TrashFolder;
|
||||
}
|
||||
|
||||
public static string CreateOarLandDataPath(LandData ld)
|
||||
{
|
||||
return string.Format("{0}{1}.xml", ArchiveConstants.LANDDATA_PATH, ld.GlobalID);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create the filename used to store an object in an OpenSim Archive.
|
||||
/// </summary>
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("OpenSim.Framework.Serialization")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("http://opensimulator.org")]
|
||||
[assembly: AssemblyProduct("OpenSim")]
|
||||
[assembly: AssemblyCopyright("OpenSimulator developers")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("919db41e-4ac0-4f24-9992-81d62c0ee183")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
[assembly: AssemblyVersion("0.7.5.*")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
@@ -630,11 +630,11 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
m_log.Error(String.Format("[BASE HTTP SERVER]: HandleRequest() threw {0} ", e.StackTrace), e);
|
||||
m_log.Error(String.Format("[BASE HTTP SERVER]: HandleRequest() threw {0} ", e.Message), e);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.Error(String.Format("[BASE HTTP SERVER]: HandleRequest() threw {0} ", e.StackTrace), e);
|
||||
m_log.Error(String.Format("[BASE HTTP SERVER]: HandleRequest() threw {0} ", e.Message), e);
|
||||
SendHTML500(response);
|
||||
}
|
||||
finally
|
||||
@@ -642,7 +642,7 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||
// Every month or so this will wrap and give bad numbers, not really a problem
|
||||
// since its just for reporting
|
||||
int tickdiff = requestEndTick - requestStartTick;
|
||||
if (tickdiff > 3000 && requestHandler != null && requestHandler.Name != "GetTexture")
|
||||
if (tickdiff > 3000)
|
||||
{
|
||||
m_log.InfoFormat(
|
||||
"[BASE HTTP SERVER]: Slow handling of {0} {1} {2} {3} {4} from {5} took {6}ms",
|
||||
@@ -1623,7 +1623,6 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||
|
||||
// Long Poll Service Manager with 3 worker threads a 25 second timeout for no events
|
||||
m_PollServiceManager = new PollServiceRequestManager(this, 3, 25000);
|
||||
m_PollServiceManager.Start();
|
||||
HTTPDRunning = true;
|
||||
|
||||
//HttpListenerContext context;
|
||||
@@ -1674,8 +1673,6 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||
HTTPDRunning = false;
|
||||
try
|
||||
{
|
||||
m_PollServiceManager.Stop();
|
||||
|
||||
m_httpListener2.ExceptionThrown -= httpServerException;
|
||||
//m_httpListener2.DisconnectHandler = null;
|
||||
|
||||
|
||||
@@ -45,26 +45,19 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||
private uint m_WorkerThreadCount = 0;
|
||||
private Thread[] m_workerThreads;
|
||||
private PollServiceWorkerThread[] m_PollServiceWorkerThreads;
|
||||
private volatile bool m_running = true;
|
||||
private int m_pollTimeout;
|
||||
private bool m_running = true;
|
||||
|
||||
public PollServiceRequestManager(BaseHttpServer pSrv, uint pWorkerThreadCount, int pTimeout)
|
||||
{
|
||||
m_server = pSrv;
|
||||
m_WorkerThreadCount = pWorkerThreadCount;
|
||||
m_pollTimeout = pTimeout;
|
||||
}
|
||||
|
||||
public void Start()
|
||||
{
|
||||
m_running = true;
|
||||
m_workerThreads = new Thread[m_WorkerThreadCount];
|
||||
m_PollServiceWorkerThreads = new PollServiceWorkerThread[m_WorkerThreadCount];
|
||||
|
||||
//startup worker threads
|
||||
for (uint i = 0; i < m_WorkerThreadCount; i++)
|
||||
{
|
||||
m_PollServiceWorkerThreads[i] = new PollServiceWorkerThread(m_server, m_pollTimeout);
|
||||
m_PollServiceWorkerThreads[i] = new PollServiceWorkerThread(m_server, pTimeout);
|
||||
m_PollServiceWorkerThreads[i].ReQueue += ReQueueEvent;
|
||||
|
||||
m_workerThreads[i]
|
||||
@@ -143,10 +136,8 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||
|
||||
}
|
||||
|
||||
public void Stop()
|
||||
~PollServiceRequestManager()
|
||||
{
|
||||
m_running = false;
|
||||
|
||||
foreach (object o in m_requests)
|
||||
{
|
||||
PollServiceHttpRequest req = (PollServiceHttpRequest) o;
|
||||
@@ -160,6 +151,8 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||
{
|
||||
t.Abort();
|
||||
}
|
||||
|
||||
m_running = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("OpenSim.Framework.Servers.HttpServer")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("http://opensimulator.org")]
|
||||
[assembly: AssemblyProduct("OpenSim")]
|
||||
[assembly: AssemblyCopyright("OpenSimulator developers")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("c4ea5baa-81c4-4867-a645-1ec360c1f164")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
[assembly: AssemblyVersion("0.7.5.*")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
@@ -1,33 +0,0 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("OpenSim.Framework.Servers")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("http://opensimulator.org")]
|
||||
[assembly: AssemblyProduct("OpenSim")]
|
||||
[assembly: AssemblyCopyright("OpenSimulator developers")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("b48e8b3e-5c5c-4673-b31f-21e13b8e568b")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
[assembly: AssemblyVersion("0.7.5.*")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
@@ -29,8 +29,8 @@ namespace OpenSim
|
||||
{
|
||||
public class VersionInfo
|
||||
{
|
||||
private const string VERSION_NUMBER = "0.7.5";
|
||||
private const Flavour VERSION_FLAVOUR = Flavour.Post_Fixes;
|
||||
private const string VERSION_NUMBER = "0.7.4";
|
||||
private const Flavour VERSION_FLAVOUR = Flavour.Extended;
|
||||
|
||||
public enum Flavour
|
||||
{
|
||||
|
||||
@@ -47,9 +47,6 @@ namespace OpenSim.Framework
|
||||
Texture = 5,
|
||||
/// <summary>Non-texture assets</summary>
|
||||
Asset = 6,
|
||||
/// <summary>Avatar and primitive data</summary>
|
||||
/// <remarks>This is a sub-category of Task</remarks>
|
||||
State = 7,
|
||||
}
|
||||
|
||||
[Flags]
|
||||
@@ -61,6 +58,5 @@ namespace OpenSim.Framework
|
||||
Task = 1 << 3,
|
||||
Texture = 1 << 4,
|
||||
Asset = 1 << 5,
|
||||
State = 1 << 6,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,6 +45,7 @@ using System.Text.RegularExpressions;
|
||||
using System.Xml;
|
||||
using System.Threading;
|
||||
using log4net;
|
||||
using log4net.Appender;
|
||||
using Nini.Config;
|
||||
using Nwc.XmlRpc;
|
||||
using OpenMetaverse;
|
||||
@@ -299,25 +300,6 @@ namespace OpenSim.Framework
|
||||
x;
|
||||
}
|
||||
|
||||
// Clamp the maximum magnitude of a vector
|
||||
public static Vector3 ClampV(Vector3 x, float max)
|
||||
{
|
||||
Vector3 ret = x;
|
||||
float lenSq = x.LengthSquared();
|
||||
if (lenSq > (max * max))
|
||||
{
|
||||
x = x / x.Length() * max;
|
||||
}
|
||||
return x;
|
||||
}
|
||||
|
||||
// Inclusive, within range test (true if equal to the endpoints)
|
||||
public static bool InRange<T>(T x, T min, T max)
|
||||
where T : IComparable<T>
|
||||
{
|
||||
return x.CompareTo(max) <= 0 && x.CompareTo(min) >= 0;
|
||||
}
|
||||
|
||||
public static uint GetNextXferID()
|
||||
{
|
||||
uint id = 0;
|
||||
@@ -816,9 +798,22 @@ namespace OpenSim.Framework
|
||||
return ".";
|
||||
}
|
||||
|
||||
public static string logFile()
|
||||
{
|
||||
foreach (IAppender appender in LogManager.GetRepository().GetAppenders())
|
||||
{
|
||||
if (appender is FileAppender)
|
||||
{
|
||||
return ((FileAppender)appender).File;
|
||||
}
|
||||
}
|
||||
|
||||
return "./OpenSim.log";
|
||||
}
|
||||
|
||||
public static string logDir()
|
||||
{
|
||||
return ".";
|
||||
return Path.GetDirectoryName(logFile());
|
||||
}
|
||||
|
||||
// From: http://coercedcode.blogspot.com/2008/03/c-generate-unique-filenames-within.html
|
||||
@@ -1879,12 +1874,6 @@ namespace OpenSim.Framework
|
||||
/// Prints the call stack at any given point. Useful for debugging.
|
||||
/// </summary>
|
||||
public static void PrintCallStack()
|
||||
{
|
||||
PrintCallStack(m_log.DebugFormat);
|
||||
}
|
||||
|
||||
public delegate void DebugPrinter(string msg, params Object[] parm);
|
||||
public static void PrintCallStack(DebugPrinter printer)
|
||||
{
|
||||
StackTrace stackTrace = new StackTrace(true); // get call stack
|
||||
StackFrame[] stackFrames = stackTrace.GetFrames(); // get method calls (frames)
|
||||
@@ -1893,7 +1882,7 @@ namespace OpenSim.Framework
|
||||
foreach (StackFrame stackFrame in stackFrames)
|
||||
{
|
||||
MethodBase mb = stackFrame.GetMethod();
|
||||
printer("{0}.{1}:{2}", mb.DeclaringType, mb.Name, stackFrame.GetFileLineNumber()); // write method name
|
||||
m_log.DebugFormat("{0}.{1}:{2}", mb.DeclaringType, mb.Name, stackFrame.GetFileLineNumber()); // write method name
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -716,13 +716,6 @@ namespace OpenSim.Framework
|
||||
//
|
||||
public static void MakeRequest<TRequest, TResponse>(string verb,
|
||||
string requestUrl, TRequest obj, Action<TResponse> action)
|
||||
{
|
||||
MakeRequest<TRequest, TResponse>(verb, requestUrl, obj, action, 0);
|
||||
}
|
||||
|
||||
public static void MakeRequest<TRequest, TResponse>(string verb,
|
||||
string requestUrl, TRequest obj, Action<TResponse> action,
|
||||
int maxConnections)
|
||||
{
|
||||
int reqnum = WebUtil.RequestNumber++;
|
||||
|
||||
@@ -737,10 +730,6 @@ namespace OpenSim.Framework
|
||||
Type type = typeof(TRequest);
|
||||
|
||||
WebRequest request = WebRequest.Create(requestUrl);
|
||||
HttpWebRequest ht = (HttpWebRequest)request;
|
||||
if (maxConnections > 0 && ht.ServicePoint.ConnectionLimit < maxConnections)
|
||||
ht.ServicePoint.ConnectionLimit = maxConnections;
|
||||
|
||||
WebResponse response = null;
|
||||
TResponse deserial = default(TResponse);
|
||||
XmlSerializer deserializer = new XmlSerializer(typeof(TResponse));
|
||||
@@ -1046,16 +1035,6 @@ namespace OpenSim.Framework
|
||||
/// <exception cref="System.Net.WebException">Thrown if we encounter a network issue while posting
|
||||
/// the request. You'll want to make sure you deal with this as they're not uncommon</exception>
|
||||
public static TResponse MakeRequest<TRequest, TResponse>(string verb, string requestUrl, TRequest obj)
|
||||
{
|
||||
return MakeRequest<TRequest, TResponse>(verb, requestUrl, obj, 0);
|
||||
}
|
||||
|
||||
public static TResponse MakeRequest<TRequest, TResponse>(string verb, string requestUrl, TRequest obj, int pTimeout)
|
||||
{
|
||||
return MakeRequest<TRequest, TResponse>(verb, requestUrl, obj, pTimeout, 0);
|
||||
}
|
||||
|
||||
public static TResponse MakeRequest<TRequest, TResponse>(string verb, string requestUrl, TRequest obj, int pTimeout, int maxConnections)
|
||||
{
|
||||
int reqnum = WebUtil.RequestNumber++;
|
||||
|
||||
@@ -1071,10 +1050,6 @@ namespace OpenSim.Framework
|
||||
TResponse deserial = default(TResponse);
|
||||
|
||||
WebRequest request = WebRequest.Create(requestUrl);
|
||||
HttpWebRequest ht = (HttpWebRequest)request;
|
||||
if (maxConnections > 0 && ht.ServicePoint.ConnectionLimit < maxConnections)
|
||||
ht.ServicePoint.ConnectionLimit = maxConnections;
|
||||
|
||||
request.Method = verb;
|
||||
MemoryStream buffer = null;
|
||||
|
||||
@@ -1197,4 +1172,4 @@ namespace OpenSim.Framework
|
||||
return deserial;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -27,7 +27,6 @@
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Reflection;
|
||||
using log4net;
|
||||
using log4net.Config;
|
||||
@@ -74,7 +73,6 @@ namespace OpenSim
|
||||
AppDomain.CurrentDomain.UnhandledException +=
|
||||
new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
|
||||
|
||||
ServicePointManager.DefaultConnectionLimit = 12;
|
||||
|
||||
// Add the arguments supplied when running the application to the configuration
|
||||
ArgvConfigSource configSource = new ArgvConfigSource(args);
|
||||
|
||||
@@ -271,7 +271,7 @@ namespace OpenSim
|
||||
|
||||
m_console.Commands.AddCommand("Archiving", false, "save oar",
|
||||
//"save oar [-v|--version=<N>] [-p|--profile=<url>] [<OAR path>]",
|
||||
"save oar [-h|--home=<url>] [--noassets] [--publish] [--perm=<permissions>] [--all] [<OAR path>]",
|
||||
"save oar [-h|--home=<url>] [--noassets] [--publish] [--perm=<permissions>] [<OAR path>]",
|
||||
"Save a region's data to an OAR archive.",
|
||||
// "-v|--version=<N> generates scene objects as per older versions of the serialization (e.g. -v=0)" + Environment.NewLine
|
||||
"-h|--home=<url> adds the url of the profile service to the saved user information.\n"
|
||||
@@ -281,7 +281,6 @@ namespace OpenSim
|
||||
+ " this is useful if you're making oars generally available that might be reloaded to the same grid from which you published\n"
|
||||
+ "--perm=<permissions> stops objects with insufficient permissions from being saved to the OAR.\n"
|
||||
+ " <permissions> can contain one or more of these characters: \"C\" = Copy, \"T\" = Transfer\n"
|
||||
+ "--all saves all the regions in the simulator, instead of just the current region.\n"
|
||||
+ "The OAR path must be a filesystem path."
|
||||
+ " If this is not given then the oar is saved to region.oar in the current directory.",
|
||||
SaveOar);
|
||||
@@ -376,7 +375,6 @@ namespace OpenSim
|
||||
{
|
||||
RunCommandScript(m_shutdownCommandsFile);
|
||||
}
|
||||
|
||||
base.ShutdownSpecific();
|
||||
}
|
||||
|
||||
@@ -579,13 +577,33 @@ namespace OpenSim
|
||||
switch (cmdparams[0].ToLower())
|
||||
{
|
||||
case "list":
|
||||
//TODO: Convert to new region modules
|
||||
foreach (IRegionModule irm in m_moduleLoader.GetLoadedSharedModules)
|
||||
{
|
||||
MainConsole.Instance.Output(String.Format("Shared region module: {0}", irm.Name));
|
||||
}
|
||||
break;
|
||||
case "unload":
|
||||
//TODO: Convert to new region modules
|
||||
if (cmdparams.Length > 1)
|
||||
{
|
||||
foreach (IRegionModule rm in new ArrayList(m_moduleLoader.GetLoadedSharedModules))
|
||||
{
|
||||
if (rm.Name.ToLower() == cmdparams[1].ToLower())
|
||||
{
|
||||
MainConsole.Instance.Output(String.Format("Unloading module: {0}", rm.Name));
|
||||
m_moduleLoader.UnloadModule(rm);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case "load":
|
||||
//TODO: Convert to new region modules
|
||||
if (cmdparams.Length > 1)
|
||||
{
|
||||
foreach (Scene s in new ArrayList(SceneManager.Scenes))
|
||||
{
|
||||
MainConsole.Instance.Output(String.Format("Loading module: {0}", cmdparams[1]));
|
||||
m_moduleLoader.LoadRegionModules(cmdparams[1], s);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -808,9 +826,28 @@ namespace OpenSim
|
||||
break;
|
||||
|
||||
case "modules":
|
||||
MainConsole.Instance.Output("The currently loaded shared modules are:");
|
||||
foreach (IRegionModule module in m_moduleLoader.GetLoadedSharedModules)
|
||||
{
|
||||
MainConsole.Instance.Output("Shared Module: " + module.Name);
|
||||
}
|
||||
|
||||
SceneManager.ForEachScene(
|
||||
delegate(Scene scene) {
|
||||
MainConsole.Instance.Output("Loaded region modules in" + scene.RegionInfo.RegionName + " are:");
|
||||
m_log.Error("The currently loaded modules in " + scene.RegionInfo.RegionName + " are:");
|
||||
foreach (IRegionModule module in scene.Modules.Values)
|
||||
{
|
||||
if (!module.IsSharedModule)
|
||||
{
|
||||
m_log.Error("Region Module: " + module.Name);
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
SceneManager.ForEachScene(
|
||||
delegate(Scene scene) {
|
||||
MainConsole.Instance.Output("Loaded new region modules in" + scene.RegionInfo.RegionName + " are:");
|
||||
foreach (IRegionModuleBase module in scene.RegionModules.Values)
|
||||
{
|
||||
Type type = module.GetType().GetInterface("ISharedRegionModule");
|
||||
|
||||
@@ -121,6 +121,14 @@ namespace OpenSim
|
||||
get { return m_httpServerPort; }
|
||||
}
|
||||
|
||||
public ModuleLoader ModuleLoader
|
||||
{
|
||||
get { return m_moduleLoader; }
|
||||
set { m_moduleLoader = value; }
|
||||
}
|
||||
|
||||
protected ModuleLoader m_moduleLoader;
|
||||
|
||||
protected IRegistryCore m_applicationRegistry = new RegistryCore();
|
||||
|
||||
public IRegistryCore ApplicationRegistry
|
||||
@@ -224,6 +232,9 @@ namespace OpenSim
|
||||
|
||||
base.StartupSpecific();
|
||||
|
||||
// Create a ModuleLoader instance
|
||||
m_moduleLoader = new ModuleLoader(Config);
|
||||
|
||||
LoadPlugins();
|
||||
foreach (IApplicationPlugin plugin in m_plugins)
|
||||
{
|
||||
@@ -368,6 +379,12 @@ namespace OpenSim
|
||||
|
||||
m_log.Info("[MODULES]: Loading Region's modules (old style)");
|
||||
|
||||
List<IRegionModule> modules = m_moduleLoader.PickupModules(scene, ".");
|
||||
|
||||
// This needs to be ahead of the script engine load, so the
|
||||
// script module can pick up events exposed by a module
|
||||
m_moduleLoader.InitialiseSharedModules(scene);
|
||||
|
||||
// Use this in the future, the line above will be deprecated soon
|
||||
m_log.Info("[REGIONMODULES]: Loading Region's modules (new style)");
|
||||
IRegionModulesController controller;
|
||||
@@ -418,6 +435,13 @@ namespace OpenSim
|
||||
clientServer.Start();
|
||||
}
|
||||
|
||||
if (do_post_init)
|
||||
{
|
||||
foreach (IRegionModule module in modules)
|
||||
{
|
||||
module.PostInitialise();
|
||||
}
|
||||
}
|
||||
scene.EventManager.OnShutdown += delegate() { ShutdownRegion(scene); };
|
||||
|
||||
mscene = scene;
|
||||
@@ -707,7 +731,7 @@ namespace OpenSim
|
||||
|
||||
return new Scene(
|
||||
regionInfo, circuitManager, sceneGridService,
|
||||
simDataService, estateDataService, false,
|
||||
simDataService, estateDataService, m_moduleLoader, false,
|
||||
Config, m_version);
|
||||
}
|
||||
|
||||
@@ -1082,4 +1106,4 @@ namespace OpenSim
|
||||
{
|
||||
public IConfigSource Source;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ using Caps = OpenSim.Framework.Capabilities.Caps;
|
||||
namespace OpenSim.Region.ClientStack.Linden
|
||||
{
|
||||
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "BunchOfCapsModule")]
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||
public class BunchOfCapsModule : INonSharedRegionModule
|
||||
{
|
||||
// private static readonly ILog m_log =
|
||||
|
||||
@@ -55,8 +55,8 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
public OSDMap body;
|
||||
}
|
||||
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "EventQueueGetModule")]
|
||||
public class EventQueueGetModule : IEventQueue, INonSharedRegionModule
|
||||
//[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||
public class EventQueueGetModule : IEventQueue, IRegionModule
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
@@ -66,6 +66,8 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
public int DebugLevel { get; set; }
|
||||
|
||||
protected Scene m_scene;
|
||||
private IConfigSource m_gConfig;
|
||||
bool enabledYN;
|
||||
|
||||
private Dictionary<UUID, int> m_ids = new Dictionary<UUID, int>();
|
||||
|
||||
@@ -73,46 +75,60 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
private Dictionary<UUID, UUID> m_QueueUUIDAvatarMapping = new Dictionary<UUID, UUID>();
|
||||
private Dictionary<UUID, UUID> m_AvatarQueueUUIDMapping = new Dictionary<UUID, UUID>();
|
||||
|
||||
#region INonSharedRegionModule methods
|
||||
public virtual void Initialise(IConfigSource config)
|
||||
#region IRegionModule methods
|
||||
public virtual void Initialise(Scene scene, IConfigSource config)
|
||||
{
|
||||
m_gConfig = config;
|
||||
|
||||
IConfig startupConfig = m_gConfig.Configs["Startup"];
|
||||
|
||||
ReadConfigAndPopulate(scene, startupConfig, "Startup");
|
||||
|
||||
if (enabledYN)
|
||||
{
|
||||
m_scene = scene;
|
||||
scene.RegisterModuleInterface<IEventQueue>(this);
|
||||
|
||||
// Register fallback handler
|
||||
// Why does EQG Fail on region crossings!
|
||||
|
||||
//scene.CommsManager.HttpServer.AddLLSDHandler("/CAPS/EQG/", EventQueueFallBack);
|
||||
|
||||
// scene.EventManager.OnNewClient += OnNewClient;
|
||||
|
||||
// TODO: Leaving these open, or closing them when we
|
||||
// become a child is incorrect. It messes up TP in a big
|
||||
// way. CAPS/EQ need to be active as long as the UDP
|
||||
// circuit is there.
|
||||
|
||||
scene.EventManager.OnClientClosed += ClientClosed;
|
||||
|
||||
scene.EventManager.OnMakeChildAgent += MakeChildAgent;
|
||||
scene.EventManager.OnRegisterCaps += OnRegisterCaps;
|
||||
|
||||
MainConsole.Instance.Commands.AddCommand(
|
||||
"Debug",
|
||||
false,
|
||||
"debug eq",
|
||||
"debug eq [0|1|2]",
|
||||
"Turn on event queue debugging\n"
|
||||
+ " <= 0 - turns off all event queue logging\n"
|
||||
+ " >= 1 - turns on outgoing event logging\n"
|
||||
+ " >= 2 - turns on poll notification",
|
||||
HandleDebugEq);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_gConfig = null;
|
||||
}
|
||||
}
|
||||
|
||||
public void AddRegion(Scene scene)
|
||||
private void ReadConfigAndPopulate(Scene scene, IConfig startupConfig, string p)
|
||||
{
|
||||
m_scene = scene;
|
||||
scene.RegisterModuleInterface<IEventQueue>(this);
|
||||
|
||||
scene.EventManager.OnClientClosed += ClientClosed;
|
||||
scene.EventManager.OnMakeChildAgent += MakeChildAgent;
|
||||
scene.EventManager.OnRegisterCaps += OnRegisterCaps;
|
||||
|
||||
MainConsole.Instance.Commands.AddCommand(
|
||||
"Debug",
|
||||
false,
|
||||
"debug eq",
|
||||
"debug eq [0|1|2]",
|
||||
"Turn on event queue debugging\n"
|
||||
+ " <= 0 - turns off all event queue logging\n"
|
||||
+ " >= 1 - turns on outgoing event logging\n"
|
||||
+ " >= 2 - turns on poll notification",
|
||||
HandleDebugEq);
|
||||
enabledYN = startupConfig.GetBoolean("EventQueue", true);
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene scene)
|
||||
{
|
||||
if (m_scene != scene)
|
||||
return;
|
||||
|
||||
scene.EventManager.OnClientClosed -= ClientClosed;
|
||||
scene.EventManager.OnMakeChildAgent -= MakeChildAgent;
|
||||
scene.EventManager.OnRegisterCaps -= OnRegisterCaps;
|
||||
|
||||
scene.UnregisterModuleInterface<IEventQueue>(this);
|
||||
m_scene = null;
|
||||
}
|
||||
|
||||
public void RegionLoaded(Scene scene)
|
||||
public void PostInitialise()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -125,11 +141,10 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
get { return "EventQueueGetModule"; }
|
||||
}
|
||||
|
||||
public Type ReplaceableInterface
|
||||
public bool IsSharedModule
|
||||
{
|
||||
get { return null; }
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
protected void HandleDebugEq(string module, string[] args)
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
/// <summary>
|
||||
/// This module implements both WebFetchInventoryDescendents and FetchInventoryDescendents2 capabilities.
|
||||
/// </summary>
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "FetchInventory2Module")]
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||
public class FetchInventory2Module : INonSharedRegionModule
|
||||
{
|
||||
// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
@@ -47,7 +47,7 @@ using Caps = OpenSim.Framework.Capabilities.Caps;
|
||||
|
||||
namespace OpenSim.Region.ClientStack.Linden
|
||||
{
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "GetMeshModule")]
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||
public class GetMeshModule : INonSharedRegionModule
|
||||
{
|
||||
// private static readonly ILog m_log =
|
||||
@@ -58,7 +58,7 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
private bool m_Enabled = true;
|
||||
private string m_URL;
|
||||
|
||||
#region Region Module interfaceBase Members
|
||||
#region IRegionModuleBase Members
|
||||
|
||||
public Type ReplaceableInterface
|
||||
{
|
||||
|
||||
@@ -51,7 +51,7 @@ using OpenSim.Capabilities.Handlers;
|
||||
namespace OpenSim.Region.ClientStack.Linden
|
||||
{
|
||||
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "GetTextureModule")]
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||
public class GetTextureModule : INonSharedRegionModule
|
||||
{
|
||||
// private static readonly ILog m_log =
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
/// <summary>
|
||||
/// MeshUploadFlag capability. This is required for uploading Mesh.
|
||||
/// </summary>
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "MeshUploadFlagModule")]
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||
public class MeshUploadFlagModule : INonSharedRegionModule
|
||||
{
|
||||
// private static readonly ILog m_log =
|
||||
|
||||
@@ -47,7 +47,7 @@ using OpenSim.Framework.Capabilities;
|
||||
|
||||
namespace OpenSim.Region.ClientStack.Linden
|
||||
{
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "NewFileAgentInventoryVariablePriceModule")]
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||
public class NewFileAgentInventoryVariablePriceModule : INonSharedRegionModule
|
||||
{
|
||||
// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
@@ -58,7 +58,7 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
private bool m_enabled = true;
|
||||
private int m_levelUpload = 0;
|
||||
|
||||
#region Region Module interfaceBase Members
|
||||
#region IRegionModuleBase Members
|
||||
|
||||
|
||||
public Type ReplaceableInterface
|
||||
@@ -98,7 +98,7 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
#endregion
|
||||
|
||||
|
||||
#region Region Module interface
|
||||
#region IRegionModule Members
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -32,7 +32,6 @@ using log4net;
|
||||
using Nini.Config;
|
||||
using OpenMetaverse;
|
||||
using OpenMetaverse.StructuredData;
|
||||
using Mono.Addins;
|
||||
using OpenSim.Framework;
|
||||
using OpenSim.Framework.Servers;
|
||||
using OpenSim.Framework.Servers.HttpServer;
|
||||
@@ -42,60 +41,30 @@ using Caps=OpenSim.Framework.Capabilities.Caps;
|
||||
|
||||
namespace OpenSim.Region.ClientStack.Linden
|
||||
{
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "ObjectAdd")]
|
||||
public class ObjectAdd : INonSharedRegionModule
|
||||
public class ObjectAdd : IRegionModule
|
||||
{
|
||||
// private static readonly ILog m_log =
|
||||
// LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private Scene m_scene;
|
||||
#region IRegionModule Members
|
||||
|
||||
#region INonSharedRegionModule Members
|
||||
|
||||
public void Initialise(IConfigSource pSource)
|
||||
public void Initialise(Scene pScene, IConfigSource pSource)
|
||||
{
|
||||
}
|
||||
|
||||
public void AddRegion(Scene scene)
|
||||
{
|
||||
m_scene = scene;
|
||||
m_scene = pScene;
|
||||
m_scene.EventManager.OnRegisterCaps += RegisterCaps;
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene scene)
|
||||
public void PostInitialise()
|
||||
{
|
||||
if (m_scene == scene)
|
||||
{
|
||||
m_scene.EventManager.OnRegisterCaps -= RegisterCaps;
|
||||
m_scene = null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void RegionLoaded(Scene scene)
|
||||
{
|
||||
}
|
||||
|
||||
public void Close()
|
||||
{
|
||||
}
|
||||
|
||||
public string Name
|
||||
{
|
||||
get { return "ObjectAddModule"; }
|
||||
}
|
||||
|
||||
public Type ReplaceableInterface
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public void RegisterCaps(UUID agentID, Caps caps)
|
||||
{
|
||||
UUID capuuid = UUID.Random();
|
||||
|
||||
// m_log.InfoFormat("[OBJECTADD]: {0}", "/CAPS/OA/" + capuuid + "/");
|
||||
|
||||
// m_log.InfoFormat("[OBJECTADD]: {0}", "/CAPS/OA/" + capuuid + "/");
|
||||
|
||||
caps.RegisterHandler(
|
||||
"ObjectAdd",
|
||||
@@ -104,7 +73,7 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
"/CAPS/OA/" + capuuid + "/",
|
||||
httpMethod => ProcessAdd(httpMethod, agentID, caps),
|
||||
"ObjectAdd",
|
||||
agentID.ToString())); ;
|
||||
agentID.ToString()));;
|
||||
}
|
||||
|
||||
public Hashtable ProcessAdd(Hashtable request, UUID AgentId, Caps cap)
|
||||
@@ -115,7 +84,7 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
responsedata["keepalive"] = false;
|
||||
responsedata["str_response_string"] = "Request wasn't what was expected";
|
||||
ScenePresence avatar;
|
||||
|
||||
|
||||
if (!m_scene.TryGetScenePresence(AgentId, out avatar))
|
||||
return responsedata;
|
||||
|
||||
@@ -158,7 +127,7 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
|
||||
if (r.Type != OSDType.Map) // not a proper req
|
||||
return responsedata;
|
||||
|
||||
|
||||
OSDMap rm = (OSDMap)r;
|
||||
|
||||
if (rm.ContainsKey("ObjectData")) //v2
|
||||
@@ -169,7 +138,7 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
return responsedata;
|
||||
}
|
||||
|
||||
OSDMap ObjMap = (OSDMap)rm["ObjectData"];
|
||||
OSDMap ObjMap = (OSDMap) rm["ObjectData"];
|
||||
|
||||
bypass_raycast = ObjMap["BypassRaycast"].AsBoolean();
|
||||
everyone_mask = readuintval(ObjMap["EveryoneMask"]);
|
||||
@@ -212,7 +181,7 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
responsedata["str_response_string"] = "Has Profile key, but data not in expected format";
|
||||
return responsedata;
|
||||
}
|
||||
|
||||
|
||||
OSDMap ProfileMap = (OSDMap)ObjMap["Profile"];
|
||||
|
||||
profile_begin = ProfileMap["Begin"].AsInteger();
|
||||
@@ -221,14 +190,14 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
hollow = ProfileMap["Hollow"].AsInteger();
|
||||
}
|
||||
ray_end_is_intersection = ObjMap["RayEndIsIntersection"].AsBoolean();
|
||||
|
||||
|
||||
ray_target_id = ObjMap["RayTargetId"].AsUUID();
|
||||
state = ObjMap["State"].AsInteger();
|
||||
try
|
||||
{
|
||||
ray_end = ((OSDArray)ObjMap["RayEnd"]).AsVector3();
|
||||
ray_start = ((OSDArray)ObjMap["RayStart"]).AsVector3();
|
||||
scale = ((OSDArray)ObjMap["Scale"]).AsVector3();
|
||||
ray_end = ((OSDArray) ObjMap["RayEnd"]).AsVector3();
|
||||
ray_start = ((OSDArray) ObjMap["RayStart"]).AsVector3();
|
||||
scale = ((OSDArray) ObjMap["Scale"]).AsVector3();
|
||||
rotation = ((OSDArray)ObjMap["Rotation"]).AsQuaternion();
|
||||
}
|
||||
catch (Exception)
|
||||
@@ -245,7 +214,7 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
return responsedata;
|
||||
}
|
||||
|
||||
OSDMap AgentDataMap = (OSDMap)rm["AgentData"];
|
||||
OSDMap AgentDataMap = (OSDMap) rm["AgentData"];
|
||||
|
||||
//session_id = AgentDataMap["SessionId"].AsUUID();
|
||||
group_id = AgentDataMap["GroupId"].AsUUID();
|
||||
@@ -282,21 +251,21 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
profile_begin = rm["profile_begin"].AsInteger();
|
||||
profile_curve = rm["profile_curve"].AsInteger();
|
||||
profile_end = rm["profile_end"].AsInteger();
|
||||
|
||||
|
||||
ray_end_is_intersection = rm["ray_end_is_intersection"].AsBoolean();
|
||||
|
||||
|
||||
ray_target_id = rm["ray_target_id"].AsUUID();
|
||||
|
||||
|
||||
|
||||
|
||||
//session_id = rm["session_id"].AsUUID();
|
||||
state = rm["state"].AsInteger();
|
||||
try
|
||||
try
|
||||
{
|
||||
ray_end = ((OSDArray)rm["ray_end"]).AsVector3();
|
||||
ray_start = ((OSDArray)rm["ray_start"]).AsVector3();
|
||||
rotation = ((OSDArray)rm["rotation"]).AsQuaternion();
|
||||
scale = ((OSDArray)rm["scale"]).AsVector3();
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
responsedata["str_response_string"] = "RayEnd, RayStart, Scale or Rotation wasn't in the expected format";
|
||||
@@ -304,9 +273,9 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Vector3 pos = m_scene.GetNewRezLocation(ray_start, ray_end, ray_target_id, rotation, (bypass_raycast) ? (byte)1 : (byte)0, (ray_end_is_intersection) ? (byte)1 : (byte)0, true, scale, false);
|
||||
Vector3 pos = m_scene.GetNewRezLocation(ray_start, ray_end, ray_target_id, rotation, (bypass_raycast) ? (byte)1 : (byte)0, (ray_end_is_intersection) ? (byte)1 : (byte)0, true, scale, false);
|
||||
|
||||
PrimitiveBaseShape pbs = PrimitiveBaseShape.CreateBox();
|
||||
|
||||
@@ -317,17 +286,17 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
pbs.PathRevolutions = (byte)path_revolutions;
|
||||
pbs.PathScaleX = (byte)path_scale_x;
|
||||
pbs.PathScaleY = (byte)path_scale_y;
|
||||
pbs.PathShearX = (byte)path_shear_x;
|
||||
pbs.PathShearX = (byte) path_shear_x;
|
||||
pbs.PathShearY = (byte)path_shear_y;
|
||||
pbs.PathSkew = (sbyte)path_skew;
|
||||
pbs.PathTaperX = (sbyte)path_taper_x;
|
||||
pbs.PathTaperY = (sbyte)path_taper_y;
|
||||
pbs.PathTwist = (sbyte)path_twist;
|
||||
pbs.PathTwistBegin = (sbyte)path_twist_begin;
|
||||
pbs.HollowShape = (HollowShape)hollow;
|
||||
pbs.HollowShape = (HollowShape) hollow;
|
||||
pbs.PCode = (byte)p_code;
|
||||
pbs.ProfileBegin = (ushort)profile_begin;
|
||||
pbs.ProfileCurve = (byte)profile_curve;
|
||||
pbs.ProfileBegin = (ushort) profile_begin;
|
||||
pbs.ProfileCurve = (byte) profile_curve;
|
||||
pbs.ProfileEnd = (ushort)profile_end;
|
||||
pbs.Scale = scale;
|
||||
pbs.State = (byte)state;
|
||||
@@ -337,7 +306,7 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
if (m_scene.Permissions.CanRezObject(1, avatar.UUID, pos))
|
||||
{
|
||||
// rez ON the ground, not IN the ground
|
||||
// pos.Z += 0.25F;
|
||||
// pos.Z += 0.25F;
|
||||
|
||||
obj = m_scene.AddNewPrim(avatar.UUID, group_id, pos, rotation, pbs);
|
||||
}
|
||||
@@ -354,13 +323,13 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
rootpart.GroupMask = group_mask;
|
||||
rootpart.NextOwnerMask = next_owner_mask;
|
||||
rootpart.Material = (byte)material;
|
||||
|
||||
|
||||
m_scene.PhysicsScene.AddPhysicsActorTaint(rootpart.PhysActor);
|
||||
|
||||
|
||||
responsedata["int_response_code"] = 200; //501; //410; //404;
|
||||
responsedata["content_type"] = "text/plain";
|
||||
responsedata["keepalive"] = false;
|
||||
responsedata["str_response_string"] = String.Format("<llsd><map><key>local_id</key>{0}</map></llsd>", ConvertUintToBytes(obj.LocalId));
|
||||
responsedata["str_response_string"] = String.Format("<llsd><map><key>local_id</key>{0}</map></llsd>",ConvertUintToBytes(obj.LocalId));
|
||||
|
||||
return responsedata;
|
||||
}
|
||||
@@ -378,8 +347,24 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
byte[] resultbytes = Utils.UIntToBytes(val);
|
||||
if (BitConverter.IsLittleEndian)
|
||||
Array.Reverse(resultbytes);
|
||||
return String.Format("<binary encoding=\"base64\">{0}</binary>", Convert.ToBase64String(resultbytes));
|
||||
return String.Format("<binary encoding=\"base64\">{0}</binary>",Convert.ToBase64String(resultbytes));
|
||||
}
|
||||
|
||||
public void Close()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public string Name
|
||||
{
|
||||
get { return "ObjectAddModule"; }
|
||||
}
|
||||
|
||||
public bool IsSharedModule
|
||||
{
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,14 +51,14 @@ using ExtraParamType = OpenMetaverse.ExtraParamType;
|
||||
|
||||
namespace OpenSim.Region.ClientStack.Linden
|
||||
{
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "UploadObjectAssetModule")]
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||
public class UploadObjectAssetModule : INonSharedRegionModule
|
||||
{
|
||||
private static readonly ILog m_log =
|
||||
LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
private Scene m_scene;
|
||||
|
||||
#region Region Module interfaceBase Members
|
||||
#region IRegionModuleBase Members
|
||||
|
||||
|
||||
public Type ReplaceableInterface
|
||||
@@ -92,7 +92,7 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
#endregion
|
||||
|
||||
|
||||
#region Region Module interface
|
||||
#region IRegionModule Members
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("OpenSim.Region.ClientStack.LindenCaps")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("http://opensimulator.org")]
|
||||
[assembly: AssemblyProduct("OpenSim")]
|
||||
[assembly: AssemblyCopyright("OpenSimulator developers")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("1ae76353-f37f-4fe3-b6df-d11cedf01f2c")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
[assembly: AssemblyVersion("0.7.5.*")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
@@ -1,234 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) Contributors, http://opensimulator.org/
|
||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of the OpenSimulator Project nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Imaging;
|
||||
using System.Reflection;
|
||||
using System.IO;
|
||||
using System.Web;
|
||||
using log4net;
|
||||
using Nini.Config;
|
||||
using Mono.Addins;
|
||||
using OpenMetaverse;
|
||||
using OpenMetaverse.StructuredData;
|
||||
using OpenMetaverse.Imaging;
|
||||
using OpenSim.Framework;
|
||||
using OpenSim.Framework.Console;
|
||||
using OpenSim.Framework.Servers;
|
||||
using OpenSim.Framework.Servers.HttpServer;
|
||||
using OpenSim.Region.Framework.Interfaces;
|
||||
using OpenSim.Region.Framework.Scenes;
|
||||
using OpenSim.Services.Interfaces;
|
||||
using Caps = OpenSim.Framework.Capabilities.Caps;
|
||||
using OpenSim.Capabilities.Handlers;
|
||||
|
||||
namespace OpenSim.Region.ClientStack.Linden
|
||||
{
|
||||
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "RegionConsoleModule")]
|
||||
public class RegionConsoleModule : INonSharedRegionModule, IRegionConsole
|
||||
{
|
||||
private static readonly ILog m_log =
|
||||
LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private Scene m_scene;
|
||||
private IEventQueue m_eventQueue;
|
||||
private Commands m_commands = new Commands();
|
||||
public ICommands Commands { get { return m_commands; } }
|
||||
|
||||
public void Initialise(IConfigSource source)
|
||||
{
|
||||
m_commands.AddCommand( "Help", false, "help", "help [<item>]", "Display help on a particular command or on a list of commands in a category", Help);
|
||||
}
|
||||
|
||||
public void AddRegion(Scene s)
|
||||
{
|
||||
m_scene = s;
|
||||
m_scene.RegisterModuleInterface<IRegionConsole>(this);
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene s)
|
||||
{
|
||||
m_scene.EventManager.OnRegisterCaps -= RegisterCaps;
|
||||
m_scene = null;
|
||||
}
|
||||
|
||||
public void RegionLoaded(Scene s)
|
||||
{
|
||||
m_scene.EventManager.OnRegisterCaps += RegisterCaps;
|
||||
m_eventQueue = m_scene.RequestModuleInterface<IEventQueue>();
|
||||
}
|
||||
|
||||
public void PostInitialise()
|
||||
{
|
||||
}
|
||||
|
||||
public void Close() { }
|
||||
|
||||
public string Name { get { return "RegionConsoleModule"; } }
|
||||
|
||||
public Type ReplaceableInterface
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
public void RegisterCaps(UUID agentID, Caps caps)
|
||||
{
|
||||
if (!m_scene.RegionInfo.EstateSettings.IsEstateManagerOrOwner(agentID))
|
||||
return;
|
||||
|
||||
UUID capID = UUID.Random();
|
||||
|
||||
// m_log.DebugFormat("[REGION CONSOLE]: /CAPS/{0} in region {1}", capID, m_scene.RegionInfo.RegionName);
|
||||
caps.RegisterHandler(
|
||||
"SimConsoleAsync",
|
||||
new ConsoleHandler("/CAPS/" + capID + "/", "SimConsoleAsync", agentID, this, m_scene));
|
||||
}
|
||||
|
||||
public void SendConsoleOutput(UUID agentID, string message)
|
||||
{
|
||||
OSD osd = OSD.FromString(message);
|
||||
|
||||
m_eventQueue.Enqueue(EventQueueHelper.BuildEvent("SimConsoleResponse", osd), agentID);
|
||||
}
|
||||
|
||||
public bool RunCommand(string command, UUID invokerID)
|
||||
{
|
||||
string[] parts = Parser.Parse(command);
|
||||
Array.Resize(ref parts, parts.Length + 1);
|
||||
parts[parts.Length - 1] = invokerID.ToString();
|
||||
|
||||
if (m_commands.Resolve(parts).Length == 0)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private void Help(string module, string[] cmd)
|
||||
{
|
||||
UUID agentID = new UUID(cmd[cmd.Length - 1]);
|
||||
Array.Resize(ref cmd, cmd.Length - 1);
|
||||
|
||||
List<string> help = Commands.GetHelp(cmd);
|
||||
|
||||
string reply = String.Empty;
|
||||
|
||||
foreach (string s in help)
|
||||
{
|
||||
reply += s + "\n";
|
||||
}
|
||||
|
||||
SendConsoleOutput(agentID, reply);
|
||||
}
|
||||
|
||||
public void AddCommand(string module, bool shared, string command, string help, string longhelp, CommandDelegate fn)
|
||||
{
|
||||
m_commands.AddCommand(module, shared, command, help, longhelp, fn);
|
||||
}
|
||||
}
|
||||
|
||||
public class ConsoleHandler : BaseStreamHandler
|
||||
{
|
||||
private static readonly ILog m_log =
|
||||
LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private RegionConsoleModule m_consoleModule;
|
||||
private UUID m_agentID;
|
||||
private bool m_isGod;
|
||||
private Scene m_scene;
|
||||
private bool m_consoleIsOn = false;
|
||||
|
||||
public ConsoleHandler(string path, string name, UUID agentID, RegionConsoleModule module, Scene scene)
|
||||
:base("POST", path, name, agentID.ToString())
|
||||
{
|
||||
m_agentID = agentID;
|
||||
m_consoleModule = module;
|
||||
m_scene = scene;
|
||||
|
||||
m_isGod = m_scene.Permissions.IsGod(agentID);
|
||||
}
|
||||
|
||||
public override byte[] Handle(string path, Stream request, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
|
||||
{
|
||||
StreamReader reader = new StreamReader(request);
|
||||
string message = reader.ReadToEnd();
|
||||
|
||||
OSD osd = OSDParser.DeserializeLLSDXml(message);
|
||||
|
||||
string cmd = osd.AsString();
|
||||
if (cmd == "set console on")
|
||||
{
|
||||
if (m_isGod)
|
||||
{
|
||||
MainConsole.Instance.OnOutput += ConsoleSender;
|
||||
m_consoleIsOn = true;
|
||||
m_consoleModule.SendConsoleOutput(m_agentID, "Console is now on");
|
||||
}
|
||||
return new byte[0];
|
||||
}
|
||||
else if (cmd == "set console off")
|
||||
{
|
||||
MainConsole.Instance.OnOutput -= ConsoleSender;
|
||||
m_consoleIsOn = false;
|
||||
m_consoleModule.SendConsoleOutput(m_agentID, "Console is now off");
|
||||
return new byte[0];
|
||||
}
|
||||
|
||||
if (m_consoleIsOn == false && m_consoleModule.RunCommand(osd.AsString().Trim(), m_agentID))
|
||||
return new byte[0];
|
||||
|
||||
if (m_isGod && m_consoleIsOn)
|
||||
{
|
||||
MainConsole.Instance.RunCommand(osd.AsString().Trim());
|
||||
}
|
||||
else
|
||||
{
|
||||
m_consoleModule.SendConsoleOutput(m_agentID, "Unknown command");
|
||||
}
|
||||
|
||||
return new byte[0];
|
||||
}
|
||||
|
||||
private void ConsoleSender(string text)
|
||||
{
|
||||
m_consoleModule.SendConsoleOutput(m_agentID, text);
|
||||
}
|
||||
|
||||
private void OnMakeChildAgent(ScenePresence presence)
|
||||
{
|
||||
if (presence.UUID == m_agentID)
|
||||
{
|
||||
MainConsole.Instance.OnOutput -= ConsoleSender;
|
||||
m_consoleIsOn = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -53,7 +53,7 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
/// NOTE: Part of this code was adapted from the Aurora project, specifically
|
||||
/// the normal part of the response in the capability handler.
|
||||
/// </remarks>
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "SimulatorFeaturesModule")]
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||
public class SimulatorFeaturesModule : ISharedRegionModule, ISimulatorFeaturesModule
|
||||
{
|
||||
// private static readonly ILog m_log =
|
||||
|
||||
@@ -50,7 +50,7 @@ using OpenSim.Capabilities.Handlers;
|
||||
|
||||
namespace OpenSim.Region.ClientStack.Linden
|
||||
{
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "UploadBakedTextureModule")]
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||
public class UploadBakedTextureModule : INonSharedRegionModule
|
||||
{
|
||||
// private static readonly ILog m_log =
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
/// <summary>
|
||||
/// This module implements both WebFetchInventoryDescendents and FetchInventoryDescendents2 capabilities.
|
||||
/// </summary>
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "WebFetchInvDescModule")]
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||
public class WebFetchInvDescModule : INonSharedRegionModule
|
||||
{
|
||||
// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
@@ -47,7 +47,6 @@ using OpenSim.Region.Framework.Scenes;
|
||||
using OpenSim.Services.Interfaces;
|
||||
using Timer = System.Timers.Timer;
|
||||
using AssetLandmark = OpenSim.Framework.AssetLandmark;
|
||||
using RegionFlags = OpenMetaverse.RegionFlags;
|
||||
using Nini.Config;
|
||||
|
||||
using System.IO;
|
||||
@@ -1588,7 +1587,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
|
||||
if (localIDs.Count == 1 && m_scene.GetScenePresence(localIDs[0]) != null)
|
||||
{
|
||||
OutPacket(kill, ThrottleOutPacketType.State);
|
||||
OutPacket(kill, ThrottleOutPacketType.Task);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -5888,8 +5887,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
msgpack.MessageBlock.ID,
|
||||
msgpack.MessageBlock.Offline != 0 ? true : false,
|
||||
msgpack.MessageBlock.Position,
|
||||
msgpack.MessageBlock.BinaryBucket,
|
||||
true);
|
||||
msgpack.MessageBlock.BinaryBucket);
|
||||
|
||||
handlerInstantMessage(this, im);
|
||||
}
|
||||
@@ -6427,7 +6425,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
#endregion
|
||||
|
||||
AgentRequestSit handlerAgentRequestSit = OnAgentRequestSit;
|
||||
|
||||
if (handlerAgentRequestSit != null)
|
||||
handlerAgentRequestSit(this, agentRequestSit.AgentData.AgentID,
|
||||
agentRequestSit.TargetObject.TargetID, agentRequestSit.TargetObject.Offset);
|
||||
|
||||
@@ -278,7 +278,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
public string GetStats()
|
||||
{
|
||||
return string.Format(
|
||||
"{0,7} {1,7} {2,7} {3,9} {4,7} {5,7} {6,7} {7,7} {8,7} {9,8} {10,7} {11,7} {12,7}",
|
||||
"{0,7} {1,7} {2,7} {3,9} {4,7} {5,7} {6,7} {7,7} {8,7} {9,8} {10,7} {11,7}",
|
||||
Util.EnvironmentTickCountSubtract(TickLastPacketReceived),
|
||||
PacketsReceived,
|
||||
PacketsSent,
|
||||
@@ -290,8 +290,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
m_packetOutboxes[(int)ThrottleOutPacketType.Cloud].Count,
|
||||
m_packetOutboxes[(int)ThrottleOutPacketType.Task].Count,
|
||||
m_packetOutboxes[(int)ThrottleOutPacketType.Texture].Count,
|
||||
m_packetOutboxes[(int)ThrottleOutPacketType.Asset].Count,
|
||||
m_packetOutboxes[(int)ThrottleOutPacketType.State].Count);
|
||||
m_packetOutboxes[(int)ThrottleOutPacketType.Asset].Count);
|
||||
}
|
||||
|
||||
public void SendPacketStats()
|
||||
@@ -337,8 +336,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
int task = (int)(BitConverter.ToSingle(adjData, pos) * 0.125f); pos += 4;
|
||||
int texture = (int)(BitConverter.ToSingle(adjData, pos) * 0.125f); pos += 4;
|
||||
int asset = (int)(BitConverter.ToSingle(adjData, pos) * 0.125f);
|
||||
// State is a subcategory of task that we allocate a percentage to
|
||||
int state = 0;
|
||||
|
||||
// Make sure none of the throttles are set below our packet MTU,
|
||||
// otherwise a throttle could become permanently clogged
|
||||
@@ -375,9 +372,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
bucket = m_throttleCategories[(int)ThrottleOutPacketType.Task];
|
||||
bucket.RequestedDripRate = task;
|
||||
|
||||
bucket = m_throttleCategories[(int)ThrottleOutPacketType.State];
|
||||
bucket.RequestedDripRate = state;
|
||||
|
||||
bucket = m_throttleCategories[(int)ThrottleOutPacketType.Texture];
|
||||
bucket.RequestedDripRate = texture;
|
||||
|
||||
@@ -678,9 +672,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
Texture = 5,
|
||||
/// <summary>Non-texture assets</summary>
|
||||
Asset = 6,
|
||||
/// <summary>Avatar and primitive data</summary>
|
||||
/// <remarks>This is a sub-category of Task</remarks>
|
||||
State = 7,
|
||||
*/
|
||||
|
||||
switch (category)
|
||||
@@ -697,11 +688,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
return ThrottleOutPacketTypeFlags.Texture;
|
||||
case ThrottleOutPacketType.Asset:
|
||||
return ThrottleOutPacketTypeFlags.Asset;
|
||||
case ThrottleOutPacketType.State:
|
||||
return ThrottleOutPacketTypeFlags.State;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -208,12 +208,9 @@ namespace OpenMetaverse
|
||||
{
|
||||
UDPPacketBuffer buf;
|
||||
|
||||
// FIXME: Disabled for now as this causes issues with reused packet objects interfering with each other
|
||||
// on Windows with m_asyncPacketHandling = true, though this has not been seen on Linux.
|
||||
// Possibly some unexpected issue with fetching UDP data concurrently with multiple threads. Requires more investigation.
|
||||
// if (UsePools)
|
||||
// buf = Pool.GetObject();
|
||||
// else
|
||||
if (UsePools)
|
||||
buf = Pool.GetObject();
|
||||
else
|
||||
buf = new UDPPacketBuffer();
|
||||
|
||||
if (IsRunningInbound)
|
||||
@@ -294,8 +291,8 @@ namespace OpenMetaverse
|
||||
catch (ObjectDisposedException) { }
|
||||
finally
|
||||
{
|
||||
// if (UsePools)
|
||||
// Pool.ReturnObject(buffer);
|
||||
if (UsePools)
|
||||
Pool.ReturnObject(buffer);
|
||||
|
||||
// Synchronous mode waits until the packet callback completes
|
||||
// before starting the receive to fetch another packet
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("OpenSim.Region.ClientStack.LindenUDP")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("http://opensimulator.org")]
|
||||
[assembly: AssemblyProduct("OpenSim")]
|
||||
[assembly: AssemblyCopyright("OpenSimulator developers")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("9d3dbc6b-9d85-483b-af48-c1dfc261b7ac")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
[assembly: AssemblyVersion("0.7.5.*")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
@@ -1,33 +0,0 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("OpenSim.Region.ClientStack")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("http://opensimulator.org")]
|
||||
[assembly: AssemblyProduct("OpenSIm")]
|
||||
[assembly: AssemblyCopyright("OpenSimulator developers")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("02ced54a-a802-4474-9e94-f03a44fde922")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
[assembly: AssemblyVersion("0.7.5.*")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
@@ -76,7 +76,7 @@ namespace OpenSim.Region.ClientStack
|
||||
|
||||
protected override void StartupSpecific()
|
||||
{
|
||||
SceneManager = SceneManager.Instance;
|
||||
SceneManager = new SceneManager();
|
||||
m_clientStackManager = CreateClientStackManager();
|
||||
|
||||
Initialize();
|
||||
|
||||
@@ -54,7 +54,7 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
|
||||
private Dictionary<UUID, AgentAssetTransactions> AgentTransactions =
|
||||
new Dictionary<UUID, AgentAssetTransactions>();
|
||||
|
||||
#region Region Module interface
|
||||
#region IRegionModule Members
|
||||
|
||||
public void Initialise(IConfigSource source)
|
||||
{
|
||||
|
||||
@@ -29,7 +29,6 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using Mono.Addins;
|
||||
using Nini.Config;
|
||||
using OpenSim.Framework;
|
||||
using OpenSim.Region.Framework.Interfaces;
|
||||
@@ -37,18 +36,13 @@ using OpenSim.Region.Framework.Scenes;
|
||||
|
||||
namespace OpenSim.Region.CoreModules.Agent.IPBan
|
||||
{
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "IPBanModule")]
|
||||
public class IPBanModule : ISharedRegionModule
|
||||
public class IPBanModule : IRegionModule
|
||||
{
|
||||
#region Implementation of ISharedRegionModule
|
||||
#region Implementation of IRegionModule
|
||||
|
||||
private List<string> m_bans = new List<string>();
|
||||
|
||||
public void Initialise(IConfigSource source)
|
||||
{
|
||||
}
|
||||
|
||||
public void AddRegion(Scene scene)
|
||||
public void Initialise(Scene scene, IConfigSource source)
|
||||
{
|
||||
new SceneBanner(scene, m_bans);
|
||||
|
||||
@@ -56,7 +50,7 @@ namespace OpenSim.Region.CoreModules.Agent.IPBan
|
||||
{
|
||||
foreach (EstateBan ban in scene.RegionInfo.EstateSettings.EstateBans)
|
||||
{
|
||||
if (!String.IsNullOrEmpty(ban.BannedHostIPMask))
|
||||
if (!String.IsNullOrEmpty(ban.BannedHostIPMask))
|
||||
m_bans.Add(ban.BannedHostIPMask);
|
||||
if (!String.IsNullOrEmpty(ban.BannedHostNameMask))
|
||||
m_bans.Add(ban.BannedHostNameMask);
|
||||
@@ -64,14 +58,6 @@ namespace OpenSim.Region.CoreModules.Agent.IPBan
|
||||
}
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene scene)
|
||||
{
|
||||
}
|
||||
|
||||
public void RegionLoaded(Scene scene)
|
||||
{
|
||||
}
|
||||
|
||||
public void PostInitialise()
|
||||
{
|
||||
if (File.Exists("bans.txt"))
|
||||
@@ -94,9 +80,9 @@ namespace OpenSim.Region.CoreModules.Agent.IPBan
|
||||
get { return "IPBanModule"; }
|
||||
}
|
||||
|
||||
public Type ReplaceableInterface
|
||||
public bool IsSharedModule
|
||||
{
|
||||
get { return null; }
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -32,7 +32,6 @@ using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using log4net;
|
||||
using Mono.Addins;
|
||||
using Nini.Config;
|
||||
using OpenMetaverse;
|
||||
using OpenMetaverse.Imaging;
|
||||
@@ -46,8 +45,7 @@ namespace OpenSim.Region.CoreModules.Agent.TextureSender
|
||||
{
|
||||
public delegate void J2KDecodeDelegate(UUID assetID);
|
||||
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "J2KDecoderModule")]
|
||||
public class J2KDecoderModule : ISharedRegionModule, IJ2KDecoder
|
||||
public class J2KDecoderModule : IRegionModule, IJ2KDecoder
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
@@ -57,32 +55,27 @@ namespace OpenSim.Region.CoreModules.Agent.TextureSender
|
||||
private readonly Dictionary<UUID, List<DecodedCallback>> m_notifyList = new Dictionary<UUID, List<DecodedCallback>>();
|
||||
/// <summary>Cache that will store decoded JPEG2000 layer boundary data</summary>
|
||||
private IImprovedAssetCache m_cache;
|
||||
private IImprovedAssetCache Cache
|
||||
{
|
||||
get
|
||||
{
|
||||
if (m_cache == null)
|
||||
m_cache = m_scene.RequestModuleInterface<IImprovedAssetCache>();
|
||||
|
||||
return m_cache;
|
||||
}
|
||||
}
|
||||
/// <summary>Reference to a scene (doesn't matter which one as long as it can load the cache module)</summary>
|
||||
private UUID m_CreatorID = UUID.Zero;
|
||||
private Scene m_scene;
|
||||
|
||||
#region ISharedRegionModule
|
||||
#region IRegionModule
|
||||
|
||||
private bool m_useCSJ2K = true;
|
||||
|
||||
public string Name { get { return "J2KDecoderModule"; } }
|
||||
public bool IsSharedModule { get { return true; } }
|
||||
|
||||
public J2KDecoderModule()
|
||||
{
|
||||
}
|
||||
|
||||
public void Initialise(IConfigSource source)
|
||||
public void Initialise(Scene scene, IConfigSource source)
|
||||
{
|
||||
if (m_scene == null)
|
||||
m_scene = scene;
|
||||
|
||||
scene.RegisterModuleInterface<IJ2KDecoder>(this);
|
||||
|
||||
IConfig startupConfig = source.Configs["Startup"];
|
||||
if (startupConfig != null)
|
||||
{
|
||||
@@ -90,42 +83,16 @@ namespace OpenSim.Region.CoreModules.Agent.TextureSender
|
||||
}
|
||||
}
|
||||
|
||||
public void AddRegion(Scene scene)
|
||||
{
|
||||
if (m_scene == null)
|
||||
{
|
||||
m_scene = scene;
|
||||
m_CreatorID = scene.RegionInfo.RegionID;
|
||||
}
|
||||
|
||||
scene.RegisterModuleInterface<IJ2KDecoder>(this);
|
||||
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene scene)
|
||||
{
|
||||
if (m_scene == scene)
|
||||
m_scene = null;
|
||||
}
|
||||
|
||||
public void PostInitialise()
|
||||
{
|
||||
m_cache = m_scene.RequestModuleInterface<IImprovedAssetCache>();
|
||||
}
|
||||
|
||||
public void Close()
|
||||
{
|
||||
}
|
||||
|
||||
public void RegionLoaded(Scene scene)
|
||||
{
|
||||
}
|
||||
|
||||
public Type ReplaceableInterface
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
#endregion Region Module interface
|
||||
#endregion IRegionModule
|
||||
|
||||
#region IJ2KDecoder
|
||||
|
||||
@@ -308,11 +275,11 @@ namespace OpenSim.Region.CoreModules.Agent.TextureSender
|
||||
{
|
||||
m_decodedCache.AddOrUpdate(AssetId, Layers, TimeSpan.FromMinutes(10));
|
||||
|
||||
if (Cache != null)
|
||||
if (m_cache != null)
|
||||
{
|
||||
string assetID = "j2kCache_" + AssetId.ToString();
|
||||
|
||||
AssetBase layerDecodeAsset = new AssetBase(assetID, assetID, (sbyte)AssetType.Notecard, m_CreatorID.ToString());
|
||||
AssetBase layerDecodeAsset = new AssetBase(assetID, assetID, (sbyte)AssetType.Notecard, m_scene.RegionInfo.RegionID.ToString());
|
||||
layerDecodeAsset.Local = true;
|
||||
layerDecodeAsset.Temporary = true;
|
||||
|
||||
@@ -332,7 +299,7 @@ namespace OpenSim.Region.CoreModules.Agent.TextureSender
|
||||
|
||||
#endregion Serialize Layer Data
|
||||
|
||||
Cache.Cache(layerDecodeAsset);
|
||||
m_cache.Cache(layerDecodeAsset);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -342,10 +309,10 @@ namespace OpenSim.Region.CoreModules.Agent.TextureSender
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if (Cache != null)
|
||||
else if (m_cache != null)
|
||||
{
|
||||
string assetName = "j2kCache_" + AssetId.ToString();
|
||||
AssetBase layerDecodeAsset = Cache.Get(assetName);
|
||||
AssetBase layerDecodeAsset = m_cache.Get(assetName);
|
||||
|
||||
if (layerDecodeAsset != null)
|
||||
{
|
||||
@@ -357,7 +324,7 @@ namespace OpenSim.Region.CoreModules.Agent.TextureSender
|
||||
if (lines.Length == 0)
|
||||
{
|
||||
m_log.Warn("[J2KDecodeCache]: Expiring corrupted layer data (empty) " + assetName);
|
||||
Cache.Expire(assetName);
|
||||
m_cache.Expire(assetName);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -378,7 +345,7 @@ namespace OpenSim.Region.CoreModules.Agent.TextureSender
|
||||
catch (FormatException)
|
||||
{
|
||||
m_log.Warn("[J2KDecodeCache]: Expiring corrupted layer data (format) " + assetName);
|
||||
Cache.Expire(assetName);
|
||||
m_cache.Expire(assetName);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -389,7 +356,7 @@ namespace OpenSim.Region.CoreModules.Agent.TextureSender
|
||||
else
|
||||
{
|
||||
m_log.Warn("[J2KDecodeCache]: Expiring corrupted layer data (layout) " + assetName);
|
||||
Cache.Expire(assetName);
|
||||
m_cache.Expire(assetName);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,12 +35,9 @@ using OpenSim.Framework;
|
||||
using OpenSim.Region.Framework.Interfaces;
|
||||
using OpenSim.Region.Framework.Scenes;
|
||||
|
||||
using Mono.Addins;
|
||||
|
||||
namespace OpenSim.Region.CoreModules.Agent.Xfer
|
||||
{
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "XferModule")]
|
||||
public class XferModule : INonSharedRegionModule, IXfer
|
||||
public class XferModule : IRegionModule, IXfer
|
||||
{
|
||||
private Scene m_scene;
|
||||
private Dictionary<string, FileData> NewFiles = new Dictionary<string, FileData>();
|
||||
@@ -62,13 +59,9 @@ namespace OpenSim.Region.CoreModules.Agent.Xfer
|
||||
public int Count;
|
||||
}
|
||||
|
||||
#region INonSharedRegionModule Members
|
||||
#region IRegionModule Members
|
||||
|
||||
public void Initialise(IConfigSource config)
|
||||
{
|
||||
}
|
||||
|
||||
public void AddRegion(Scene scene)
|
||||
public void Initialise(Scene scene, IConfigSource config)
|
||||
{
|
||||
m_scene = scene;
|
||||
m_scene.EventManager.OnNewClient += NewClient;
|
||||
@@ -76,21 +69,8 @@ namespace OpenSim.Region.CoreModules.Agent.Xfer
|
||||
m_scene.RegisterModuleInterface<IXfer>(this);
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene scene)
|
||||
public void PostInitialise()
|
||||
{
|
||||
m_scene.EventManager.OnNewClient -= NewClient;
|
||||
|
||||
m_scene.UnregisterModuleInterface<IXfer>(this);
|
||||
m_scene = null;
|
||||
}
|
||||
|
||||
public void RegionLoaded(Scene scene)
|
||||
{
|
||||
}
|
||||
|
||||
public Type ReplaceableInterface
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
public void Close()
|
||||
@@ -102,6 +82,11 @@ namespace OpenSim.Region.CoreModules.Agent.Xfer
|
||||
get { return "XferModule"; }
|
||||
}
|
||||
|
||||
public bool IsSharedModule
|
||||
{
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region IXfer Members
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
using System;
|
||||
using System.Reflection;
|
||||
using log4net;
|
||||
using Mono.Addins;
|
||||
using Nini.Config;
|
||||
using OpenSim.Framework;
|
||||
using OpenSim.Region.Framework.Interfaces;
|
||||
@@ -90,7 +89,6 @@ namespace OpenSim.Region.CoreModules.Asset
|
||||
/// ExpirationTime = 60
|
||||
/// </code>
|
||||
/// </example>
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "CenomeMemoryAssetCache")]
|
||||
public class CenomeMemoryAssetCache : IImprovedAssetCache, ISharedRegionModule
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
@@ -30,7 +30,6 @@ using System;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
using Mono.Addins;
|
||||
using Nini.Config;
|
||||
using OpenSim.Framework;
|
||||
using OpenSim.Region.Framework.Interfaces;
|
||||
@@ -39,7 +38,6 @@ using OpenSim.Services.Interfaces;
|
||||
|
||||
namespace OpenSim.Region.CoreModules.Asset
|
||||
{
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "CoreAssetCache")]
|
||||
public class CoreAssetCache : ISharedRegionModule, IImprovedAssetCache
|
||||
{
|
||||
private static readonly ILog m_log =
|
||||
|
||||
@@ -49,12 +49,12 @@ using OpenSim.Region.Framework.Scenes;
|
||||
using OpenSim.Services.Interfaces;
|
||||
|
||||
|
||||
//[assembly: Addin("FlotsamAssetCache", "1.1")]
|
||||
//[assembly: AddinDependency("OpenSim", "0.5")]
|
||||
[assembly: Addin("FlotsamAssetCache", "1.1")]
|
||||
[assembly: AddinDependency("OpenSim", "0.5")]
|
||||
|
||||
namespace OpenSim.Region.CoreModules.Asset
|
||||
namespace Flotsam.RegionModules.AssetCache
|
||||
{
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "FlotsamAssetCache")]
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||
public class FlotsamAssetCache : ISharedRegionModule, IImprovedAssetCache, IAssetService
|
||||
{
|
||||
private static readonly ILog m_log =
|
||||
@@ -222,6 +222,10 @@ namespace OpenSim.Region.CoreModules.Asset
|
||||
scene.RegisterModuleInterface<IImprovedAssetCache>(this);
|
||||
m_Scenes.Add(scene);
|
||||
|
||||
if (m_AssetService == null)
|
||||
{
|
||||
m_AssetService = scene.RequestModuleInterface<IAssetService>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -236,8 +240,6 @@ namespace OpenSim.Region.CoreModules.Asset
|
||||
|
||||
public void RegionLoaded(Scene scene)
|
||||
{
|
||||
if (m_Enabled && m_AssetService == null)
|
||||
m_AssetService = scene.RequestModuleInterface<IAssetService>();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
@@ -707,32 +709,43 @@ namespace OpenSim.Region.CoreModules.Asset
|
||||
{
|
||||
UuidGatherer gatherer = new UuidGatherer(m_AssetService);
|
||||
|
||||
HashSet<UUID> uniqueUuids = new HashSet<UUID>();
|
||||
Dictionary<UUID, AssetType> assets = new Dictionary<UUID, AssetType>();
|
||||
|
||||
foreach (Scene s in m_Scenes)
|
||||
{
|
||||
StampRegionStatusFile(s.RegionInfo.RegionID);
|
||||
|
||||
s.ForEachSOG(delegate(SceneObjectGroup e)
|
||||
{
|
||||
{
|
||||
gatherer.GatherAssetUuids(e, assets);
|
||||
|
||||
foreach (UUID assetID in assets.Keys)
|
||||
{
|
||||
uniqueUuids.Add(assetID);
|
||||
|
||||
string filename = GetFileName(assetID.ToString());
|
||||
|
||||
if (File.Exists(filename))
|
||||
{
|
||||
File.SetLastAccessTime(filename, DateTime.Now);
|
||||
}
|
||||
else if (storeUncached)
|
||||
{
|
||||
AssetBase cachedAsset = m_AssetService.Get(assetID.ToString());
|
||||
if (cachedAsset == null && assets[assetID] != AssetType.Unknown)
|
||||
m_log.DebugFormat(
|
||||
"[FLOTSAM ASSET CACHE]: Could not find asset {0}, type {1} referenced by object {2} at {3} in scene {4} when pre-caching all scene assets",
|
||||
assetID, assets[assetID], e.Name, e.AbsolutePosition, s.Name);
|
||||
}
|
||||
}
|
||||
|
||||
assets.Clear();
|
||||
});
|
||||
}
|
||||
|
||||
foreach (UUID assetID in assets.Keys)
|
||||
{
|
||||
string filename = GetFileName(assetID.ToString());
|
||||
|
||||
if (File.Exists(filename))
|
||||
{
|
||||
File.SetLastAccessTime(filename, DateTime.Now);
|
||||
}
|
||||
else if (storeUncached)
|
||||
{
|
||||
m_AssetService.Get(assetID.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
return assets.Keys.Count;
|
||||
return uniqueUuids.Count;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -31,7 +31,6 @@ using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
using GlynnTucker.Cache;
|
||||
using Mono.Addins;
|
||||
using Nini.Config;
|
||||
using OpenSim.Framework;
|
||||
using OpenSim.Region.Framework.Interfaces;
|
||||
@@ -40,7 +39,6 @@ using OpenSim.Services.Interfaces;
|
||||
|
||||
namespace OpenSim.Region.CoreModules.Asset
|
||||
{
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "GlynnTuckerAssetCache")]
|
||||
public class GlynnTuckerAssetCache : ISharedRegionModule, IImprovedAssetCache
|
||||
{
|
||||
private static readonly ILog m_log =
|
||||
|
||||
@@ -35,6 +35,7 @@ using Nini.Config;
|
||||
using NUnit.Framework;
|
||||
using OpenMetaverse;
|
||||
using OpenMetaverse.Assets;
|
||||
using Flotsam.RegionModules.AssetCache;
|
||||
using OpenSim.Framework;
|
||||
using OpenSim.Region.Framework.Scenes;
|
||||
using OpenSim.Region.Framework.Scenes.Serialization;
|
||||
|
||||
@@ -75,10 +75,40 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
|
||||
m_scene.RegisterModuleInterface<IAttachmentsModule>(this);
|
||||
|
||||
if (Enabled)
|
||||
{
|
||||
m_scene.EventManager.OnNewClient += SubscribeToClientEvents;
|
||||
m_scene.EventManager.OnStartScript += (localID, itemID) => HandleScriptStateChange(localID, true);
|
||||
m_scene.EventManager.OnStopScript += (localID, itemID) => HandleScriptStateChange(localID, false);
|
||||
}
|
||||
|
||||
// TODO: Should probably be subscribing to CloseClient too, but this doesn't yet give us IClientAPI
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Listen for client triggered running state changes so that we can persist the script's object if necessary.
|
||||
/// </summary>
|
||||
/// <param name='localID'></param>
|
||||
/// <param name='itemID'></param>
|
||||
private void HandleScriptStateChange(uint localID, bool started)
|
||||
{
|
||||
SceneObjectGroup sog = m_scene.GetGroupByPrim(localID);
|
||||
if (sog != null && sog.IsAttachment)
|
||||
{
|
||||
if (!started)
|
||||
{
|
||||
// FIXME: This is a convoluted way for working out whether the script state has changed to stop
|
||||
// because it has been manually stopped or because the stop was called in UpdateDetachedObject() below
|
||||
// This needs to be handled in a less tangled way.
|
||||
ScenePresence sp = m_scene.GetScenePresence(sog.AttachedAvatar);
|
||||
if (sp.ControllingClient.IsActive)
|
||||
sog.HasGroupChanged = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
sog.HasGroupChanged = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene scene)
|
||||
{
|
||||
@@ -238,22 +268,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
|
||||
|
||||
sp.ClearAttachments();
|
||||
}
|
||||
|
||||
public bool AttachObject(IScenePresence sp, SceneObjectGroup group, uint attachmentPt, bool silent, bool temp)
|
||||
{
|
||||
if (!Enabled)
|
||||
return false;
|
||||
|
||||
if (AttachObjectInternal(sp, group, attachmentPt, silent, temp))
|
||||
{
|
||||
m_scene.EventManager.TriggerOnAttach(group.LocalId, group.FromItemID, sp.UUID);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private bool AttachObjectInternal(IScenePresence sp, SceneObjectGroup group, uint attachmentPt, bool silent, bool temp)
|
||||
public bool AttachObject(IScenePresence sp, SceneObjectGroup group, uint attachmentPt, bool silent)
|
||||
{
|
||||
lock (sp.AttachmentsSyncLock)
|
||||
{
|
||||
@@ -312,7 +328,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
|
||||
group.AbsolutePosition = attachPos;
|
||||
|
||||
if (sp.PresenceType != PresenceType.Npc)
|
||||
UpdateUserInventoryWithAttachment(sp, group, attachmentPt, temp);
|
||||
UpdateUserInventoryWithAttachment(sp, group, attachmentPt);
|
||||
|
||||
AttachToAgent(sp, group, attachmentPt, attachPos, silent);
|
||||
}
|
||||
@@ -320,7 +336,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
|
||||
return true;
|
||||
}
|
||||
|
||||
private void UpdateUserInventoryWithAttachment(IScenePresence sp, SceneObjectGroup group, uint attachmentPt, bool temp)
|
||||
private void UpdateUserInventoryWithAttachment(IScenePresence sp, SceneObjectGroup group, uint attachmentPt)
|
||||
{
|
||||
// Remove any previous attachments
|
||||
List<SceneObjectGroup> attachments = sp.GetAttachments(attachmentPt);
|
||||
@@ -330,22 +346,18 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
|
||||
{
|
||||
if (attachments[0].FromItemID != UUID.Zero)
|
||||
DetachSingleAttachmentToInvInternal(sp, attachments[0]);
|
||||
// Error logging commented because UUID.Zero now means temp attachment
|
||||
// else
|
||||
// m_log.WarnFormat(
|
||||
// "[ATTACHMENTS MODULE]: When detaching existing attachment {0} {1} at point {2} to make way for {3} {4} for {5}, couldn't find the associated item ID to adjust inventory attachment record!",
|
||||
// attachments[0].Name, attachments[0].LocalId, attachmentPt, group.Name, group.LocalId, sp.Name);
|
||||
else
|
||||
m_log.WarnFormat(
|
||||
"[ATTACHMENTS MODULE]: When detaching existing attachment {0} {1} at point {2} to make way for {3} {4} for {5}, couldn't find the associated item ID to adjust inventory attachment record!",
|
||||
attachments[0].Name, attachments[0].LocalId, attachmentPt, group.Name, group.LocalId, sp.Name);
|
||||
}
|
||||
|
||||
// Add the new attachment to inventory if we don't already have it.
|
||||
if (!temp)
|
||||
{
|
||||
UUID newAttachmentItemID = group.FromItemID;
|
||||
if (newAttachmentItemID == UUID.Zero)
|
||||
newAttachmentItemID = AddSceneObjectAsNewAttachmentInInv(sp, group).ID;
|
||||
UUID newAttachmentItemID = group.FromItemID;
|
||||
if (newAttachmentItemID == UUID.Zero)
|
||||
newAttachmentItemID = AddSceneObjectAsNewAttachmentInInv(sp, group).ID;
|
||||
|
||||
ShowAttachInUserInventory(sp, attachmentPt, newAttachmentItemID, group);
|
||||
}
|
||||
ShowAttachInUserInventory(sp, attachmentPt, newAttachmentItemID, group);
|
||||
}
|
||||
|
||||
public SceneObjectGroup RezSingleAttachmentFromInventory(IScenePresence sp, UUID itemID, uint AttachmentPt)
|
||||
@@ -406,11 +418,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
|
||||
}
|
||||
|
||||
public void DetachSingleAttachmentToGround(IScenePresence sp, uint soLocalId)
|
||||
{
|
||||
DetachSingleAttachmentToGround(sp, soLocalId, sp.AbsolutePosition, Quaternion.Identity);
|
||||
}
|
||||
|
||||
public void DetachSingleAttachmentToGround(IScenePresence sp, uint soLocalId, Vector3 absolutePos, Quaternion absoluteRot)
|
||||
{
|
||||
if (!Enabled)
|
||||
return;
|
||||
@@ -429,10 +436,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
|
||||
|
||||
UUID inventoryID = so.FromItemID;
|
||||
|
||||
// As per Linden spec, drop is disabled for temp attachs
|
||||
if (inventoryID == UUID.Zero)
|
||||
return;
|
||||
|
||||
// m_log.DebugFormat(
|
||||
// "[ATTACHMENTS MODULE]: In DetachSingleAttachmentToGround(), object is {0} {1}, associated item is {2}",
|
||||
// so.Name, so.LocalId, inventoryID);
|
||||
@@ -443,9 +446,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
|
||||
so.PrimCount, sp.UUID, sp.AbsolutePosition))
|
||||
return;
|
||||
|
||||
bool changed = false;
|
||||
if (inventoryID != UUID.Zero)
|
||||
changed = sp.Appearance.DetachAttachment(inventoryID);
|
||||
bool changed = sp.Appearance.DetachAttachment(inventoryID);
|
||||
if (changed && m_scene.AvatarFactory != null)
|
||||
m_scene.AvatarFactory.QueueAppearanceSave(sp.UUID);
|
||||
|
||||
@@ -453,11 +454,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
|
||||
so.FromItemID = UUID.Zero;
|
||||
|
||||
SceneObjectPart rootPart = so.RootPart;
|
||||
so.AbsolutePosition = absolutePos;
|
||||
if (absoluteRot != Quaternion.Identity)
|
||||
{
|
||||
so.UpdateGroupRotationR(absoluteRot);
|
||||
}
|
||||
so.AbsolutePosition = sp.AbsolutePosition;
|
||||
so.AttachedAvatar = UUID.Zero;
|
||||
rootPart.SetParentLocalId(0);
|
||||
so.ClearPartAttachmentData();
|
||||
@@ -554,13 +551,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
|
||||
/// <param name="saveAllScripted"></param>
|
||||
private void UpdateKnownItem(IScenePresence sp, SceneObjectGroup grp, string scriptedState)
|
||||
{
|
||||
if (grp.FromItemID == UUID.Zero)
|
||||
{
|
||||
// We can't save temp attachments
|
||||
grp.HasGroupChanged = false;
|
||||
return;
|
||||
}
|
||||
|
||||
// Saving attachments for NPCs messes them up for the real owner!
|
||||
INPCModule module = m_scene.RequestModuleInterface<INPCModule>();
|
||||
if (module != null)
|
||||
@@ -654,7 +644,15 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
|
||||
|
||||
if (!silent)
|
||||
{
|
||||
if (so.HasPrivateAttachmentPoint)
|
||||
// Killing it here will cause the client to deselect it
|
||||
// It then reappears on the avatar, deselected
|
||||
// through the full update below
|
||||
//
|
||||
if (so.IsSelected)
|
||||
{
|
||||
m_scene.SendKillObject(new List<uint> { so.RootPart.LocalId });
|
||||
}
|
||||
else if (so.HasPrivateAttachmentPoint)
|
||||
{
|
||||
// m_log.DebugFormat(
|
||||
// "[ATTACHMENTS MODULE]: Killing private HUD {0} for avatars other than {1} at attachment point {2}",
|
||||
@@ -812,7 +810,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
|
||||
// This will throw if the attachment fails
|
||||
try
|
||||
{
|
||||
AttachObjectInternal(sp, objatt, attachmentPt, false, false);
|
||||
AttachObject(sp, objatt, attachmentPt, false);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
@@ -877,9 +875,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
|
||||
|
||||
InventoryItemBase item = new InventoryItemBase(itemID, sp.UUID);
|
||||
item = m_scene.InventoryService.GetItem(item);
|
||||
if (item == null)
|
||||
return;
|
||||
|
||||
bool changed = sp.Appearance.SetAttachment((int)AttachmentPt, itemID, item.AssetID);
|
||||
if (changed && m_scene.AvatarFactory != null)
|
||||
{
|
||||
@@ -969,7 +964,15 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
|
||||
AttachmentPt &= 0x7f;
|
||||
|
||||
// Calls attach with a Zero position
|
||||
AttachObject(sp, part.ParentGroup, AttachmentPt, false, false);
|
||||
if (AttachObject(sp, part.ParentGroup, AttachmentPt, false))
|
||||
{
|
||||
// m_log.Debug(
|
||||
// "[ATTACHMENTS MODULE]: Saving avatar attachment. AgentID: " + remoteClient.AgentId
|
||||
// + ", AttachmentPoint: " + AttachmentPt);
|
||||
|
||||
// Save avatar attachment information
|
||||
m_scene.EventManager.TriggerOnAttach(objectLocalID, part.ParentGroup.FromItemID, remoteClient.AgentId);
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
@@ -985,7 +988,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
|
||||
ScenePresence sp = m_scene.GetScenePresence(remoteClient.AgentId);
|
||||
SceneObjectGroup group = m_scene.GetGroupByPrim(objectLocalID);
|
||||
|
||||
if (sp != null && group != null && group.FromItemID != UUID.Zero)
|
||||
if (sp != null && group != null)
|
||||
DetachSingleAttachmentToInv(sp, group);
|
||||
}
|
||||
|
||||
@@ -1003,7 +1006,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
|
||||
|
||||
foreach (SceneObjectGroup group in attachments)
|
||||
{
|
||||
if (group.FromItemID == itemID && group.FromItemID != UUID.Zero)
|
||||
if (group.FromItemID == itemID)
|
||||
{
|
||||
DetachSingleAttachmentToInv(sp, group);
|
||||
return;
|
||||
|
||||
@@ -62,10 +62,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests
|
||||
public class AttachmentsModuleTests : OpenSimTestCase
|
||||
{
|
||||
private AutoResetEvent m_chatEvent = new AutoResetEvent(false);
|
||||
// private OSChatMessage m_osChatMessageReceived;
|
||||
|
||||
// Used to test whether the operations have fired the attach event. Must be reset after each test.
|
||||
private int m_numberOfAttachEventsFired;
|
||||
private OSChatMessage m_osChatMessageReceived;
|
||||
|
||||
[TestFixtureSetUp]
|
||||
public void FixtureInit()
|
||||
@@ -86,7 +83,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests
|
||||
{
|
||||
// Console.WriteLine("Got chat [{0}]", oscm.Message);
|
||||
|
||||
// m_osChatMessageReceived = oscm;
|
||||
m_osChatMessageReceived = oscm;
|
||||
m_chatEvent.Set();
|
||||
}
|
||||
|
||||
@@ -102,8 +99,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests
|
||||
"attachments-test-scene", TestHelpers.ParseTail(999), 1000, 1000, config);
|
||||
SceneHelpers.SetupSceneModules(scene, config, modules.ToArray());
|
||||
|
||||
scene.EventManager.OnAttach += (localID, itemID, avatarID) => m_numberOfAttachEventsFired++;
|
||||
|
||||
return scene;
|
||||
}
|
||||
|
||||
@@ -186,8 +181,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests
|
||||
TestHelpers.InMethod();
|
||||
// TestHelpers.EnableLogging();
|
||||
|
||||
m_numberOfAttachEventsFired = 0;
|
||||
|
||||
Scene scene = CreateTestScene();
|
||||
UserAccount ua1 = UserAccountHelpers.CreateUserWithInventory(scene, 0x1);
|
||||
ScenePresence sp = SceneHelpers.AddScenePresence(scene, ua1);
|
||||
@@ -196,8 +189,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests
|
||||
|
||||
SceneObjectGroup so = SceneHelpers.AddSceneObject(scene, attName, sp.UUID);
|
||||
|
||||
m_numberOfAttachEventsFired = 0;
|
||||
scene.AttachmentsModule.AttachObject(sp, so, (uint)AttachmentPoint.Chest, false, false);
|
||||
scene.AttachmentsModule.AttachObject(sp, so, (uint)AttachmentPoint.Chest, false);
|
||||
|
||||
// Check status on scene presence
|
||||
Assert.That(sp.HasAttachments(), Is.True);
|
||||
@@ -224,8 +216,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests
|
||||
|
||||
Assert.That(scene.GetSceneObjectGroups().Count, Is.EqualTo(1));
|
||||
|
||||
// Check events
|
||||
Assert.That(m_numberOfAttachEventsFired, Is.EqualTo(1));
|
||||
// TestHelpers.DisableLogging();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -237,8 +228,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests
|
||||
TestHelpers.InMethod();
|
||||
// TestHelpers.EnableLogging();
|
||||
|
||||
m_numberOfAttachEventsFired = 0;
|
||||
|
||||
Scene scene = CreateTestScene();
|
||||
UserAccount ua1 = UserAccountHelpers.CreateUserWithInventory(scene, 0x1);
|
||||
ScenePresence sp = SceneHelpers.AddScenePresence(scene, ua1);
|
||||
@@ -254,13 +243,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests
|
||||
sp2.AbsolutePosition = new Vector3(0, 0, 0);
|
||||
sp2.HandleAgentRequestSit(sp2.ControllingClient, sp2.UUID, so.UUID, Vector3.Zero);
|
||||
|
||||
scene.AttachmentsModule.AttachObject(sp, so, (uint)AttachmentPoint.Chest, false, false);
|
||||
scene.AttachmentsModule.AttachObject(sp, so, (uint)AttachmentPoint.Chest, false);
|
||||
|
||||
Assert.That(sp.HasAttachments(), Is.False);
|
||||
Assert.That(scene.GetSceneObjectGroups().Count, Is.EqualTo(1));
|
||||
|
||||
// Check events
|
||||
Assert.That(m_numberOfAttachEventsFired, Is.EqualTo(0));
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -275,7 +261,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests
|
||||
|
||||
InventoryItemBase attItem = CreateAttachmentItem(scene, ua1.PrincipalID, "att", 0x10, 0x20);
|
||||
|
||||
m_numberOfAttachEventsFired = 0;
|
||||
scene.AttachmentsModule.RezSingleAttachmentFromInventory(
|
||||
sp, attItem.ID, (uint)AttachmentPoint.Chest);
|
||||
|
||||
@@ -295,9 +280,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests
|
||||
Assert.That(sp.Appearance.GetAttachpoint(attItem.ID), Is.EqualTo((int)AttachmentPoint.Chest));
|
||||
|
||||
Assert.That(scene.GetSceneObjectGroups().Count, Is.EqualTo(1));
|
||||
|
||||
// Check events
|
||||
Assert.That(m_numberOfAttachEventsFired, Is.EqualTo(1));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -356,8 +338,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests
|
||||
ISceneEntity so
|
||||
= scene.AttachmentsModule.RezSingleAttachmentFromInventory(
|
||||
sp, attItem.ID, (uint)AttachmentPoint.Chest);
|
||||
|
||||
m_numberOfAttachEventsFired = 0;
|
||||
scene.AttachmentsModule.DetachSingleAttachmentToGround(sp, so.LocalId);
|
||||
|
||||
// Check scene presence status
|
||||
@@ -373,9 +353,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests
|
||||
|
||||
// Check object in scene
|
||||
Assert.That(scene.GetSceneObjectGroup("att"), Is.Not.Null);
|
||||
|
||||
// Check events
|
||||
Assert.That(m_numberOfAttachEventsFired, Is.EqualTo(1));
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -392,8 +369,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests
|
||||
SceneObjectGroup so
|
||||
= (SceneObjectGroup)scene.AttachmentsModule.RezSingleAttachmentFromInventory(
|
||||
sp, attItem.ID, (uint)AttachmentPoint.Chest);
|
||||
|
||||
m_numberOfAttachEventsFired = 0;
|
||||
scene.AttachmentsModule.DetachSingleAttachmentToInv(sp, so);
|
||||
|
||||
// Check status on scene presence
|
||||
@@ -405,9 +380,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests
|
||||
Assert.That(sp.Appearance.GetAttachpoint(attItem.ID), Is.EqualTo(0));
|
||||
|
||||
Assert.That(scene.GetSceneObjectGroups().Count, Is.EqualTo(0));
|
||||
|
||||
// Check events
|
||||
Assert.That(m_numberOfAttachEventsFired, Is.EqualTo(1));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -489,14 +461,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests
|
||||
|
||||
SceneObjectGroup rezzedAtt = presence.GetAttachments()[0];
|
||||
|
||||
m_numberOfAttachEventsFired = 0;
|
||||
scene.IncomingCloseAgent(presence.UUID, false);
|
||||
|
||||
// Check that we can't retrieve this attachment from the scene.
|
||||
Assert.That(scene.GetSceneObjectGroup(rezzedAtt.UUID), Is.Null);
|
||||
|
||||
// Check events
|
||||
Assert.That(m_numberOfAttachEventsFired, Is.EqualTo(0));
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -512,8 +480,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests
|
||||
AgentCircuitData acd = SceneHelpers.GenerateAgentData(ua1.PrincipalID);
|
||||
acd.Appearance = new AvatarAppearance();
|
||||
acd.Appearance.SetAttachment((int)AttachmentPoint.Chest, attItem.ID, attItem.AssetID);
|
||||
|
||||
m_numberOfAttachEventsFired = 0;
|
||||
ScenePresence presence = SceneHelpers.AddScenePresence(scene, acd);
|
||||
|
||||
Assert.That(presence.HasAttachments(), Is.True);
|
||||
@@ -536,9 +502,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests
|
||||
Assert.That(presence.Appearance.GetAttachpoint(attItem.ID), Is.EqualTo((int)AttachmentPoint.Chest));
|
||||
|
||||
Assert.That(scene.GetSceneObjectGroups().Count, Is.EqualTo(1));
|
||||
|
||||
// Check events. We expect OnAttach to fire on login.
|
||||
Assert.That(m_numberOfAttachEventsFired, Is.EqualTo(1));
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -559,14 +522,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests
|
||||
|
||||
Vector3 newPosition = new Vector3(1, 2, 4);
|
||||
|
||||
m_numberOfAttachEventsFired = 0;
|
||||
scene.SceneGraph.UpdatePrimGroupPosition(attSo.LocalId, newPosition, sp.ControllingClient);
|
||||
|
||||
Assert.That(attSo.AbsolutePosition, Is.EqualTo(sp.AbsolutePosition));
|
||||
Assert.That(attSo.RootPart.AttachedPos, Is.EqualTo(newPosition));
|
||||
|
||||
// Check events
|
||||
Assert.That(m_numberOfAttachEventsFired, Is.EqualTo(0));
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -615,7 +574,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests
|
||||
Vector3 teleportPosition = new Vector3(10, 11, 12);
|
||||
Vector3 teleportLookAt = new Vector3(20, 21, 22);
|
||||
|
||||
m_numberOfAttachEventsFired = 0;
|
||||
sceneA.RequestTeleportLocation(
|
||||
beforeTeleportSp.ControllingClient,
|
||||
sceneB.RegionInfo.RegionHandle,
|
||||
@@ -658,9 +616,29 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests
|
||||
Assert.That(actualSceneAAttachments.Count, Is.EqualTo(0));
|
||||
|
||||
Assert.That(sceneA.GetSceneObjectGroups().Count, Is.EqualTo(0));
|
||||
|
||||
// Check events
|
||||
Assert.That(m_numberOfAttachEventsFired, Is.EqualTo(0));
|
||||
}
|
||||
|
||||
// I'm commenting this test because scene setup NEEDS InventoryService to
|
||||
// be non-null
|
||||
//[Test]
|
||||
// public void T032_CrossAttachments()
|
||||
// {
|
||||
// TestHelpers.InMethod();
|
||||
//
|
||||
// ScenePresence presence = scene.GetScenePresence(agent1);
|
||||
// ScenePresence presence2 = scene2.GetScenePresence(agent1);
|
||||
// presence2.AddAttachment(sog1);
|
||||
// presence2.AddAttachment(sog2);
|
||||
//
|
||||
// ISharedRegionModule serialiser = new SerialiserModule();
|
||||
// SceneHelpers.SetupSceneModules(scene, new IniConfigSource(), serialiser);
|
||||
// SceneHelpers.SetupSceneModules(scene2, new IniConfigSource(), serialiser);
|
||||
//
|
||||
// Assert.That(presence.HasAttachments(), Is.False, "Presence has attachments before cross");
|
||||
//
|
||||
// //Assert.That(presence2.CrossAttachmentsIntoNewRegion(region1, true), Is.True, "Cross was not successful");
|
||||
// Assert.That(presence2.HasAttachments(), Is.False, "Presence2 objects were not deleted");
|
||||
// Assert.That(presence.HasAttachments(), Is.True, "Presence has not received new objects");
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user