Compare commits
558 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
79cf77043a | ||
|
|
d8b47797d4 | ||
|
|
a7231176ba | ||
|
|
e387bc42ee | ||
|
|
7c062d5949 | ||
|
|
c72d04600f | ||
|
|
66aca6e308 | ||
|
|
68258367e7 | ||
|
|
db65440674 | ||
|
|
57c140d9a5 | ||
|
|
9860e99a53 | ||
|
|
2922c59de9 | ||
|
|
78d1eb15b9 | ||
|
|
103e21f3ed | ||
|
|
1d92dee88c | ||
|
|
ce1f31864f | ||
|
|
cb1bde70db | ||
|
|
667695b393 | ||
|
|
4999a8e926 | ||
|
|
35aa56566e | ||
|
|
3d61fb9c08 | ||
|
|
92a845e192 | ||
|
|
73e5ff9868 | ||
|
|
03ab7627bc | ||
|
|
f521cc201a | ||
|
|
d54d841571 | ||
|
|
0162fc1d4b | ||
|
|
dafe5275b5 | ||
|
|
1480c97de1 | ||
|
|
6e399e5971 | ||
|
|
02f5f46eed | ||
|
|
c8d6444cc6 | ||
|
|
7bdd4c1215 | ||
|
|
c1f1d2e5eb | ||
|
|
8e99ed7c40 | ||
|
|
e4d4ba0d0e | ||
|
|
85a3a112b3 | ||
|
|
423b9034d4 | ||
|
|
b90a1b94c0 | ||
|
|
2ca89cae1d | ||
|
|
da9e0498fe | ||
|
|
0ffe739692 | ||
|
|
552b1d52b7 | ||
|
|
d74be8f606 | ||
|
|
0998a8c4ff | ||
|
|
6c89054ab7 | ||
|
|
e31b17565a | ||
|
|
160adff017 | ||
|
|
0546231a91 | ||
|
|
5adecfe5cd | ||
|
|
6b3b9cd901 | ||
|
|
b2e1e0d123 | ||
|
|
6ce42168ff | ||
|
|
21611d3da5 | ||
|
|
f17db633bc | ||
|
|
b6e08a6a9b | ||
|
|
f1f833f0a2 | ||
|
|
2f810c71ec | ||
|
|
4890ca2765 | ||
|
|
7a05050c93 | ||
|
|
db590aa229 | ||
|
|
112349e78b | ||
|
|
196ab7e5af | ||
|
|
cf27856c26 | ||
|
|
fdf58bc890 | ||
|
|
79e0f120b2 | ||
|
|
4dd7a0e8d8 | ||
|
|
e9155e833b | ||
|
|
20760c35ae | ||
|
|
68bb990f22 | ||
|
|
23abc64a5d | ||
|
|
9bd91eba81 | ||
|
|
aca3d0f320 | ||
|
|
5a05a45dcf | ||
|
|
5f37f77734 | ||
|
|
6f0aef668a | ||
|
|
988446fb6f | ||
|
|
d40b3c9e03 | ||
|
|
32e1839f5c | ||
|
|
c3611ed4fe | ||
|
|
b69a0ea279 | ||
|
|
902e14ca5a | ||
|
|
a688ea7018 | ||
|
|
c7f2aab58b | ||
|
|
450b3e7f1b | ||
|
|
d405b71f20 | ||
|
|
7503d1a23f | ||
|
|
c1942f70c5 | ||
|
|
bd663a823b | ||
|
|
ce3aff2237 | ||
|
|
eb324ae342 | ||
|
|
d6f74f26b7 | ||
|
|
62b0580361 | ||
|
|
efc0f3dea6 | ||
|
|
42decad1ee | ||
|
|
832edd880e | ||
|
|
e83c21fea9 | ||
|
|
5aa342e570 | ||
|
|
585d128035 | ||
|
|
838414b63b | ||
|
|
d02f1e529a | ||
|
|
152fbee376 | ||
|
|
758f7464fc | ||
|
|
843810ddae | ||
|
|
afb29e1909 | ||
|
|
4a5c44aacd | ||
|
|
77262731c9 | ||
|
|
ae37c27034 | ||
|
|
f78eb6c8af | ||
|
|
e163391c90 | ||
|
|
8a146e7805 | ||
|
|
81b3081f00 | ||
|
|
0e6cdcb356 | ||
|
|
d35ff5dcd9 | ||
|
|
10d9461d99 | ||
|
|
f06f3c889c | ||
|
|
817a87330c | ||
|
|
466e92047a | ||
|
|
c13e1aac27 | ||
|
|
fbf9f0ef29 | ||
|
|
9fcebdefe0 | ||
|
|
6e8b823508 | ||
|
|
e597578c05 | ||
|
|
01e11f5161 | ||
|
|
3e027250d5 | ||
|
|
a04af02c91 | ||
|
|
8376a9a444 | ||
|
|
433ce41c61 | ||
|
|
a8e6c6c81d | ||
|
|
7fecf837db | ||
|
|
424d209516 | ||
|
|
43300d36cc | ||
|
|
5466118445 | ||
|
|
8a882f2415 | ||
|
|
324a57a53e | ||
|
|
c7705c6314 | ||
|
|
9487a34450 | ||
|
|
7b6810c286 | ||
|
|
e70f6b9d44 | ||
|
|
c580ffcfeb | ||
|
|
d6c81ac0c7 | ||
|
|
7319328a78 | ||
|
|
d50a31f7f1 | ||
|
|
123289e5d2 | ||
|
|
770e5b110f | ||
|
|
8e2a582efc | ||
|
|
f0298ba08c | ||
|
|
359020d4e6 | ||
|
|
37a3dd615f | ||
|
|
243bab823e | ||
|
|
fceedaa80c | ||
|
|
5fe5f98cdd | ||
|
|
5d99e33009 | ||
|
|
2578fd1b25 | ||
|
|
42e2cd5760 | ||
|
|
b3479bcb06 | ||
|
|
a44ca25589 | ||
|
|
4919bb8067 | ||
|
|
5616128a88 | ||
|
|
0e6dc2d968 | ||
|
|
2f6a026b5a | ||
|
|
e708b309af | ||
|
|
9fe56711ec | ||
|
|
f304a881b2 | ||
|
|
a7d635967e | ||
|
|
67f3b24ae1 | ||
|
|
3aadd18418 | ||
|
|
db227ab5e9 | ||
|
|
67974184c9 | ||
|
|
621dafa222 | ||
|
|
2064a3caed | ||
|
|
c345a13dea | ||
|
|
9f61683603 | ||
|
|
0ccd0dd45b | ||
|
|
ffbeda5c38 | ||
|
|
bcf2a5f929 | ||
|
|
8dfa6c3b11 | ||
|
|
423d8c88e3 | ||
|
|
bcfeeadebd | ||
|
|
f0ee56bf70 | ||
|
|
4590eb535e | ||
|
|
b9784df0e8 | ||
|
|
feabd5e537 | ||
|
|
57b5db3467 | ||
|
|
ac9f16365c | ||
|
|
4ad8dca196 | ||
|
|
c2bfe69f33 | ||
|
|
2dda244390 | ||
|
|
58d10aa79a | ||
|
|
8c1ce17bdb | ||
|
|
dbf79e9716 | ||
|
|
7fbf7f0675 | ||
|
|
b08f456a13 | ||
|
|
7cff935649 | ||
|
|
5f124e3420 | ||
|
|
945ee5b500 | ||
|
|
6685756f30 | ||
|
|
990cf3e56e | ||
|
|
29bdac8a66 | ||
|
|
1a4b444c24 | ||
|
|
a221e2d3db | ||
|
|
f32e361174 | ||
|
|
b9b86468fc | ||
|
|
ced4b7c528 | ||
|
|
717dad94c3 | ||
|
|
6594702c8a | ||
|
|
bea24c55d4 | ||
|
|
e6f0affac6 | ||
|
|
bd2f10f350 | ||
|
|
997caae560 | ||
|
|
e87b380280 | ||
|
|
a6828818ad | ||
|
|
ce87e5fd87 | ||
|
|
335753e92f | ||
|
|
82da0f77b7 | ||
|
|
e40f507dae | ||
|
|
98b6b58598 | ||
|
|
bc74ad52b2 | ||
|
|
dd45ff7a0c | ||
|
|
01cc050a2d | ||
|
|
5eb13c4cb3 | ||
|
|
894fff9cfb | ||
|
|
b83c999cf4 | ||
|
|
63d36c5546 | ||
|
|
dde182e1cc | ||
|
|
df59617648 | ||
|
|
efd33e8563 | ||
|
|
748afbd7f5 | ||
|
|
d66548acde | ||
|
|
8d4c21c3e2 | ||
|
|
0507750245 | ||
|
|
e6f926607b | ||
|
|
6761b1ab0c | ||
|
|
e443815405 | ||
|
|
2ac52e9274 | ||
|
|
c5b3697eaa | ||
|
|
b8cac979d1 | ||
|
|
dee6701318 | ||
|
|
534c3c1c5c | ||
|
|
7dab1682a0 | ||
|
|
db06b2f1ad | ||
|
|
7ded9a2c0f | ||
|
|
4883c1d80f | ||
|
|
076fe94388 | ||
|
|
45bd03ad2b | ||
|
|
74b66b8bdb | ||
|
|
f725245040 | ||
|
|
83c14a5ce3 | ||
|
|
73fb461607 | ||
|
|
2ded4a4956 | ||
|
|
c76667b47c | ||
|
|
df729b4e76 | ||
|
|
00e932933f | ||
|
|
dc957ba4b3 | ||
|
|
8b14a70473 | ||
|
|
aae0d872de | ||
|
|
813ccf39b7 | ||
|
|
3b39c985bf | ||
|
|
0a7d3ebf2d | ||
|
|
086261de20 | ||
|
|
d03b8ac712 | ||
|
|
0eddd6e5ee | ||
|
|
df287a1603 | ||
|
|
75c46ffb1e | ||
|
|
8dd08dfaad | ||
|
|
c38bb9d025 | ||
|
|
e8654343c1 | ||
|
|
32a6cc851f | ||
|
|
a08105338e | ||
|
|
8d1fa1efd1 | ||
|
|
eed17c716f | ||
|
|
c667858d22 | ||
|
|
66280e982f | ||
|
|
6802f0acb8 | ||
|
|
7a2c8f688f | ||
|
|
bf15a31a57 | ||
|
|
8137562074 | ||
|
|
7b59f4d76d | ||
|
|
68c12024fe | ||
|
|
258efc97af | ||
|
|
10ac92f6a0 | ||
|
|
1940dea666 | ||
|
|
9b5844ed26 | ||
|
|
125e84431e | ||
|
|
b5bc45f7a7 | ||
|
|
646ae05206 | ||
|
|
37832b9c87 | ||
|
|
605391fc3a | ||
|
|
a9428458d7 | ||
|
|
d1a9c122f0 | ||
|
|
f5b5cb46c1 | ||
|
|
a519de3dfc | ||
|
|
b258108d17 | ||
|
|
c1e7f951a1 | ||
|
|
048b2670c5 | ||
|
|
0fe8b426d8 | ||
|
|
2fa28d6ce3 | ||
|
|
72332de1ad | ||
|
|
1d14fee2c7 | ||
|
|
5f62c49450 | ||
|
|
e6dbd8b477 | ||
|
|
b392cd9d2d | ||
|
|
f7e899c6b7 | ||
|
|
933b1e97f9 | ||
|
|
8db177e76f | ||
|
|
2a5f01bfd2 | ||
|
|
3fbac63c3b | ||
|
|
c3d562ce61 | ||
|
|
fe1a79a878 | ||
|
|
7a6e51552e | ||
|
|
9c2bf18565 | ||
|
|
20cebb7770 | ||
|
|
5cd4fdb8ff | ||
|
|
07b7d947c8 | ||
|
|
1e0789b06b | ||
|
|
793f94027d | ||
|
|
10c04e3d71 | ||
|
|
eeffce3e44 | ||
|
|
d9f0cdee5c | ||
|
|
e2ecd04e9a | ||
|
|
bdbf95d1ca | ||
|
|
b1cd284b5d | ||
|
|
ace2f0bdcb | ||
|
|
0ddd30c1d8 | ||
|
|
4d91349a92 | ||
|
|
d3a842852f | ||
|
|
fddc9eac26 | ||
|
|
b1f64a2dd0 | ||
|
|
4907534173 | ||
|
|
a5fc6752f6 | ||
|
|
55fbe537c7 | ||
|
|
fc736b2f62 | ||
|
|
e30926e8b3 | ||
|
|
def073f6c8 | ||
|
|
02be06a439 | ||
|
|
1b05e71f54 | ||
|
|
a5a78ef165 | ||
|
|
c971a55f48 | ||
|
|
4ef49f70cb | ||
|
|
236e80f5c3 | ||
|
|
e55ce0cdf4 | ||
|
|
f2e3787424 | ||
|
|
fb24eab5bc | ||
|
|
8199a62091 | ||
|
|
06c232f20f | ||
|
|
b1acf760d1 | ||
|
|
21e5c84ba6 | ||
|
|
b002256496 | ||
|
|
5c618d2986 | ||
|
|
69af836523 | ||
|
|
3f047f53a0 | ||
|
|
6fbdb47f5b | ||
|
|
d58864c86c | ||
|
|
25ff65ae05 | ||
|
|
27e0684cbc | ||
|
|
6d31514719 | ||
|
|
04a78df6f7 | ||
|
|
7de334ccbd | ||
|
|
ef0b17113d | ||
|
|
b1e8b76d59 | ||
|
|
55c2c08e3b | ||
|
|
d98b77a229 | ||
|
|
4e3b0129fe | ||
|
|
21c42357c1 | ||
|
|
ea7f84f0ff | ||
|
|
a91e68c609 | ||
|
|
abd2a5c76c | ||
|
|
03f67418b2 | ||
|
|
de69662138 | ||
|
|
40c90fdca6 | ||
|
|
1af18b201e | ||
|
|
85dc3c6e2a | ||
|
|
1c22b2a531 | ||
|
|
2aab323e56 | ||
|
|
4d6e3b1133 | ||
|
|
2d0006014c | ||
|
|
9e5c81b4cd | ||
|
|
d9c1624327 | ||
|
|
910050b382 | ||
|
|
08b0d1fdfb | ||
|
|
b4a4190f53 | ||
|
|
5aa4ea9d71 | ||
|
|
72a5f17ed1 | ||
|
|
eb0a516c32 | ||
|
|
7a470457c8 | ||
|
|
991c8d08c6 | ||
|
|
d7474630b0 | ||
|
|
49c5f5e70c | ||
|
|
07dc6b3ec0 | ||
|
|
4d20dfc65a | ||
|
|
4c4925d758 | ||
|
|
e452d141ac | ||
|
|
743091fe94 | ||
|
|
eed9169708 | ||
|
|
0ed19f6ed9 | ||
|
|
a80f14a705 | ||
|
|
0e886b85f1 | ||
|
|
032c981cbd | ||
|
|
2f56acf6ea | ||
|
|
d9b1fce36e | ||
|
|
d9c7abfcd1 | ||
|
|
264cc7ce34 | ||
|
|
d23667eaf9 | ||
|
|
6f90f98ab3 | ||
|
|
6b3f7be469 | ||
|
|
9256cfe326 | ||
|
|
6538ab9694 | ||
|
|
b4a1d3b496 | ||
|
|
58a5d4dab6 | ||
|
|
337e2d6cb1 | ||
|
|
7a58d49693 | ||
|
|
51fea3fd6b | ||
|
|
a635f3f284 | ||
|
|
3cc7afc511 | ||
|
|
e03d15cff6 | ||
|
|
c55507857b | ||
|
|
b28fd6a0a6 | ||
|
|
9ce83e46e4 | ||
|
|
9f954d0c41 | ||
|
|
bca88d85a9 | ||
|
|
0a8bc87903 | ||
|
|
1ea930749a | ||
|
|
797b5d005a | ||
|
|
6a2c1801de | ||
|
|
b868072ac0 | ||
|
|
81a6391633 | ||
|
|
1b39a376fc | ||
|
|
3727520d7a | ||
|
|
ff41bede4a | ||
|
|
530fe86a8a | ||
|
|
e5a16c97fb | ||
|
|
87657699ac | ||
|
|
3a17aeceef | ||
|
|
aa20cf751c | ||
|
|
05b84d661e | ||
|
|
edb40ba944 | ||
|
|
752d871e44 | ||
|
|
5670b03208 | ||
|
|
2b510f2ced | ||
|
|
8ce5e0122a | ||
|
|
d4b7a24ffb | ||
|
|
9851848d12 | ||
|
|
29f80da12d | ||
|
|
e0a8c9ce12 | ||
|
|
43273fa24f | ||
|
|
bf4f218e0e | ||
|
|
11ddb82aa1 | ||
|
|
6299fd8dd1 | ||
|
|
1c95722b70 | ||
|
|
1e84dfe8c9 | ||
|
|
ea5926b946 | ||
|
|
51df696e64 | ||
|
|
cca0f4e607 | ||
|
|
343dd5350d | ||
|
|
1d62ad9080 | ||
|
|
49db05a1a8 | ||
|
|
adf3752eb6 | ||
|
|
b69889220f | ||
|
|
9178068d57 | ||
|
|
465814f0e5 | ||
|
|
8a930cfae8 | ||
|
|
84d056a07a | ||
|
|
0b743c6495 | ||
|
|
e832126e3d | ||
|
|
df3e69d425 | ||
|
|
06db60e46b | ||
|
|
5f0dfd7b57 | ||
|
|
5308cc6c92 | ||
|
|
8b74d85b4e | ||
|
|
66e2a98068 | ||
|
|
511860c408 | ||
|
|
61ce621b9d | ||
|
|
34a17490d5 | ||
|
|
d4de788fb3 | ||
|
|
3ca00ad4bb | ||
|
|
c10638ae02 | ||
|
|
674b7aa079 | ||
|
|
08612d2dad | ||
|
|
f885e5ba16 | ||
|
|
4262ac57e7 | ||
|
|
1f4f739578 | ||
|
|
95a9325b06 | ||
|
|
26c84cbb46 | ||
|
|
d06d1c4dd6 | ||
|
|
1a2ce55c44 | ||
|
|
c78ed0b731 | ||
|
|
8cb3c7a736 | ||
|
|
a8768e1b8d | ||
|
|
0f67c653cd | ||
|
|
34e1713554 | ||
|
|
f464a7e992 | ||
|
|
fd515e128f | ||
|
|
f87d699757 | ||
|
|
3903caa517 | ||
|
|
26665acd7a | ||
|
|
cb3ae3cc48 | ||
|
|
d3da948652 | ||
|
|
f38d763dd0 | ||
|
|
9b73df3a10 | ||
|
|
eecd1324c3 | ||
|
|
fc8566281f | ||
|
|
83503ed529 | ||
|
|
047c9971c2 | ||
|
|
9925365091 | ||
|
|
52ae6745f3 | ||
|
|
d89a8c6708 | ||
|
|
eadd7bdff7 | ||
|
|
8d133e52c9 | ||
|
|
05347db242 | ||
|
|
f5fb8b81d8 | ||
|
|
7ddfd275fc | ||
|
|
fbcea660df | ||
|
|
b72df30151 | ||
|
|
b5c3d157cb | ||
|
|
5531b329fe | ||
|
|
46a14dc8da | ||
|
|
8bb1cf747d | ||
|
|
6447fae297 | ||
|
|
f218605904 | ||
|
|
823602d69a | ||
|
|
f7cb87f6e4 | ||
|
|
b8a6b6d3c1 | ||
|
|
121ae48f17 | ||
|
|
94a9a53f9f | ||
|
|
3ade7afc34 | ||
|
|
3b96981528 | ||
|
|
80254a2a8a | ||
|
|
2fca7b9989 | ||
|
|
dd7db65ded | ||
|
|
5716cc6a12 | ||
|
|
983947d8f7 | ||
|
|
18b74627e5 | ||
|
|
1d34111f58 | ||
|
|
a280a6e34e | ||
|
|
f83c7839dc | ||
|
|
781ff605e0 | ||
|
|
abf61a464b | ||
|
|
3464cabdb7 | ||
|
|
ce04c54904 | ||
|
|
2a3dc1d341 | ||
|
|
aa6fced881 | ||
|
|
2a8a073cd6 | ||
|
|
68885c933b | ||
|
|
3b6f2c81dd | ||
|
|
3b5e9933ef | ||
|
|
52cd010067 | ||
|
|
41af1a1793 | ||
|
|
93ad6e73cf | ||
|
|
7a9c591f99 | ||
|
|
409f0d4096 | ||
|
|
7ae53fdb0a | ||
|
|
2a73429fee | ||
|
|
7945fe64a9 | ||
|
|
c5f90d87b5 | ||
|
|
6d018e8646 | ||
|
|
d58c0bbc2d | ||
|
|
775f18c4bd | ||
|
|
54f6e52a06 |
@@ -706,6 +706,21 @@ namespace OpenSim.Groups
|
||||
|
||||
m_groupData.SetAgentActiveGroup(GetRequestingAgentIDStr(remoteClient), GetRequestingAgentIDStr(remoteClient), groupID);
|
||||
|
||||
ScenePresence sp = ((Scene)(remoteClient.Scene)).GetScenePresence(remoteClient.AgentId);
|
||||
List<SceneObjectGroup> attachments = sp.GetAttachments();
|
||||
|
||||
foreach(SceneObjectGroup so in attachments)
|
||||
{
|
||||
//m_log.DebugFormat("[GROUPS MODULE]: Setting new group and checking scripts to run in attachment {0} for {1}", so.Name, so.OwnerID);
|
||||
so.SetGroup(groupID, remoteClient);
|
||||
if (so.ContainsScripts() && so.RunningScriptCount() == 0)
|
||||
{
|
||||
so.RootPart.ParentGroup.CreateScriptInstances(
|
||||
0, false, sp.Scene.DefaultScriptEngine, sp.GetStateSource());
|
||||
so.ResumeScripts();
|
||||
}
|
||||
}
|
||||
|
||||
// Changing active group changes title, active powers, all kinds of things
|
||||
// anyone who is in any region that can see this client, should probably be
|
||||
// updated with new group info. At a minimum, they should get ScenePresence
|
||||
@@ -981,11 +996,16 @@ namespace OpenSim.Groups
|
||||
{
|
||||
if (m_debugEnabled) m_log.DebugFormat("[Groups]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
|
||||
|
||||
m_groupData.SetAgentActiveGroupRole(GetRequestingAgentIDStr(remoteClient), GetRequestingAgentIDStr(remoteClient), groupID, titleRoleID);
|
||||
UUID agentID = remoteClient.AgentId;
|
||||
m_groupData.SetAgentActiveGroupRole(agentID.ToString(), agentID.ToString(), groupID, titleRoleID);
|
||||
|
||||
// TODO: Not sure what all is needed here, but if the active group role change is for the group
|
||||
// the client currently has set active, then we need to do a scene presence update too
|
||||
// if (m_groupData.GetAgentActiveMembership(GetRequestingAgentID(remoteClient)).GroupID == GroupID)
|
||||
// If the active group role change is for the group
|
||||
// the client currently has set active, then we need to
|
||||
// set the active group again for the tag to update
|
||||
if (m_groupData.GetAgentActiveMembership(agentID.ToString(), agentID.ToString()).GroupID == groupID)
|
||||
{
|
||||
m_groupData.SetAgentActiveGroup(agentID.ToString(), agentID.ToString(), groupID);
|
||||
}
|
||||
|
||||
SendDataUpdate(remoteClient, true);
|
||||
}
|
||||
|
||||
@@ -84,3 +84,14 @@ CREATE TABLE IF NOT EXISTS `usersettings` (
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
|
||||
commit;
|
||||
|
||||
|
||||
:VERSION 6 # Unicode profiles
|
||||
|
||||
ALTER TABLE classifieds CONVERT TO CHARACTER SET utf8;
|
||||
ALTER TABLE usernotes CONVERT TO CHARACTER SET utf8;
|
||||
ALTER TABLE userpicks CONVERT TO CHARACTER SET utf8;
|
||||
ALTER TABLE userprofile CONVERT TO CHARACTER SET utf8;
|
||||
ALTER TABLE userdata CONVERT TO CHARACTER SET utf8;
|
||||
|
||||
commit;
|
||||
|
||||
@@ -63,7 +63,7 @@ namespace OpenSim.Framework
|
||||
private uint _flags = (uint)ParcelFlags.AllowFly | (uint)ParcelFlags.AllowLandmark |
|
||||
(uint)ParcelFlags.AllowAPrimitiveEntry |
|
||||
(uint)ParcelFlags.AllowDeedToGroup |
|
||||
(uint)ParcelFlags.CreateObjects | (uint)ParcelFlags.AllowOtherScripts |
|
||||
(uint)ParcelFlags.AllowOtherScripts |
|
||||
(uint)ParcelFlags.AllowVoiceChat;
|
||||
|
||||
private byte _landingType = (byte)OpenMetaverse.LandingType.Direct;
|
||||
@@ -84,7 +84,7 @@ namespace OpenSim.Framework
|
||||
private UUID _snapshotID = UUID.Zero;
|
||||
private Vector3 _userLocation = new();
|
||||
private Vector3 _userLookAt = new();
|
||||
private int _otherCleanTime = 0;
|
||||
private int _otherCleanTime = 5;
|
||||
private string _mediaType = "none/none";
|
||||
private string _mediaDescription = "";
|
||||
private int _mediaHeight = 0;
|
||||
|
||||
@@ -240,10 +240,12 @@ namespace OpenSim.Framework
|
||||
// m_log.DebugFormat("[OUTBOUND URL FILTER]: Found [{0}] in blacklist for {1}", url, Name);
|
||||
|
||||
// Check blacklist exceptions
|
||||
allowed
|
||||
= OutboundUrlFilter.IsInNetwork(
|
||||
addr, url.Port, m_blacklistExceptionNetworks, m_blacklistExceptionEndPoints, Name);
|
||||
|
||||
if (!url.AbsolutePath.StartsWith("/lslhttp/"))
|
||||
{
|
||||
allowed
|
||||
= OutboundUrlFilter.IsInNetwork(
|
||||
addr, url.Port, m_blacklistExceptionNetworks, m_blacklistExceptionEndPoints, Name);
|
||||
}
|
||||
// if (allowed)
|
||||
// m_log.DebugFormat("[OUTBOUND URL FILTER]: Found [{0}] in whitelist for {1}", url, Name);
|
||||
}
|
||||
|
||||
@@ -111,10 +111,10 @@ namespace OpenSim.Framework
|
||||
/// <value>
|
||||
/// These appear to be terrain textures that are shipped with the client.
|
||||
/// </value>
|
||||
public static readonly UUID DEFAULT_TERRAIN_TEXTURE_1 = new("b8d3965a-ad78-bf43-699b-bff8eca6c975");
|
||||
public static readonly UUID DEFAULT_TERRAIN_TEXTURE_2 = new("abb783e6-3e93-26c0-248a-247666855da3");
|
||||
public static readonly UUID DEFAULT_TERRAIN_TEXTURE_3 = new("179cdabd-398a-9b6b-1391-4dc333ba321f");
|
||||
public static readonly UUID DEFAULT_TERRAIN_TEXTURE_4 = new("beb169c7-11ea-fff2-efe5-0f24dc881df2");
|
||||
public static readonly UUID DEFAULT_TERRAIN_TEXTURE_1 = new("0bc58228-74a0-7e83-89bc-5c23464bcec5");
|
||||
public static readonly UUID DEFAULT_TERRAIN_TEXTURE_2 = new("63338ede-0037-c4fd-855b-015d77112fc8");
|
||||
public static readonly UUID DEFAULT_TERRAIN_TEXTURE_3 = new("303cd381-8560-7579-23f1-f0a880799740");
|
||||
public static readonly UUID DEFAULT_TERRAIN_TEXTURE_4 = new("53a2f406-4895-1d13-d541-d2e3b86bc19c");
|
||||
|
||||
public static readonly UUID DEFAULT_TERRAIN_PBR_1 = new("b8d3965a-ad78-bf43-699b-bff8eca6c975");
|
||||
public static readonly UUID DEFAULT_TERRAIN_PBR_2 = new("abb783e6-3e93-26c0-248a-247666855da3");
|
||||
|
||||
@@ -2299,7 +2299,7 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||
}
|
||||
if (httpRequest.QueryFlags.Contains("about"))
|
||||
{
|
||||
httpResponse.Redirect("http://opensimulator.org/wiki/0.9.3.1_Release");
|
||||
httpResponse.Redirect("https://github.com/lickx/opensim-lickx");
|
||||
return;
|
||||
}
|
||||
if (!httpRequest.QueryAsDictionary.TryGetValue("method", out string method) || string.IsNullOrWhiteSpace(method))
|
||||
|
||||
@@ -53,11 +53,11 @@ namespace OpenSim
|
||||
|
||||
public static string GetVersionString(string versionNumber, Flavour flavour)
|
||||
{
|
||||
string versionString = $"OpenSim {versionNumber} Nessie {flavour}";
|
||||
string versionString = $"OpenSim/lickx {versionNumber} {flavour}";
|
||||
return versionString.PadRight(VERSIONINFO_VERSION_LENGTH);
|
||||
}
|
||||
|
||||
public const int VERSIONINFO_VERSION_LENGTH = 27;
|
||||
public const int VERSIONINFO_VERSION_LENGTH = 26;
|
||||
|
||||
/// <value>
|
||||
/// This is the external interface version. It is separate from the OpenSimulator project version.
|
||||
|
||||
@@ -38,6 +38,7 @@ using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Timers;
|
||||
using System.Net;
|
||||
using System.Runtime.InteropServices;
|
||||
using log4net;
|
||||
using NDesk.Options;
|
||||
using Nini.Config;
|
||||
@@ -79,6 +80,7 @@ namespace OpenSim
|
||||
private string m_timedScript = "disabled";
|
||||
private int m_timeInterval = 1200;
|
||||
private System.Timers.Timer m_scriptTimer;
|
||||
private PosixSignalRegistration m_signalReg;
|
||||
|
||||
public OpenSim(IConfigSource configSource) : base(configSource)
|
||||
{
|
||||
@@ -132,6 +134,12 @@ namespace OpenSim
|
||||
m_log.Info("[OPENSIM MAIN]: Using async_call_method " + Util.FireAndForgetMethod);
|
||||
|
||||
m_log.InfoFormat("[OPENSIM MAIN] Running GC in {0} mode", GCSettings.IsServerGC ? "server":"workstation");
|
||||
|
||||
m_signalReg = PosixSignalRegistration.Create(PosixSignal.SIGTERM, context =>
|
||||
{
|
||||
m_log.Info("Received SIGTERM, shutting down");
|
||||
MainConsole.Instance.RunCommand("shutdown");
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -299,7 +307,7 @@ namespace OpenSim
|
||||
+ " --mergeReplaceObjects if scene as a object with same id, replace it\n"
|
||||
+ " without this option, skip loading that object\n"
|
||||
+ "--skip-assets will load the OAR but ignore the assets it contains.\n"
|
||||
+ "--default-user will use this user for any objects with an owner whose UUID is not found in the grid.\n"
|
||||
+ "--default-user will use this user for any objects and parcels with an owner whose UUID is not found in the grid.\n"
|
||||
+ "--no-objects suppresses the addition of any objects (good for loading only the terrain).\n"
|
||||
+ "--rotation specified rotation to be applied to the oar. Specified in degrees.\n"
|
||||
+ "--bounding-origin will only place objects that after displacement and rotation fall within the bounding cube who's position starts at <x,y,z>. Defaults to <0,0,0>.\n"
|
||||
@@ -317,7 +325,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>] [--all] [--tenant=<uuid>] [<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"
|
||||
@@ -327,6 +335,7 @@ 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"
|
||||
+ "--tenant=<uuid> only save objects owned by tenant with uuid.\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.",
|
||||
@@ -1516,5 +1525,7 @@ namespace OpenSim
|
||||
result = result.TrimEnd(' ');
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -381,7 +381,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
|
||||
ad.AttachmentObjectStates = null;
|
||||
|
||||
if (attachments.Count > 0)
|
||||
m_scene.IncomingAttechments(sp, attachments);
|
||||
m_scene.IncomingAttachments(sp, attachments);
|
||||
else
|
||||
sp.GotAttachmentsData = true;
|
||||
}
|
||||
|
||||
@@ -263,10 +263,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
|
||||
{
|
||||
//m_log.DebugFormat("[HGFRIENDS MODULE]: Entering StatusNotify for {0}", userID);
|
||||
|
||||
// First, let's divide the friends on a per-domain basis
|
||||
List<FriendInfo> locallst = new(friendList.Count);
|
||||
List<UUID> hglst = new();
|
||||
|
||||
Dictionary<string, List<FriendInfo>> friendsPerDomain = new Dictionary<string, List<FriendInfo>>();
|
||||
foreach (FriendInfo friend in friendList)
|
||||
{
|
||||
if (UUID.TryParse(friend.Friend, out UUID friendID))
|
||||
@@ -284,12 +283,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
|
||||
if (LocalStatusNotification(userID, friendID, online))
|
||||
continue;
|
||||
|
||||
if (!friendsPerDomain.TryGetValue(url, out List<FriendInfo> lst))
|
||||
{
|
||||
lst = new List<FriendInfo>();
|
||||
friendsPerDomain[url] = lst;
|
||||
}
|
||||
lst.Add(friend);
|
||||
hglst.Add(friendID);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -299,8 +293,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
|
||||
if (locallst.Count > 0)
|
||||
base.StatusNotify(locallst, userID, online);
|
||||
|
||||
if(friendsPerDomain.Count > 0)
|
||||
m_StatusNotifier.Notify(userID, friendsPerDomain, online);
|
||||
if(hglst.Count > 0)
|
||||
m_StatusNotifier.Notify(userID, hglst, online);
|
||||
|
||||
//m_log.DebugFormat("[HGFRIENDS MODULE]: Exiting StatusNotify for {0}", userID);
|
||||
}
|
||||
|
||||
@@ -26,6 +26,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
|
||||
m_FriendsModule = friendsModule;
|
||||
}
|
||||
|
||||
// Currently unused
|
||||
/*
|
||||
public void Notify(UUID userID, Dictionary<string, List<FriendInfo>> friendsPerDomain, bool online)
|
||||
{
|
||||
if(m_FriendsModule is null)
|
||||
@@ -33,42 +35,85 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
|
||||
|
||||
foreach (KeyValuePair<string, List<FriendInfo>> kvp in friendsPerDomain)
|
||||
{
|
||||
// For the others, call the user agent service
|
||||
List<string> ids = new(kvp.Value.Count);
|
||||
foreach (FriendInfo f in kvp.Value)
|
||||
ids.Add(f.Friend);
|
||||
|
||||
if (ids.Count == 0)
|
||||
if (kvp.Value.Count == 0)
|
||||
continue; // no one to notify. caller don't do this
|
||||
|
||||
//m_log.DebugFormat("[HG STATUS NOTIFIER]: Notifying {0} friends in {1}", ids.Count, kvp.Key);
|
||||
// ASSUMPTION: we assume that all users for one home domain
|
||||
// have exactly the same set of service URLs.
|
||||
// If this is ever not true, we need to change this.
|
||||
if (Util.ParseUniversalUserIdentifier(ids[0], out UUID friendID))
|
||||
FriendInfo id0Info = kvp.Value[0];
|
||||
string id0 = id0Info.Friend; // the hgname of the first friend
|
||||
if (Util.ParseUniversalUserIdentifier(id0, out UUID firstID))
|
||||
{
|
||||
string friendsServerURI = m_FriendsModule.UserManagementModule.GetUserServerURL(friendID, "FriendsServerURI");
|
||||
if (!string.IsNullOrEmpty(friendsServerURI))
|
||||
string friendsServerURI = m_FriendsModule.UserManagementModule.GetUserServerURL(firstID, "FriendsServerURI");
|
||||
if (string.IsNullOrEmpty(friendsServerURI))
|
||||
continue;
|
||||
|
||||
HGFriendsServicesConnector fConn = new(friendsServerURI);
|
||||
|
||||
List<string> ids = new(kvp.Value.Count);
|
||||
foreach (FriendInfo f in kvp.Value)
|
||||
{
|
||||
HGFriendsServicesConnector fConn = new(friendsServerURI);
|
||||
if (Util.ParseUniversalUserIdentifier(f.Friend, out UUID friendID))
|
||||
ids.Add(friendID.ToString());
|
||||
}
|
||||
if (ids.Count == 0)
|
||||
continue;
|
||||
|
||||
List<UUID> friendsOnline = fConn.StatusNotification(ids, userID, online);
|
||||
// Note: first argument in StatusNotification needs to be
|
||||
// a List<string> of UUIDs, not a List<string> of hgnames!
|
||||
List<UUID> friendsOnline = fConn.StatusNotification(ids, userID, online);
|
||||
if (friendsOnline.Count == 0)
|
||||
continue;
|
||||
|
||||
if (friendsOnline.Count > 0)
|
||||
IClientAPI client = m_FriendsModule.LocateClientObject(userID);
|
||||
if(client is not null)
|
||||
{
|
||||
m_log.DebugFormat("[HG STATUS NOTIFIER]: Notifying {0} friends in {1}", friendsOnline.Count, kvp.Key);
|
||||
m_FriendsModule.CacheFriendsOnline(userID, friendsOnline, online);
|
||||
if(online)
|
||||
client?.SendAgentOnline(friendsOnline.ToArray());
|
||||
else
|
||||
client?.SendAgentOffline(friendsOnline.ToArray());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
public void Notify(UUID userID, List<UUID>friendIds, bool online)
|
||||
{
|
||||
if(m_FriendsModule is null)
|
||||
return;
|
||||
|
||||
if (friendIds.Count == 0)
|
||||
return; // no one to notify. caller don't do this
|
||||
|
||||
m_log.DebugFormat("[HG STATUS NOTIFIER]: Notifying {0} foreign friends", friendIds.Count);
|
||||
foreach (UUID friendID in friendIds)
|
||||
{
|
||||
string friendsServerURI = m_FriendsModule.UserManagementModule.GetUserServerURL(friendID, "FriendsServerURI");
|
||||
if (!string.IsNullOrEmpty(friendsServerURI))
|
||||
{
|
||||
HGFriendsServicesConnector fConn = new(friendsServerURI);
|
||||
|
||||
List<UUID> friendsOnline = fConn.StatusNotification(new List<string> { friendID.ToString() }, userID, online);
|
||||
|
||||
if (friendsOnline.Count > 0)
|
||||
{
|
||||
IClientAPI client = m_FriendsModule.LocateClientObject(userID);
|
||||
if(client is not null)
|
||||
{
|
||||
IClientAPI client = m_FriendsModule.LocateClientObject(userID);
|
||||
if(client is not null)
|
||||
{
|
||||
m_FriendsModule.CacheFriendsOnline(userID, friendsOnline, online);
|
||||
if(online)
|
||||
client?.SendAgentOnline(friendsOnline.ToArray());
|
||||
else
|
||||
client?.SendAgentOffline(friendsOnline.ToArray());
|
||||
}
|
||||
m_FriendsModule.CacheFriendsOnline(userID, friendsOnline, online);
|
||||
if(online)
|
||||
client?.SendAgentOnline(friendsOnline.ToArray());
|
||||
else
|
||||
client?.SendAgentOffline(friendsOnline.ToArray());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1319,6 +1319,13 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
|
||||
protected virtual bool CreateAgent(ScenePresence sp, GridRegion reg, GridRegion finalDestination, AgentCircuitData agentCircuit, uint teleportFlags, EntityTransferContext ctx, out string reason, out bool logout)
|
||||
{
|
||||
if (sp.GotAttachmentsData == false)
|
||||
{
|
||||
logout = false;
|
||||
reason = "Cannot leave region yet, attachments are still loading";
|
||||
return false;
|
||||
}
|
||||
|
||||
GridRegion source = new(m_sceneRegionInfo)
|
||||
{
|
||||
RawServerURI = m_thisGridInfo.GateKeeperURL
|
||||
@@ -2854,7 +2861,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
return true;
|
||||
}
|
||||
|
||||
private int GetStateSource(SceneObjectGroup sog)
|
||||
public int GetStateSource(SceneObjectGroup sog)
|
||||
{
|
||||
ScenePresence sp = m_scene.GetScenePresence(sog.OwnerID);
|
||||
|
||||
|
||||
@@ -258,6 +258,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
protected override bool CreateAgent(ScenePresence sp, GridRegion reg, GridRegion finalDestination, AgentCircuitData agentCircuit, uint teleportFlags, EntityTransferContext ctx, out string reason, out bool logout)
|
||||
{
|
||||
m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: CreateAgent {0} {1}", reg.ServerURI, finalDestination.ServerURI);
|
||||
|
||||
reason = string.Empty;
|
||||
logout = false;
|
||||
int flags = Scene.GridService.GetRegionFlags(m_sceneRegionInfo.ScopeID, reg.RegionID);
|
||||
@@ -651,17 +652,15 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
if (OwnerID.IsZero())
|
||||
{
|
||||
m_log.DebugFormat(
|
||||
"[HG TRANSFER MODULE]: Denied object {0}({1}) entry into {2} because ownerID is zero",
|
||||
"[HG ENTITY TRANSFER MODULE]: Denied object {0}({1}) entry into {2} because ownerID is zero",
|
||||
so.Name, so.UUID, m_sceneName);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (m_sceneRegionInfo.EstateSettings.IsBanned(OwnerID))
|
||||
if (!m_scene.Permissions.IsAdministrator(so.OwnerID) && m_sceneRegionInfo.EstateSettings.IsBanned(OwnerID))
|
||||
{
|
||||
m_log.DebugFormat(
|
||||
"[HG TRANSFER MODULE]: Denied prim crossing of {0} {1} into {2} for banned avatar {3}",
|
||||
so.Name, so.UUID, m_sceneName, so.OwnerID);
|
||||
|
||||
$"[HG ENTITY TRANSFER MODULE]: Denied {so.Name} {so.UUID} into { m_sceneName} of banned owner {so.OwnerID}");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -676,8 +675,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
if (m_scene.GetScenePresence(OwnerID) == null)
|
||||
{
|
||||
m_log.DebugFormat(
|
||||
"[HG TRANSFER MODULE]: Denied attachment {0}({1}) owner {2} not in region {3}",
|
||||
so.Name, so.UUID, OwnerID, m_sceneName);
|
||||
$"[HG ENTITY TRANSFER MODULE]: Denied attachment {so.Name}({so.UUID}) owner {so.OwnerID} not in region {m_sceneName}");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -803,72 +801,124 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
}
|
||||
else
|
||||
{
|
||||
if (aCircuit.ServiceURLs != null && aCircuit.ServiceURLs.ContainsKey("AssetServerURI"))
|
||||
if (sp.IsDeleted)
|
||||
return false;
|
||||
|
||||
if (m_sceneRegionInfo.EstateSettings.IsBanned(sp.UUID))
|
||||
{
|
||||
ScenePresence defsp = sp;
|
||||
List<SceneObjectGroup> deftatt = attachments;
|
||||
List<SceneObjectGroup> toadd = new List<SceneObjectGroup>(deftatt.Count);
|
||||
m_incomingSceneObjectEngine.QueueJob(
|
||||
string.Format("HG UUID Gather attachments {0}", defsp.Name), () =>
|
||||
m_log.DebugFormat(
|
||||
"[HG ENTITY TRANSFER]: Denied Attachments for banned avatar {0}", sp.Name);
|
||||
return false;
|
||||
}
|
||||
|
||||
// Upstream does let the avi in, even if their assetserver can't be reached
|
||||
// The visitor will obviously be without visible attachments in this case
|
||||
if (aCircuit.ServiceURLs == null || !aCircuit.ServiceURLs.ContainsKey("AssetServerURI"))
|
||||
{
|
||||
sp.GotAttachmentsData = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
ScenePresence defsp = sp;
|
||||
List<SceneObjectGroup> deftatt = new(attachments.Count);
|
||||
List<SceneObjectGroup> defhuds = new();
|
||||
int requestStartTick = Environment.TickCount;
|
||||
|
||||
// Prioritize non-HUDS, as AOs, dance huds etc can hold a lot of assets
|
||||
foreach (SceneObjectGroup sog in attachments)
|
||||
{
|
||||
if (sog.AttachmentPoint >= 31 && sog.AttachmentPoint <= 38)
|
||||
{
|
||||
defhuds.Add(sog);
|
||||
}
|
||||
else
|
||||
{
|
||||
deftatt.Add(sog);
|
||||
}
|
||||
}
|
||||
deftatt.AddRange(defhuds);
|
||||
|
||||
IClientAPI remoteClient = sp.ControllingClient;
|
||||
UUID groupID = remoteClient.ActiveGroupId;
|
||||
|
||||
m_incomingSceneObjectEngine.QueueJob(
|
||||
string.Format("HG UUID Gather attachments {0}", defsp.Name), () =>
|
||||
{
|
||||
string url = aCircuit.ServiceURLs["AssetServerURI"].ToString();
|
||||
IDictionary<UUID, sbyte> ids = new Dictionary<UUID, sbyte>();
|
||||
HGUuidGatherer uuidGatherer = new HGUuidGatherer(m_scene.AssetService, url, ids);
|
||||
|
||||
foreach (SceneObjectGroup sog in deftatt)
|
||||
{
|
||||
string url = aCircuit.ServiceURLs["AssetServerURI"].ToString();
|
||||
IDictionary<UUID, sbyte> ids = new Dictionary<UUID, sbyte>();
|
||||
HGUuidGatherer uuidGatherer = new HGUuidGatherer(m_scene.AssetService, url, ids);
|
||||
|
||||
foreach (SceneObjectGroup defso in deftatt)
|
||||
if(sog.OwnerID.NotEqual(defsp.UUID))
|
||||
{
|
||||
if(defso.OwnerID.NotEqual(defsp.UUID))
|
||||
{
|
||||
m_log.ErrorFormat(
|
||||
"[HG TRANSFER MODULE] attachment {0}({1} owner {2} does not match HG avatarID {3}",
|
||||
defso.Name, defso.UUID, defso.OwnerID, defsp.UUID);
|
||||
continue;
|
||||
}
|
||||
uuidGatherer.AddForInspection(defso);
|
||||
while (!uuidGatherer.Complete)
|
||||
{
|
||||
if (sp.IsDeleted)
|
||||
{
|
||||
deftatt = null;
|
||||
defsp = null;
|
||||
uuidGatherer = null;
|
||||
toadd = null;
|
||||
return;
|
||||
}
|
||||
uuidGatherer.GatherNext();
|
||||
}
|
||||
toadd.Add(defso);
|
||||
m_log.ErrorFormat(
|
||||
"[HG ENTITY TRANSFER] Owner ({0}) of attachment '{1}' does not match HG visitor's ID ({2})",
|
||||
sog.OwnerID, sog.Name, defsp.UUID);
|
||||
continue;
|
||||
}
|
||||
deftatt = null;
|
||||
|
||||
// get asset uuids for scene object
|
||||
uuidGatherer.AddForInspection(sog);
|
||||
while (!uuidGatherer.Complete)
|
||||
{
|
||||
if (sp.IsDeleted)
|
||||
{
|
||||
deftatt = null;
|
||||
defsp = null;
|
||||
uuidGatherer = null;
|
||||
return;
|
||||
}
|
||||
uuidGatherer.GatherNext();
|
||||
}
|
||||
// fetch assets for scene object
|
||||
foreach (UUID id in ids.Keys)
|
||||
{
|
||||
int tickStart = Util.EnvironmentTickCount();
|
||||
|
||||
uuidGatherer.FetchAsset(id);
|
||||
|
||||
int ticksElapsed = Util.EnvironmentTickCountSubtract(tickStart);
|
||||
|
||||
if (sp.IsDeleted || ticksElapsed > 30000)
|
||||
{
|
||||
m_log.WarnFormat(
|
||||
"[HG ENTITY TRANSFER]: Aborting fetch attachments assets for HG user {0}", sp.Name);
|
||||
"[HG ENTITY TRANSFER]: Aborting fetching assets for for HG visitor {0}", defsp.Name);
|
||||
|
||||
deftatt = null;
|
||||
defsp = null;
|
||||
uuidGatherer = null;
|
||||
toadd = null;
|
||||
return;
|
||||
}
|
||||
}
|
||||
ids.Clear(); // this scene object is done fetching
|
||||
|
||||
base.HandleIncomingAttachments(sp, toadd);
|
||||
// add scene object
|
||||
if (!m_scene.AddSceneObject(sog))
|
||||
{
|
||||
m_log.DebugFormat(
|
||||
"[HG ENTITY TRANSFER]: Could not add attachment '{0}' for HG visitor {1}",
|
||||
sog.Name, defsp.Name);
|
||||
} else {
|
||||
sog.SetGroup(groupID, remoteClient);
|
||||
if (sog.ContainsScripts())
|
||||
{
|
||||
sog.RootPart.ParentGroup.CreateScriptInstances(
|
||||
0, false, Scene.DefaultScriptEngine, GetStateSource(sog));
|
||||
sog.aggregateScriptEvents();
|
||||
sog.ResumeScripts();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
defsp = null;
|
||||
uuidGatherer = null;
|
||||
toadd = null;
|
||||
},
|
||||
OwnerID.ToString());
|
||||
}
|
||||
deftatt = null;
|
||||
defsp = null;
|
||||
uuidGatherer = null;
|
||||
|
||||
sp.GotAttachmentsData = true;
|
||||
string loadtime = Convert.ToString(Environment.TickCount - requestStartTick);
|
||||
remoteClient.SendAlertMessage("Your avatar has finished loading ("+loadtime+"ms)");
|
||||
|
||||
// at this point the job engine is done
|
||||
},
|
||||
OwnerID.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -32,7 +32,9 @@ using System.Reflection;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using log4net;
|
||||
using MailKit;
|
||||
using MailKit.Net.Imap;
|
||||
using MailKit.Net.Smtp;
|
||||
using MailKit.Search;
|
||||
using MimeKit;
|
||||
using Nini.Config;
|
||||
using OpenMetaverse;
|
||||
@@ -40,6 +42,7 @@ using OpenSim.Framework;
|
||||
using OpenSim.Region.Framework.Interfaces;
|
||||
using OpenSim.Region.Framework.Scenes;
|
||||
using Mono.Addins;
|
||||
using System.Security.Cryptography;
|
||||
|
||||
namespace OpenSim.Region.CoreModules.Scripting.EmailModules
|
||||
{
|
||||
@@ -68,8 +71,14 @@ namespace OpenSim.Region.CoreModules.Scripting.EmailModules
|
||||
private string SMTP_SERVER_LOGIN = null;
|
||||
private string SMTP_SERVER_PASSWORD = null;
|
||||
|
||||
private bool m_enableEmailToExternalObjects = true;
|
||||
private bool m_enableEmailToSMTP = true;
|
||||
private bool IMAP_SERVER_TLS = false;
|
||||
private string IMAP_SERVER_HOSTNAME = null;
|
||||
private int IMAP_SERVER_PORT = 143;
|
||||
private string IMAP_SERVER_LOGIN = null;
|
||||
private string IMAP_SERVER_PASSWORD = null;
|
||||
|
||||
private bool m_enableEmailToExternalObjects = false;
|
||||
private bool m_enableEmailToSMTP = false;
|
||||
|
||||
private ParserOptions m_mailParseOptions;
|
||||
|
||||
@@ -102,6 +111,7 @@ namespace OpenSim.Region.CoreModules.Scripting.EmailModules
|
||||
private int m_MaxEmailSize = 4096; // largest email allowed by default, as per lsl docs.
|
||||
|
||||
private static SslPolicyErrors m_SMTP_SslPolicyErrorsMask;
|
||||
private static SslPolicyErrors m_IMAP_SslPolicyErrorsMask;
|
||||
private bool m_checkSpecName;
|
||||
|
||||
private object m_queuesLock = new object();
|
||||
@@ -123,22 +133,22 @@ namespace OpenSim.Region.CoreModules.Scripting.EmailModules
|
||||
if(startupConfig.GetString("emailmodule", "DefaultEmailModule") != "DefaultEmailModule")
|
||||
return;
|
||||
|
||||
//Load SMTP SERVER config
|
||||
//Load Email config
|
||||
try
|
||||
{
|
||||
IConfig SMTPConfig = config.Configs["SMTP"];
|
||||
if (SMTPConfig == null)
|
||||
IConfig EmailConfig = config.Configs["Email"];
|
||||
if (EmailConfig == null)
|
||||
return;
|
||||
|
||||
if(!SMTPConfig.GetBoolean("enabled", false))
|
||||
if(!EmailConfig.GetBoolean("enabled", true))
|
||||
return;
|
||||
|
||||
m_enableEmailToExternalObjects = SMTPConfig.GetBoolean("enableEmailToExternalObjects", m_enableEmailToExternalObjects);
|
||||
m_enableEmailToSMTP = SMTPConfig.GetBoolean("enableEmailToSMTP", m_enableEmailToSMTP);
|
||||
m_enableEmailToExternalObjects = EmailConfig.GetBoolean("enableEmailToExternalObjects", m_enableEmailToExternalObjects);
|
||||
m_enableEmailToSMTP = EmailConfig.GetBoolean("enableEmailToSMTP", m_enableEmailToSMTP);
|
||||
|
||||
m_MailsToPrimAddressPerHour = SMTPConfig.GetInt("MailsToPrimAddressPerHour", m_MailsToPrimAddressPerHour);
|
||||
m_MailsToPrimAddressPerHour = EmailConfig.GetInt("MailsToPrimAddressPerHour", m_MailsToPrimAddressPerHour);
|
||||
m_MailsToPrimAddressRate = m_MailsToPrimAddressPerHour / 3600.0;
|
||||
m_MailsFromOwnerPerHour = SMTPConfig.GetInt("MailsFromOwnerPerHour", m_MailsFromOwnerPerHour);
|
||||
m_MailsFromOwnerPerHour = EmailConfig.GetInt("MailsFromOwnerPerHour", m_MailsFromOwnerPerHour);
|
||||
m_MailsFromOwnerRate = m_MailsFromOwnerPerHour / 3600.0;
|
||||
|
||||
m_mailParseOptions = new ParserOptions()
|
||||
@@ -146,17 +156,17 @@ namespace OpenSim.Region.CoreModules.Scripting.EmailModules
|
||||
AllowAddressesWithoutDomain = false,
|
||||
};
|
||||
|
||||
m_InterObjectHostname = SMTPConfig.GetString("internal_object_host", m_InterObjectHostname);
|
||||
m_InterObjectHostname = EmailConfig.GetString("internal_object_host", m_InterObjectHostname);
|
||||
m_checkSpecName = !m_InterObjectHostname.Equals("lsl.secondlife.com");
|
||||
|
||||
if (m_enableEmailToSMTP)
|
||||
{
|
||||
m_SMTP_MailsPerDay = SMTPConfig.GetInt("SMTP_MailsPerDay", m_SMTP_MailsPerDay);
|
||||
m_SMTP_MailsPerDay = EmailConfig.GetInt("SMTP_MailsPerDay", m_SMTP_MailsPerDay);
|
||||
m_SMTP_MailsRate = m_SMTP_MailsPerDay / 86400.0;
|
||||
m_MailsToSMTPAddressPerHour = SMTPConfig.GetInt("MailsToSMTPAddressPerHour", m_MailsToPrimAddressPerHour);
|
||||
m_MailsToSMTPAddressPerHour = EmailConfig.GetInt("MailsToSMTPAddressPerHour", m_MailsToPrimAddressPerHour);
|
||||
m_MailsToSMTPAddressRate = m_MailsToPrimAddressPerHour / 3600.0;
|
||||
|
||||
SMTP_SERVER_HOSTNAME = SMTPConfig.GetString("SMTP_SERVER_HOSTNAME", SMTP_SERVER_HOSTNAME);
|
||||
SMTP_SERVER_HOSTNAME = EmailConfig.GetString("SMTP_SERVER_HOSTNAME", SMTP_SERVER_HOSTNAME);
|
||||
OSHHTPHost hosttmp = new OSHHTPHost(SMTP_SERVER_HOSTNAME, true);
|
||||
if(!hosttmp.IsResolvedHost)
|
||||
{
|
||||
@@ -164,22 +174,22 @@ namespace OpenSim.Region.CoreModules.Scripting.EmailModules
|
||||
return;
|
||||
}
|
||||
|
||||
SMTP_SERVER_PORT = SMTPConfig.GetInt("SMTP_SERVER_PORT", SMTP_SERVER_PORT);
|
||||
SMTP_SERVER_TLS = SMTPConfig.GetBoolean("SMTP_SERVER_TLS", SMTP_SERVER_TLS);
|
||||
SMTP_SERVER_PORT = EmailConfig.GetInt("SMTP_SERVER_PORT", SMTP_SERVER_PORT);
|
||||
SMTP_SERVER_TLS = EmailConfig.GetBoolean("SMTP_SERVER_TLS", SMTP_SERVER_TLS);
|
||||
|
||||
string smtpfrom = SMTPConfig.GetString("SMTP_SERVER_FROM", string.Empty);
|
||||
m_HostName = SMTPConfig.GetString("host_domain_header_from", m_HostName);
|
||||
string smtpfrom = EmailConfig.GetString("SMTP_SERVER_FROM", string.Empty);
|
||||
m_HostName = EmailConfig.GetString("host_domain_header_from", m_HostName);
|
||||
if (!string.IsNullOrEmpty(smtpfrom) && !MailboxAddress.TryParse(m_mailParseOptions, smtpfrom, out SMTP_MAIL_FROM))
|
||||
{
|
||||
m_log.ErrorFormat("[EMAIL]: Invalid SMTP_SERVER_FROM {0}", smtpfrom);
|
||||
return;
|
||||
}
|
||||
|
||||
SMTP_SERVER_LOGIN = SMTPConfig.GetString("SMTP_SERVER_LOGIN", SMTP_SERVER_LOGIN);
|
||||
SMTP_SERVER_PASSWORD = SMTPConfig.GetString("SMTP_SERVER_PASSWORD", SMTP_SERVER_PASSWORD);
|
||||
SMTP_SERVER_LOGIN = EmailConfig.GetString("SMTP_SERVER_LOGIN", SMTP_SERVER_LOGIN);
|
||||
SMTP_SERVER_PASSWORD = EmailConfig.GetString("SMTP_SERVER_PASSWORD", SMTP_SERVER_PASSWORD);
|
||||
|
||||
bool VerifyCertChain = SMTPConfig.GetBoolean("SMTP_VerifyCertChain", true);
|
||||
bool VerifyCertNames = SMTPConfig.GetBoolean("SMTP_VerifyCertNames", true);
|
||||
bool VerifyCertChain = EmailConfig.GetBoolean("SMTP_VerifyCertChain", true);
|
||||
bool VerifyCertNames = EmailConfig.GetBoolean("SMTP_VerifyCertNames", true);
|
||||
m_SMTP_SslPolicyErrorsMask = VerifyCertChain ? 0 : SslPolicyErrors.RemoteCertificateChainErrors;
|
||||
if (!VerifyCertNames)
|
||||
m_SMTP_SslPolicyErrorsMask |= SslPolicyErrors.RemoteCertificateNameMismatch;
|
||||
@@ -191,7 +201,35 @@ namespace OpenSim.Region.CoreModules.Scripting.EmailModules
|
||||
m_log.Warn("[EMAIL]: SMTP disabled, set enableEmailSMTP to enable");
|
||||
}
|
||||
|
||||
m_MaxEmailSize = SMTPConfig.GetInt("email_max_size", m_MaxEmailSize);
|
||||
if (m_enableEmailToExternalObjects)
|
||||
{
|
||||
IMAP_SERVER_HOSTNAME = EmailConfig.GetString("IMAP_SERVER_HOSTNAME", IMAP_SERVER_HOSTNAME);
|
||||
OSHHTPHost hosttmp = new OSHHTPHost(IMAP_SERVER_HOSTNAME, true);
|
||||
if(!hosttmp.IsResolvedHost)
|
||||
{
|
||||
m_log.ErrorFormat("[EMAIL]: could not resolve IMAP_SERVER_HOSTNAME {0}", IMAP_SERVER_HOSTNAME);
|
||||
return;
|
||||
}
|
||||
|
||||
IMAP_SERVER_PORT = EmailConfig.GetInt("IMAP_SERVER_PORT", IMAP_SERVER_PORT);
|
||||
IMAP_SERVER_TLS = EmailConfig.GetBoolean("IMAP_SERVER_TLS", IMAP_SERVER_TLS);
|
||||
IMAP_SERVER_LOGIN = EmailConfig.GetString("IMAP_SERVER_LOGIN", IMAP_SERVER_LOGIN);
|
||||
IMAP_SERVER_PASSWORD = EmailConfig.GetString("IMAP_SERVER_PASSWORD", IMAP_SERVER_PASSWORD);
|
||||
|
||||
bool VerifyCertChain = EmailConfig.GetBoolean("IMAP_VerifyCertChain", true);
|
||||
bool VerifyCertNames = EmailConfig.GetBoolean("IMAP_VerifyCertNames", true);
|
||||
m_IMAP_SslPolicyErrorsMask = VerifyCertChain ? 0 : SslPolicyErrors.RemoteCertificateChainErrors;
|
||||
if (!VerifyCertNames)
|
||||
m_IMAP_SslPolicyErrorsMask |= SslPolicyErrors.RemoteCertificateNameMismatch;
|
||||
m_IMAP_SslPolicyErrorsMask = ~m_IMAP_SslPolicyErrorsMask;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_IMAP_SslPolicyErrorsMask = ~SslPolicyErrors.None;
|
||||
m_log.Warn("[EMAIL]: IMAP disabled, set enableEmailToExternalObjects to enable");
|
||||
}
|
||||
|
||||
m_MaxEmailSize = EmailConfig.GetInt("email_max_size", m_MaxEmailSize);
|
||||
if(m_MaxEmailSize < 256 || m_MaxEmailSize > 1000000)
|
||||
{
|
||||
m_log.Warn("[EMAIL]: email_max_size out of range [256, 1000000], Changed to default 4096");
|
||||
@@ -369,6 +407,11 @@ namespace OpenSim.Region.CoreModules.Scripting.EmailModules
|
||||
{
|
||||
return (sslPolicyErrors & m_SMTP_SslPolicyErrorsMask) == SslPolicyErrors.None;
|
||||
}
|
||||
public static bool imapValidateServerCertificate(object sender, X509Certificate certificate,
|
||||
X509Chain chain, SslPolicyErrors sslPolicyErrors)
|
||||
{
|
||||
return (sslPolicyErrors & m_IMAP_SslPolicyErrorsMask) == SslPolicyErrors.None;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// SendMail function utilized by llEMail
|
||||
@@ -500,7 +543,7 @@ namespace OpenSim.Region.CoreModules.Scripting.EmailModules
|
||||
client.Connect(SMTP_SERVER_HOSTNAME, SMTP_SERVER_PORT, MailKit.Security.SecureSocketOptions.StartTls);
|
||||
}
|
||||
else
|
||||
client.Connect(SMTP_SERVER_HOSTNAME, SMTP_SERVER_PORT);
|
||||
client.Connect(SMTP_SERVER_HOSTNAME, SMTP_SERVER_PORT, MailKit.Security.SecureSocketOptions.None);
|
||||
|
||||
if (!string.IsNullOrEmpty(SMTP_SERVER_LOGIN) && !string.IsNullOrEmpty(SMTP_SERVER_PASSWORD))
|
||||
client.Authenticate(SMTP_SERVER_LOGIN, SMTP_SERVER_PASSWORD);
|
||||
@@ -549,25 +592,60 @@ namespace OpenSim.Region.CoreModules.Scripting.EmailModules
|
||||
if (!UUID.TryParse(address.Substring(0, indx), out UUID toID))
|
||||
return;
|
||||
|
||||
Email email = new Email();
|
||||
email.time = Util.UnixTimeSinceEpoch().ToString();
|
||||
email.subject = subject;
|
||||
email.sender = objectID.ToString() + "@" + m_InterObjectHostname;
|
||||
email.message = "Object-Name: " + LastObjectName +
|
||||
"\nRegion: " + LastObjectRegionName + "\nLocal-Position: " +
|
||||
LastObjectPosition + "\n\n" + body;
|
||||
|
||||
if (IsLocal(toID))
|
||||
{
|
||||
// object in this instance
|
||||
|
||||
Email email = new Email();
|
||||
email.time = Util.UnixTimeSinceEpoch().ToString();
|
||||
email.subject = subject;
|
||||
email.sender = objectID.ToString() + "@" + m_InterObjectHostname;
|
||||
email.message = "Object-Name: " + LastObjectName +
|
||||
"\nRegion: " + LastObjectRegionName + "\nLocal-Position: " +
|
||||
LastObjectPosition + "\n\n" + body;
|
||||
|
||||
InsertEmail(toID, email);
|
||||
}
|
||||
else
|
||||
{
|
||||
// object on another region
|
||||
|
||||
if (!m_enableEmailToExternalObjects)
|
||||
return;
|
||||
// object on another region
|
||||
// TODO FIX
|
||||
|
||||
// Insert mail into IMAP inbox
|
||||
using (var client = new ImapClient ()) {
|
||||
if (IMAP_SERVER_TLS)
|
||||
{
|
||||
client.ServerCertificateValidationCallback = imapValidateServerCertificate;
|
||||
client.Connect(IMAP_SERVER_HOSTNAME, IMAP_SERVER_PORT, MailKit.Security.SecureSocketOptions.StartTls);
|
||||
}
|
||||
else
|
||||
client.Connect(IMAP_SERVER_HOSTNAME, IMAP_SERVER_PORT, MailKit.Security.SecureSocketOptions.None);
|
||||
|
||||
if (client.IsConnected && !string.IsNullOrEmpty(IMAP_SERVER_LOGIN) && !string.IsNullOrEmpty(IMAP_SERVER_PASSWORD))
|
||||
{
|
||||
client.Authenticate(IMAP_SERVER_LOGIN, IMAP_SERVER_PASSWORD);
|
||||
client.Inbox.Open(FolderAccess.ReadWrite);
|
||||
|
||||
var builder = new BodyBuilder();
|
||||
builder.TextBody = "Object-Name: " + LastObjectName +
|
||||
"\nRegion: " + LastObjectRegionName +
|
||||
"\nLocal-Position: " + LastObjectPosition +
|
||||
"\n\n" + body;
|
||||
|
||||
MimeMessage email = new()
|
||||
{
|
||||
Date = DateTimeOffset.UtcNow,
|
||||
Subject = subject,
|
||||
Sender = new MailboxAddress(LastObjectName, objectID.ToString() + "@" + m_InterObjectHostname),
|
||||
Body = builder.ToMessageBody()
|
||||
};
|
||||
email.To.Add(MailboxAddress.Parse(address));
|
||||
client.Inbox.Append(email);
|
||||
client.Disconnect(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -637,6 +715,50 @@ namespace OpenSim.Region.CoreModules.Scripting.EmailModules
|
||||
}
|
||||
}
|
||||
|
||||
// Fetch mail from imap inbox here
|
||||
if (m_enableEmailToExternalObjects) {
|
||||
using (var client = new ImapClient ()) {
|
||||
if (IMAP_SERVER_TLS)
|
||||
{
|
||||
client.ServerCertificateValidationCallback = imapValidateServerCertificate;
|
||||
client.Connect(IMAP_SERVER_HOSTNAME, IMAP_SERVER_PORT, MailKit.Security.SecureSocketOptions.StartTls);
|
||||
}
|
||||
else
|
||||
client.Connect(IMAP_SERVER_HOSTNAME, IMAP_SERVER_PORT, MailKit.Security.SecureSocketOptions.None);
|
||||
|
||||
if (client.IsConnected && !string.IsNullOrEmpty(IMAP_SERVER_LOGIN) && !string.IsNullOrEmpty(IMAP_SERVER_PASSWORD))
|
||||
{
|
||||
client.Authenticate(IMAP_SERVER_LOGIN, IMAP_SERVER_PASSWORD);
|
||||
|
||||
client.Inbox.Open(FolderAccess.ReadWrite);
|
||||
|
||||
SearchQuery query = SearchQuery.ToContains(objectID.ToString()+"@"+m_InterObjectHostname).And(SearchQuery.NotDeleted);
|
||||
if (!string.IsNullOrEmpty(sender))
|
||||
query = query.And(SearchQuery.FromContains(sender));
|
||||
if (!string.IsNullOrEmpty(subject))
|
||||
query = query.And(SearchQuery.SubjectContains(subject));
|
||||
var uids = client.Inbox.Search(query);
|
||||
|
||||
foreach (var uid in uids)
|
||||
{
|
||||
var message = client.Inbox.GetMessage(uid);
|
||||
|
||||
Email email = new()
|
||||
{
|
||||
time = message.Date.ToString(),
|
||||
subject = message.Subject,
|
||||
sender = message.From.ToString(),
|
||||
message = message.GetTextBody(MimeKit.Text.TextFormat.Plain)
|
||||
};
|
||||
InsertEmail(objectID, email);
|
||||
client.Inbox.AddFlags(uid, MessageFlags.Deleted, true);
|
||||
}
|
||||
client.Inbox.Expunge();
|
||||
client.Disconnect(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
lock (m_queuesLock)
|
||||
{
|
||||
m_LastGetEmailCall[objectID] = now + m_QueueTimeout;
|
||||
|
||||
@@ -954,7 +954,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
||||
{
|
||||
if (parcel.GroupID.IsZero())
|
||||
{
|
||||
parcel.OwnerID = m_rootScene.RegionInfo.EstateSettings.EstateOwner;
|
||||
parcel.OwnerID = m_defaultUser;
|
||||
parcel.IsGroupOwned = false;
|
||||
}
|
||||
else
|
||||
@@ -966,7 +966,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
||||
else
|
||||
{
|
||||
if (!ResolveUserUuid(scene, parcel.OwnerID))
|
||||
parcel.OwnerID = m_rootScene.RegionInfo.EstateSettings.EstateOwner;
|
||||
parcel.OwnerID = m_defaultUser;
|
||||
}
|
||||
|
||||
List<LandAccessEntry> accessList = new();
|
||||
|
||||
@@ -153,7 +153,6 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
||||
if (options.TryGetValue("checkPermissions", out Object temp))
|
||||
FilterContent = (string)temp;
|
||||
|
||||
|
||||
// Find the regions to archive
|
||||
ArchiveScenesGroup scenesGroup = new ArchiveScenesGroup();
|
||||
if (MultiRegionFormat)
|
||||
@@ -187,7 +186,15 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
||||
scenesGroup.ForEachScene(delegate(Scene scene)
|
||||
{
|
||||
string regionDir = MultiRegionFormat ? scenesGroup.GetRegionDir(scene.RegionInfo.RegionID) : "";
|
||||
ArchiveOneRegion(scene, regionDir, assetUuids, failedIDs, uncertainAssetsUUIDs);
|
||||
|
||||
UUID userId = scene.RegionInfo.EstateSettings.EstateOwner;
|
||||
if (options.TryGetValue("tenant", out Object temp))
|
||||
{
|
||||
if (!UUID.TryParse((string)temp, out userId) || userId.IsZero())
|
||||
userId = scene.RegionInfo.EstateSettings.EstateOwner;
|
||||
}
|
||||
|
||||
ArchiveOneRegion(scene, regionDir, assetUuids, failedIDs, uncertainAssetsUUIDs, userId);
|
||||
});
|
||||
|
||||
// Archive the assets
|
||||
@@ -225,7 +232,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
||||
}
|
||||
|
||||
private void ArchiveOneRegion(Scene scene, string regionDir, Dictionary<UUID, sbyte> assetUuids,
|
||||
HashSet<UUID> failedIDs, HashSet<UUID> uncertainAssetsUUIDs)
|
||||
HashSet<UUID> failedIDs, HashSet<UUID> uncertainAssetsUUIDs, UUID userId)
|
||||
{
|
||||
m_log.InfoFormat("[ARCHIVER]: Writing region {0}", scene.Name);
|
||||
|
||||
@@ -246,7 +253,12 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
||||
|
||||
if (!sceneObject.IsDeleted && !sceneObject.IsAttachment && !sceneObject.IsTemporary && !sceneObject.inTransit)
|
||||
{
|
||||
if (!CanUserArchiveObject(scene.RegionInfo.EstateSettings.EstateOwner, sceneObject, FilterContent, permissionsModule))
|
||||
if (userId != scene.RegionInfo.EstateSettings.EstateOwner && sceneObject.OwnerID != userId)
|
||||
{
|
||||
// A tenant= option was specified, skip object if not owned by tenant with userid
|
||||
++numObjectsSkippedPermissions;
|
||||
}
|
||||
else if (!CanUserArchiveObject(userId, sceneObject, FilterContent, permissionsModule))
|
||||
{
|
||||
// The user isn't allowed to copy/transfer this object, so it will not be included in the OAR.
|
||||
++numObjectsSkippedPermissions;
|
||||
|
||||
@@ -280,6 +280,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
||||
ops.Add("publish", v => options["wipe-owners"] = v != null);
|
||||
ops.Add("perm=", delegate(string v) { options["checkPermissions"] = v; });
|
||||
ops.Add("all", delegate(string v) { options["all"] = v != null; });
|
||||
ops.Add("tenant=", delegate(string v) { options["tenant"] = v; });
|
||||
|
||||
List<string> mainParams = ops.Parse(cmdparams);
|
||||
|
||||
|
||||
@@ -51,6 +51,8 @@ using OSDMap = OpenMetaverse.StructuredData.OSDMap;
|
||||
using OSDArray = OpenMetaverse.StructuredData.OSDArray;
|
||||
|
||||
using Extension = Mono.Addins.ExtensionAttribute;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace OpenSim.Region.CoreModules.World.Land
|
||||
{
|
||||
// used for caching
|
||||
@@ -1688,10 +1690,28 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||
|
||||
if (m_scene.Permissions.CanAbandonParcel(remote_client.AgentId, land))
|
||||
{
|
||||
string LastOwnerName;
|
||||
if (land.LandData.IsGroupOwned)
|
||||
{
|
||||
if (m_groupManager is not null)
|
||||
{
|
||||
GroupRecord groupRecord = m_groupManager.GetGroupRecord(land.LandData.OwnerID);
|
||||
LastOwnerName = "group " + groupRecord.GroupName;
|
||||
}
|
||||
else
|
||||
LastOwnerName = "a group";
|
||||
}
|
||||
else
|
||||
LastOwnerName = m_userManager.GetUserName(land.LandData.OwnerID);
|
||||
|
||||
string date = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
|
||||
land.LandData.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner;
|
||||
land.LandData.GroupID = UUID.Zero;
|
||||
land.LandData.IsGroupOwned = false;
|
||||
land.LandData.Flags &= ~(uint) (ParcelFlags.ForSale | ParcelFlags.ForSaleObjects | ParcelFlags.SellParcelObjects | ParcelFlags.ShowDirectory);
|
||||
land.LandData.Flags &= ~(uint) (ParcelFlags.ForSale | ParcelFlags.ForSaleObjects | ParcelFlags.SellParcelObjects | ParcelFlags.ShowDirectory | ParcelFlags.CreateObjects);
|
||||
land.LandData.Name = "Abandoned Land";
|
||||
land.LandData.OtherCleanTime = 5;
|
||||
land.LandData.Description = "Land abandoned by " + LastOwnerName + " on " + date;
|
||||
|
||||
UpdateLandObject(land.LandData.LocalID, land.LandData);
|
||||
m_scene.ForEachClient(SendParcelOverlay);
|
||||
@@ -1719,7 +1739,9 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||
land.LandData.SeeAVs = true;
|
||||
land.LandData.AnyAVSounds = true;
|
||||
land.LandData.GroupAVSounds = true;
|
||||
land.LandData.Flags &= ~(uint) (ParcelFlags.ForSale | ParcelFlags.ForSaleObjects | ParcelFlags.SellParcelObjects | ParcelFlags.ShowDirectory);
|
||||
land.LandData.Flags &= ~(uint) (ParcelFlags.ForSale | ParcelFlags.ForSaleObjects | ParcelFlags.SellParcelObjects | ParcelFlags.ShowDirectory | ParcelFlags.CreateObjects);
|
||||
land.LandData.Name = "Reclaimed Land";
|
||||
land.LandData.OtherCleanTime = 0;
|
||||
UpdateLandObject(land.LandData.LocalID, land.LandData);
|
||||
m_scene.ForEachClient(SendParcelOverlay);
|
||||
land.SendLandUpdateToAvatars();
|
||||
|
||||
@@ -858,12 +858,12 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||
|
||||
private bool IsRestrictedFromLand_inner(UUID avatar)
|
||||
{
|
||||
if ((LandData.Flags & (uint) ParcelFlags.UseAccessList) == 0)
|
||||
if ((LandData.Flags & (uint)ParcelFlags.UseAccessList) == 0)
|
||||
{
|
||||
bool adults = m_estateSettings.DoDenyMinors &&
|
||||
(m_estateSettings.DenyMinors || ((LandData.Flags & (uint)ParcelFlags.DenyAgeUnverified) != 0));
|
||||
bool anonymous = m_estateSettings.DoDenyAnonymous &&
|
||||
(m_estateSettings.DenyAnonymous || ((LandData.Flags & (uint)ParcelFlags.DenyAnonymous) != 0));
|
||||
bool adults = m_estateSettings.DoDenyMinors ||
|
||||
(m_estateSettings.DenyMinors || ((LandData.Flags & (uint)ParcelFlags.DenyAgeUnverified) != 0));
|
||||
bool anonymous = m_estateSettings.DoDenyAnonymous ||
|
||||
(m_estateSettings.DenyAnonymous || ((LandData.Flags & (uint)ParcelFlags.DenyAnonymous) != 0));
|
||||
if(adults || anonymous)
|
||||
{
|
||||
int userflags;
|
||||
|
||||
@@ -1004,6 +1004,12 @@ namespace OpenSim.Region.CoreModules.World.LightShare
|
||||
return (float)Utils.Clamp(dayfrac, 0, 1);
|
||||
}
|
||||
|
||||
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
|
||||
public float GetDayFractionTime(Vector3 pos)
|
||||
{
|
||||
return GetDayFractionTime(GetEnvironment(pos));
|
||||
}
|
||||
|
||||
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
|
||||
public float GetRegionDayFractionTime()
|
||||
{
|
||||
|
||||
@@ -94,6 +94,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
||||
private bool m_forceGridAdminsOnly;
|
||||
private bool m_forceAdminModeAlwaysOn;
|
||||
private bool m_allowAdminActionsWithoutGodMode;
|
||||
private bool m_takeCopyRestricted = false;
|
||||
|
||||
/// <value>
|
||||
/// The set of users that are allowed to create scripts. This is only active if permissions are not being
|
||||
@@ -166,7 +167,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
||||
m_forceGridAdminsOnly = Util.GetConfigVarFromSections<bool>(config, "force_grid_gods_only", sections, false);
|
||||
if(!m_forceGridAdminsOnly)
|
||||
{
|
||||
m_RegionOwnerIsAdmin = Util.GetConfigVarFromSections<bool>(config, "region_owner_is_god",sections, true);
|
||||
m_RegionOwnerIsAdmin = Util.GetConfigVarFromSections<bool>(config, "region_owner_is_god",sections, false);
|
||||
m_RegionManagerIsAdmin = Util.GetConfigVarFromSections<bool>(config, "region_manager_is_god",sections, false);
|
||||
}
|
||||
else
|
||||
@@ -187,6 +188,8 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
||||
else
|
||||
m_log.Debug("[PERMISSIONS]: Enabling all region service permission checks");
|
||||
|
||||
m_takeCopyRestricted = Util.GetConfigVarFromSections<bool>(config, "take_copy_restricted", sections, false);
|
||||
|
||||
string grant = Util.GetConfigVarFromSections<string>(config, "GrantLSL",
|
||||
new string[] { "Startup", "Permissions" }, string.Empty);
|
||||
if (grant.Length > 0)
|
||||
@@ -2021,6 +2024,12 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
||||
|
||||
if(sog.OwnerID.NotEqual(sp.UUID) && (perms & (uint)PermissionMask.Transfer) == 0)
|
||||
return false;
|
||||
|
||||
if (sog.OwnerID.NotEqual(sp.UUID) && !IsFriendWithPerms(sp.UUID, sog.OwnerID) && !sp.IsGod)
|
||||
{
|
||||
if (m_takeCopyRestricted)
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -2379,7 +2388,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
||||
|
||||
bool spNotOwner = sp.UUID.NotEqual(destsog.OwnerID);
|
||||
|
||||
// scripts can't be droped
|
||||
// scripts can't be dropped
|
||||
if(spNotOwner && item.InvType == (int)InventoryType.LSL)
|
||||
return false;
|
||||
|
||||
|
||||
@@ -84,6 +84,8 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
|
||||
private float m_renderMinHeight = -100f;
|
||||
private float m_renderMaxHeight = 4096f;
|
||||
|
||||
private string m_tilesPath = ".";
|
||||
|
||||
private bool m_Enabled = false;
|
||||
|
||||
#region Region Module interface
|
||||
@@ -132,6 +134,10 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
|
||||
m_renderMinHeight = -100f;
|
||||
else if (m_renderMinHeight > m_renderMaxHeight - 10f)
|
||||
m_renderMinHeight = m_renderMaxHeight - 10f;
|
||||
|
||||
m_tilesPath = Util.GetConfigVarFromSections<string>(source, "GenTilesDirectory", configSections, m_tilesPath);
|
||||
if (!Directory.Exists(m_tilesPath))
|
||||
Directory.CreateDirectory(m_tilesPath);
|
||||
}
|
||||
|
||||
public void AddRegion(Scene scene)
|
||||
@@ -208,7 +214,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
|
||||
|
||||
Bitmap tile = GenImage();
|
||||
// image may be reloaded elsewhere, so no compression format
|
||||
string filename = "MAP-" + m_scene.RegionInfo.RegionID.ToString() + ".png";
|
||||
string filename = System.IO.Path.Combine(m_tilesPath, "MAP-" + m_scene.RegionInfo.RegionID.ToString() + ".png");
|
||||
tile.Save(filename,ImageFormat.Png);
|
||||
m_primMesher = null;
|
||||
return tile;
|
||||
|
||||
@@ -77,6 +77,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||
private string m_regionName;
|
||||
|
||||
private byte[] myMapImageJPEG;
|
||||
private string m_tilesPath = ".";
|
||||
protected volatile bool m_Enabled = false;
|
||||
|
||||
private ManualResetEvent m_mapBlockRequestEvent = new ManualResetEvent(false);
|
||||
@@ -158,6 +159,10 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||
Util.GetConfigVarFromSections<bool>(config, "ExportMapAddRegionName", configSections, m_exportPrintRegionName);
|
||||
m_localV1MapAssets =
|
||||
Util.GetConfigVarFromSections<bool>(config, "LocalV1MapAssets", configSections, m_localV1MapAssets);
|
||||
m_tilesPath =
|
||||
Util.GetConfigVarFromSections<string>(config, "GenTilesDirectory", configSections, m_tilesPath);
|
||||
if (!Directory.Exists(m_tilesPath))
|
||||
Directory.CreateDirectory(m_tilesPath);
|
||||
}
|
||||
|
||||
public virtual void AddRegion(Scene scene)
|
||||
@@ -916,9 +921,6 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||
}
|
||||
|
||||
|
||||
private const double SPAMBLOCKTIMEms = 30000;
|
||||
private Dictionary<UUID,double> spamBlocked = new Dictionary<UUID,double>();
|
||||
|
||||
/// <summary>
|
||||
/// Requests map blocks in area of minX, maxX, minY, MaxY in world cordinates
|
||||
/// </summary>
|
||||
@@ -928,50 +930,10 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||
/// <param name="maxY"></param>
|
||||
public void RequestMapBlocks(IClientAPI remoteClient, int minX, int minY, int maxX, int maxY, uint flag)
|
||||
{
|
||||
// anti spam because of FireStorm 4.7.7 absurd request repeat rates
|
||||
// possible others
|
||||
|
||||
double now = Util.GetTimeStampMS();
|
||||
UUID agentID = remoteClient.AgentId;
|
||||
|
||||
lock (m_mapBlockRequestEvent)
|
||||
{
|
||||
if(spamBlocked.ContainsKey(agentID))
|
||||
{
|
||||
if(spamBlocked[agentID] < now &&
|
||||
(!m_mapBlockRequests.ContainsKey(agentID) ||
|
||||
m_mapBlockRequests[agentID].Count == 0 ))
|
||||
{
|
||||
spamBlocked.Remove(agentID);
|
||||
m_log.DebugFormat("[WoldMapModule] RequestMapBlocks release spammer {0}", agentID);
|
||||
}
|
||||
else
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
// ugly slow expire spammers
|
||||
if(spamBlocked.Count > 0)
|
||||
{
|
||||
UUID k = UUID.Zero;
|
||||
bool expireone = false;
|
||||
foreach(UUID k2 in spamBlocked.Keys)
|
||||
{
|
||||
if(spamBlocked[k2] < now &&
|
||||
(!m_mapBlockRequests.ContainsKey(k2) ||
|
||||
m_mapBlockRequests[k2].Count == 0 ))
|
||||
{
|
||||
m_log.DebugFormat("[WoldMapModule] RequestMapBlocks release spammer {0}", k2);
|
||||
k = k2;
|
||||
expireone = true;
|
||||
}
|
||||
break; // doing one at a time
|
||||
}
|
||||
if(expireone)
|
||||
spamBlocked.Remove(k);
|
||||
}
|
||||
}
|
||||
|
||||
// m_log.DebugFormat("[WoldMapModule] RequestMapBlocks {0}={1}={2}={3} {4}", minX, minY, maxX, maxY, flag);
|
||||
|
||||
MapBlockRequestData req = new MapBlockRequestData()
|
||||
@@ -990,13 +952,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||
agentq = new Queue<MapBlockRequestData>();
|
||||
m_mapBlockRequests[agentID] = agentq;
|
||||
}
|
||||
if(agentq.Count < 150 )
|
||||
agentq.Enqueue(req);
|
||||
else
|
||||
{
|
||||
spamBlocked[agentID] = now + SPAMBLOCKTIMEms;
|
||||
m_log.DebugFormat("[WoldMapModule] RequestMapBlocks blocking spammer {0} for {1} s",agentID, SPAMBLOCKTIMEms/1000.0);
|
||||
}
|
||||
agentq.Enqueue(req);
|
||||
m_mapBlockRequestEvent.Set();
|
||||
}
|
||||
}
|
||||
@@ -1338,7 +1294,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||
startY--;
|
||||
|
||||
bool doneLocal = false;
|
||||
string filename = "MAP-" + m_scene.RegionInfo.RegionID.ToString() + ".png";
|
||||
string filename = Path.Combine(m_tilesPath, "MAP-" + m_scene.RegionInfo.RegionID.ToString() + ".png");
|
||||
try
|
||||
{
|
||||
using(Image localMap = Bitmap.FromFile(filename))
|
||||
|
||||
@@ -43,6 +43,7 @@ namespace OpenSim.Region.Framework.Interfaces
|
||||
|
||||
ViewerEnvironment GetRegionEnvironment();
|
||||
|
||||
float GetDayFractionTime(Vector3 pos);
|
||||
float GetRegionDayFractionTime();
|
||||
int GetRegionDayLength();
|
||||
int GetRegionDayOffset();
|
||||
|
||||
@@ -64,7 +64,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
return;
|
||||
}
|
||||
|
||||
m_log.DebugFormat("Setting override for {0} to {1}", state, animID);
|
||||
//m_log.DebugFormat("Setting override for {0} to {1}", state, animID);
|
||||
|
||||
lock (MAOLock)
|
||||
m_overrides[state] = animID;
|
||||
|
||||
@@ -87,7 +87,10 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
if (permissionToDelete)
|
||||
{
|
||||
foreach (SceneObjectGroup g in objectGroups)
|
||||
{
|
||||
g.LastOwnerID = g.OwnerID;
|
||||
g.DeleteGroupFromScene(false);
|
||||
}
|
||||
}
|
||||
|
||||
if(Monitor.TryEnter(m_threadLock))
|
||||
|
||||
@@ -88,7 +88,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
// The owner of a region is a god in his region only.
|
||||
m_regionOwnerIsGod =
|
||||
Util.GetConfigVarFromSections<bool>(config,
|
||||
"region_owner_is_god", sections, true);
|
||||
"region_owner_is_god", sections, false);
|
||||
|
||||
// Region managers are gods in the regions they manage.
|
||||
m_regionManagerIsGod =
|
||||
|
||||
@@ -32,6 +32,7 @@ using System.IO;
|
||||
using System.Runtime;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading;
|
||||
using System.Timers;
|
||||
using Nini.Config;
|
||||
@@ -267,8 +268,9 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
get { return m_minRegionViewDistance; }
|
||||
}
|
||||
|
||||
private readonly List<string> m_AllowedViewers = new();
|
||||
private readonly List<string> m_BannedViewers = new();
|
||||
private static string m_AllowedViewers = string.Empty;
|
||||
private static string m_BannedViewers = string.Empty;
|
||||
private static string m_ViewerDeniedMsg = "Access denied, your viewer is banned";
|
||||
|
||||
// TODO: need to figure out how allow client agents but deny
|
||||
// root agents when ACL denies access to root agent
|
||||
@@ -1039,29 +1041,12 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
string[] possibleAccessControlConfigSections = new string[] { "Startup", "AccessControl"};
|
||||
|
||||
string grant = Util.GetConfigVarFromSections<string>(
|
||||
config, "AllowedClients", possibleAccessControlConfigSections, string.Empty);
|
||||
|
||||
if (grant.Length > 0)
|
||||
{
|
||||
foreach (string viewer in grant.Split(','))
|
||||
{
|
||||
m_AllowedViewers.Add(viewer.Trim().ToLower());
|
||||
}
|
||||
}
|
||||
|
||||
grant = Util.GetConfigVarFromSections<string>(config, "DeniedClients", possibleAccessControlConfigSections, string.Empty);
|
||||
// Deal with the mess of someone having used a different word at some point
|
||||
if (string.IsNullOrWhiteSpace(grant))
|
||||
grant = Util.GetConfigVarFromSections<string>(config, "BannedClients", possibleAccessControlConfigSections, string.Empty);
|
||||
|
||||
if (grant.Length > 0)
|
||||
{
|
||||
foreach (string viewer in grant.Split(','))
|
||||
{
|
||||
m_BannedViewers.Add(viewer.Trim().ToLower());
|
||||
}
|
||||
}
|
||||
m_AllowedViewers = Util.GetConfigVarFromSections<string>(
|
||||
config, "AllowedClients", possibleAccessControlConfigSections, string.Empty);
|
||||
m_BannedViewers = Util.GetConfigVarFromSections<string>(
|
||||
config, "DeniedClients", possibleAccessControlConfigSections, string.Empty);
|
||||
m_ViewerDeniedMsg = Util.GetConfigVarFromSections<string>(
|
||||
config, "ViewerDeniedMsg", possibleAccessControlConfigSections, m_ViewerDeniedMsg);
|
||||
|
||||
FrameTime = startupConfig.GetFloat( "FrameTime", FrameTime);
|
||||
FrameTimeWarnPercent = startupConfig.GetInt( "FrameTimeWarnPercent", FrameTimeWarnPercent);
|
||||
@@ -2967,7 +2952,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
return true;
|
||||
}
|
||||
|
||||
public bool IncomingAttechments(ScenePresence sp, List<SceneObjectGroup> attachments)
|
||||
public bool IncomingAttachments(ScenePresence sp, List<SceneObjectGroup> attachments)
|
||||
{
|
||||
//m_log.DebugFormat(" >>> IncomingCreateObject(sog) <<< {0} deleted? {1} isAttach? {2}", ((SceneObjectGroup)sog).AbsolutePosition,
|
||||
// ((SceneObjectGroup)sog).IsDeleted, ((SceneObjectGroup)sog).RootPart.IsAttachment);
|
||||
@@ -3976,20 +3961,14 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
//Check if the viewer is banned or in the viewer access list
|
||||
//We check if the substring is listed for higher flexebility
|
||||
bool ViewerDenied = true;
|
||||
string cV = null;
|
||||
|
||||
//Check if the specific viewer is listed in the allowed viewer list
|
||||
if (m_AllowedViewers.Count > 0)
|
||||
if (!String.IsNullOrWhiteSpace(m_AllowedViewers))
|
||||
{
|
||||
cV = curViewer.Trim().ToLower();
|
||||
foreach (string viewer in m_AllowedViewers)
|
||||
{
|
||||
if (viewer == cV[..Math.Min(viewer.Length, curViewer.Length)])
|
||||
{
|
||||
ViewerDenied = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
Regex arx = new Regex(m_AllowedViewers);
|
||||
Match am = arx.Match(curViewer);
|
||||
|
||||
if (am.Success) ViewerDenied = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -3997,17 +3976,12 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
}
|
||||
|
||||
//Check if the viewer is in the banned list
|
||||
if (m_BannedViewers.Count > 0)
|
||||
if (!String.IsNullOrWhiteSpace(m_BannedViewers))
|
||||
{
|
||||
cV ??= curViewer.Trim().ToLower();
|
||||
foreach (string viewer in m_BannedViewers)
|
||||
{
|
||||
if (viewer == cV[..Math.Min(viewer.Length, curViewer.Length)])
|
||||
{
|
||||
ViewerDenied = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
Regex drx = new Regex(m_BannedViewers);
|
||||
Match dm = drx.Match(curViewer);
|
||||
|
||||
if (dm.Success) ViewerDenied = true;
|
||||
}
|
||||
|
||||
if (ViewerDenied)
|
||||
@@ -4015,7 +3989,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
m_log.DebugFormat(
|
||||
"[SCENE]: Access denied for {0} {1} using {2}",
|
||||
acd.firstname, acd.lastname, curViewer);
|
||||
reason = "Access denied, your viewer is banned";
|
||||
reason = m_ViewerDeniedMsg;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -689,10 +689,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
// now that position is changed tell it to scripts
|
||||
if (triggerScriptEvent && (ScriptEvents & scriptEvents.changed) != 0)
|
||||
{
|
||||
foreach (SceneObjectPart part in parts)
|
||||
{
|
||||
part.TriggerScriptChangedEvent(Changed.POSITION);
|
||||
}
|
||||
// Only send this to the rootprim instead of all childprims
|
||||
m_rootPart.TriggerScriptChangedEvent(Changed.POSITION);
|
||||
}
|
||||
|
||||
Scene?.EventManager.TriggerParcelPrimCountTainted();
|
||||
|
||||
@@ -1953,7 +1953,15 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
return;
|
||||
|
||||
if (localGlobalTF)
|
||||
impulse *= GetWorldRotation();
|
||||
{
|
||||
if (ParentGroup.IsAttachment)
|
||||
{
|
||||
ScenePresence sp = ParentGroup.Scene.GetScenePresence(ParentGroup.AttachedAvatar);
|
||||
if (sp != null)
|
||||
impulse *= sp.GetWorldRotation();
|
||||
} else
|
||||
impulse *= GetWorldRotation();
|
||||
}
|
||||
|
||||
ParentGroup.applyImpulse(impulse);
|
||||
}
|
||||
@@ -1964,9 +1972,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
if (ParentGroup == null || ParentGroup.IsDeleted || ParentGroup.inTransit)
|
||||
return;
|
||||
|
||||
if (ParentGroup.IsAttachment)
|
||||
return; // don't work on attachments (for now ??)
|
||||
|
||||
SceneObjectPart root = ParentGroup.RootPart;
|
||||
|
||||
if (root.VehicleType != (int)Vehicle.TYPE_NONE) // don't mess with vehicles
|
||||
@@ -1978,7 +1983,16 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
return;
|
||||
|
||||
if (localGlobalTF)
|
||||
pVel *= GetWorldRotation();
|
||||
{
|
||||
if (ParentGroup.IsAttachment)
|
||||
{
|
||||
ScenePresence sp = ParentGroup.Scene.GetScenePresence(ParentGroup.AttachedAvatar);
|
||||
if (sp != null)
|
||||
pVel *= sp.GetWorldRotation();
|
||||
}
|
||||
else
|
||||
pVel *= GetWorldRotation();
|
||||
}
|
||||
|
||||
ParentGroup.Velocity = pVel;
|
||||
}
|
||||
@@ -1989,9 +2003,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
if (ParentGroup == null || ParentGroup.IsDeleted || ParentGroup.inTransit)
|
||||
return;
|
||||
|
||||
if (ParentGroup.IsAttachment)
|
||||
return; // don't work on attachments (for now ??)
|
||||
|
||||
SceneObjectPart root = ParentGroup.RootPart;
|
||||
|
||||
if (root.VehicleType != (int)Vehicle.TYPE_NONE) // don't mess with vehicles
|
||||
@@ -2003,7 +2014,16 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
return;
|
||||
|
||||
if (localGlobalTF)
|
||||
pAngVel *= GetWorldRotation();
|
||||
{
|
||||
if (ParentGroup.IsAttachment)
|
||||
{
|
||||
ScenePresence sp = ParentGroup.Scene.GetScenePresence(ParentGroup.AttachedAvatar);
|
||||
if (sp != null)
|
||||
pAngVel *= sp.GetWorldRotation();
|
||||
}
|
||||
else
|
||||
pAngVel *= GetWorldRotation();
|
||||
}
|
||||
|
||||
root.AngularVelocity = pAngVel;
|
||||
}
|
||||
@@ -2022,7 +2042,16 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
return;
|
||||
|
||||
if (localGlobalTF)
|
||||
ParentGroup.ApplyAngularImpulse(impulse * GetWorldRotation());
|
||||
{
|
||||
if (ParentGroup.IsAttachment)
|
||||
{
|
||||
ScenePresence sp = ParentGroup.Scene.GetScenePresence(ParentGroup.AttachedAvatar);
|
||||
if (sp != null)
|
||||
ParentGroup.ApplyAngularImpulse(impulse * sp.GetWorldRotation());
|
||||
}
|
||||
else
|
||||
ParentGroup.ApplyAngularImpulse(impulse * GetWorldRotation());
|
||||
}
|
||||
else
|
||||
ParentGroup.ApplyAngularImpulse(impulse);
|
||||
}
|
||||
@@ -2041,7 +2070,16 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
Vector3 torque = torquei;
|
||||
|
||||
if (localGlobalTF)
|
||||
torque *= GetWorldRotation();
|
||||
{
|
||||
if (ParentGroup.IsAttachment)
|
||||
{
|
||||
ScenePresence sp = ParentGroup.Scene.GetScenePresence(ParentGroup.AttachedAvatar);
|
||||
if (sp != null)
|
||||
torque *= sp.GetWorldRotation();
|
||||
}
|
||||
else
|
||||
torque *= GetWorldRotation();
|
||||
}
|
||||
|
||||
Torque = torque;
|
||||
}
|
||||
|
||||
@@ -1076,7 +1076,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
// velocities
|
||||
private const float AgentControlStopSlowVel = 0.2f * 4.096f;
|
||||
public const float AgentControlMidVel = 0.6f * 4.096f;
|
||||
public const float AgentControlMidVel = 1.0f * 4.096f;
|
||||
public const float AgentControlNormalVel = 1.0f * 4.096f;
|
||||
|
||||
// old normal speed was tuned to match sl normal plus Fast modifiers
|
||||
@@ -1591,9 +1591,12 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
// Resume scripts
|
||||
foreach (SceneObjectGroup sog in attachments)
|
||||
{
|
||||
sog.RootPart.ParentGroup.CreateScriptInstances(0, false, m_scene.DefaultScriptEngine, GetStateSource());
|
||||
sog.ResumeScripts();
|
||||
sog.ScheduleGroupForFullUpdate();
|
||||
if (sog.ContainsScripts())
|
||||
{
|
||||
sog.RootPart.ParentGroup.CreateScriptInstances(0, false, m_scene.DefaultScriptEngine, GetStateSource());
|
||||
sog.ResumeScripts();
|
||||
sog.ScheduleGroupForFullUpdate();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2352,6 +2355,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
// attachments
|
||||
if (IsNPC || IsRealLogin(m_teleportFlags))
|
||||
{
|
||||
GotAttachmentsData = true;
|
||||
if (Scene.AttachmentsModule != null)
|
||||
{
|
||||
if(IsNPC)
|
||||
@@ -3067,14 +3071,22 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
if(IsNPC)
|
||||
{
|
||||
if (!Flying)
|
||||
shouldfly = !noFly && (pos.Z > terrainHeight + Appearance.AvatarHeight);
|
||||
shouldfly = !noFly && (pos.Z > AbsolutePosition.Z + (Appearance.AvatarHeight*2));
|
||||
LandAtTarget = landAtTarget && shouldfly;
|
||||
}
|
||||
else
|
||||
{
|
||||
// we have no control on viewer fly state
|
||||
shouldfly = Flying || (pos.Z > terrainHeight + Appearance.AvatarHeight);
|
||||
LandAtTarget = false;
|
||||
if (pos.Z < AbsolutePosition.Z)
|
||||
{
|
||||
shouldfly = false;
|
||||
LandAtTarget = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
// we have no control on viewer fly state
|
||||
shouldfly = Flying || (pos.Z > AbsolutePosition.Z + (Appearance.AvatarHeight*2));
|
||||
LandAtTarget = false;
|
||||
}
|
||||
}
|
||||
|
||||
// m_log.DebugFormat("[SCENE PRESENCE]: Local vector to target is {0},[1}", localVectorToTarget3D.X,localVectorToTarget3D.Y);
|
||||
|
||||
@@ -824,6 +824,21 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
||||
UUID agentID = GetRequestingAgentID(remoteClient);
|
||||
m_groupData.SetAgentActiveGroup(agentID, agentID, groupID);
|
||||
|
||||
ScenePresence sp = ((Scene)(remoteClient.Scene)).GetScenePresence(remoteClient.AgentId);
|
||||
List<SceneObjectGroup> attachments = sp.GetAttachments();
|
||||
|
||||
foreach(SceneObjectGroup so in attachments)
|
||||
{
|
||||
//m_log.DebugFormat("[GROUPS MODULE]: Setting new group and checking scripts to run in attachment {0} for {1}", so.Name, so.OwnerID);
|
||||
so.SetGroup(groupID, remoteClient);
|
||||
if (so.ContainsScripts() && so.RunningScriptCount() == 0)
|
||||
{
|
||||
so.RootPart.ParentGroup.CreateScriptInstances(
|
||||
0, false, sp.Scene.DefaultScriptEngine, sp.GetStateSource());
|
||||
so.ResumeScripts();
|
||||
}
|
||||
}
|
||||
|
||||
// llClientView does this
|
||||
SendAgentGroupDataUpdate(remoteClient, true);
|
||||
}
|
||||
@@ -1080,11 +1095,16 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
||||
{
|
||||
if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
|
||||
|
||||
m_groupData.SetAgentActiveGroupRole(GetRequestingAgentID(remoteClient), GetRequestingAgentID(remoteClient), groupID, titleRoleID);
|
||||
UUID agentID = remoteClient.AgentId;
|
||||
m_groupData.SetAgentActiveGroupRole(agentID, agentID, groupID, titleRoleID);
|
||||
|
||||
// TODO: Not sure what all is needed here, but if the active group role change is for the group
|
||||
// the client currently has set active, then we need to do a scene presence update too
|
||||
// if (m_groupData.GetAgentActiveMembership(GetRequestingAgentID(remoteClient)).GroupID == GroupID)
|
||||
// If the active group role change is for the group
|
||||
// the client currently has set active, then we need to
|
||||
// set the active group again for the tag to update
|
||||
if (m_groupData.GetAgentActiveMembership(agentID, agentID).GroupID == groupID)
|
||||
{
|
||||
m_groupData.SetAgentActiveGroup(agentID, agentID, groupID);
|
||||
}
|
||||
|
||||
SendDataUpdate(remoteClient, true);
|
||||
}
|
||||
|
||||
@@ -117,6 +117,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
protected float m_recoilScaleFactor = 0.0f;
|
||||
protected bool m_AllowGodFunctions;
|
||||
|
||||
protected string m_SlurlPrefix = "http://slurl.opensim.local";
|
||||
|
||||
protected double m_timer = Util.GetTimeStamp();
|
||||
protected bool m_waitingForScriptAnswer = false;
|
||||
protected bool m_automaticLinkPermission = false;
|
||||
@@ -443,6 +445,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
m_recoilScaleFactor = seConfig.GetFloat("RecoilScaleFactor", m_recoilScaleFactor);
|
||||
m_AllowGodFunctions = seConfig.GetBoolean("AllowGodFunctions", false);
|
||||
|
||||
m_SlurlPrefix = seConfig.GetString("SlurlPrefix", m_SlurlPrefix);
|
||||
|
||||
m_disable_underground_movement = seConfig.GetBoolean("DisableUndergroundMovement", true);
|
||||
|
||||
m_linksetDataLimit = seConfig.GetInt("LinksetDataLimit", m_linksetDataLimit);
|
||||
@@ -516,7 +520,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
m_useMeshCacheInCastRay = lslConfig.GetBoolean("UseMeshCacheInLlCastRay", m_useMeshCacheInCastRay);
|
||||
}
|
||||
|
||||
IConfig smtpConfig = seConfigSource.Configs["SMTP"];
|
||||
IConfig smtpConfig = seConfigSource.Configs["Email"];
|
||||
if (smtpConfig != null)
|
||||
{
|
||||
// there's an smtp config, so load in the snooze time.
|
||||
@@ -525,7 +529,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
m_internalObjectHost = smtpConfig.GetString("internal_object_host", m_internalObjectHost);
|
||||
}
|
||||
|
||||
IConfig chatConfig = seConfigSource.Configs["SMTP"];
|
||||
IConfig chatConfig = seConfigSource.Configs["Chat"];
|
||||
if(chatConfig != null)
|
||||
{
|
||||
m_whisperdistance = chatConfig.GetInt("whisper_distance", m_whisperdistance);
|
||||
@@ -2810,7 +2814,30 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
|
||||
public LSL_Float llGetTimeOfDay()
|
||||
{
|
||||
return (double)((DateTime.Now.TimeOfDay.TotalMilliseconds / 1000) % (3600 * 4));
|
||||
if (m_envModule is null)
|
||||
{
|
||||
return (float)((DateTime.Now.TimeOfDay.TotalMilliseconds / 1000) % (3600 * 4));
|
||||
}
|
||||
else
|
||||
{
|
||||
// Similar as osGetApparentTime(), taking into account parcel environment
|
||||
float frac = m_envModule.GetDayFractionTime(m_host.GetWorldPosition());
|
||||
return 86400 * frac;
|
||||
}
|
||||
}
|
||||
|
||||
public LSL_Float llGetRegionTimeOfDay()
|
||||
{
|
||||
if (m_envModule is null)
|
||||
{
|
||||
return (float)((DateTime.Now.TimeOfDay.TotalMilliseconds / 1000) % (3600 * 4));
|
||||
}
|
||||
else
|
||||
{
|
||||
// Same as osGetApparentTime(), taking into account region environment
|
||||
float frac = m_envModule.GetRegionDayFractionTime();
|
||||
return 86400 * frac;
|
||||
}
|
||||
}
|
||||
|
||||
public LSL_Float llGetWallclock()
|
||||
@@ -5047,7 +5074,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
if (account is null)
|
||||
{
|
||||
GridUserInfo info = World.GridUserService.GetGridUserInfo(destId.ToString());
|
||||
if(info is null || info.Online == false)
|
||||
if(info is null)
|
||||
{
|
||||
Error("llGiveInventory", "Can't find destination '" + destId.ToString() + "'");
|
||||
return;
|
||||
@@ -5252,7 +5279,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
}
|
||||
else
|
||||
{
|
||||
if (data == 7)
|
||||
if (data == 7 || data == 8)
|
||||
reply = "0";
|
||||
}
|
||||
break;
|
||||
@@ -6493,6 +6520,25 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
case "shout_range":
|
||||
return m_shoutdistance.ToString();
|
||||
|
||||
case "region_rating":
|
||||
switch(World.RegionInfo.RegionSettings.Maturity)
|
||||
{
|
||||
case 0: return "PG";
|
||||
case 1: return "MATURE";
|
||||
case 2: return "ADULT";
|
||||
default: return "UNKNOWN";
|
||||
}
|
||||
|
||||
case "grid":
|
||||
return World.SceneGridInfo == null ? string.Empty : World.SceneGridInfo.GridName;
|
||||
|
||||
case "objectmail_hostname":
|
||||
goto case "mailname";
|
||||
case "mailname":
|
||||
if (m_emailModule is not null)
|
||||
return m_internalObjectHost;
|
||||
return "";
|
||||
|
||||
default:
|
||||
return "";
|
||||
}
|
||||
@@ -8138,8 +8184,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
GridInstantMessage msg = new(World, m_host.OwnerID, m_host.Name, destID,
|
||||
(byte)InstantMessageDialog.TaskInventoryOffered,
|
||||
m_host.OwnerID.Equals(m_host.GroupID),
|
||||
string.Format("'{0}'", category),
|
||||
//string.Format("'{0}' ( http://slurl.com/secondlife/{1}/{2}/{3}/{4} )", category, World.Name, (int)pos.X, (int)pos.Y, (int)pos.Z),
|
||||
string.Format("'{0}' ( {1}/{2}/{3}/{4}/{5}/ )", category, m_SlurlPrefix, World.Name, (int)pos.X, (int)pos.Y, (int)pos.Z),
|
||||
folderID, false, pos,
|
||||
bucket, false);
|
||||
|
||||
@@ -10771,8 +10816,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
|
||||
float repeatX = Math.Clamp((float)mnrepeat.x,-100.0f, 100.0f);
|
||||
float repeatY = Math.Clamp((float)mnrepeat.y,-100.0f, 100.0f);
|
||||
float offsetX = Math.Clamp((float)mnoffset.x, 0f, 1.0f);
|
||||
float offsetY = Math.Clamp((float)mnoffset.y, 0f, 1.0f);
|
||||
float offsetX = Math.Clamp((float)mnoffset.x, -1.0f, 1.0f);
|
||||
float offsetY = Math.Clamp((float)mnoffset.y, -1.0f, 1.0f);
|
||||
|
||||
materialChanged |= SetMaterialNormalMap(part, face, mapID, repeatX, repeatY, offsetX, offsetY, mnrot);
|
||||
break;
|
||||
|
||||
@@ -0,0 +1,102 @@
|
||||
/*
|
||||
* 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.Reflection;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using OpenMetaverse;
|
||||
using Nini.Config;
|
||||
using OpenSim;
|
||||
using OpenSim.Framework;
|
||||
using OpenSim.Region.Framework.Interfaces;
|
||||
using OpenSim.Region.Framework.Scenes;
|
||||
using OpenSim.Region.ScriptEngine.Shared;
|
||||
using OpenSim.Region.ScriptEngine.Shared.Api.Plugins;
|
||||
using OpenSim.Region.ScriptEngine.Shared.ScriptBase;
|
||||
using OpenSim.Region.ScriptEngine.Interfaces;
|
||||
using OpenSim.Region.ScriptEngine.Shared.Api.Interfaces;
|
||||
|
||||
using LSL_Float = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLFloat;
|
||||
using LSL_Integer = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger;
|
||||
using LSL_Key = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString;
|
||||
using LSL_List = OpenSim.Region.ScriptEngine.Shared.LSL_Types.list;
|
||||
using LSL_Rotation = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Quaternion;
|
||||
using LSL_String = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString;
|
||||
using LSL_Vector = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Vector3;
|
||||
|
||||
#pragma warning disable IDE1006
|
||||
|
||||
namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
{
|
||||
[Serializable]
|
||||
public class Lickx_Api : ILickx_Api, IScriptApi
|
||||
{
|
||||
internal IScriptEngine m_ScriptEngine;
|
||||
internal SceneObjectPart m_host;
|
||||
internal bool m_LickxFunctionsEnabled = true;
|
||||
internal IScriptModuleComms m_comms = null;
|
||||
|
||||
public void Initialize(IScriptEngine scriptEngine, SceneObjectPart host, TaskInventoryItem item)
|
||||
{
|
||||
m_ScriptEngine = scriptEngine;
|
||||
m_host = host;
|
||||
|
||||
m_comms = m_ScriptEngine.World.RequestModuleInterface<IScriptModuleComms>();
|
||||
if (m_comms == null)
|
||||
m_LickxFunctionsEnabled = false;
|
||||
}
|
||||
|
||||
public Scene World
|
||||
{
|
||||
get { return m_ScriptEngine.World; }
|
||||
}
|
||||
|
||||
internal static void lxError(string msg)
|
||||
{
|
||||
throw new ScriptException("Lickx Runtime Error: " + msg);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the viewer name of an agent
|
||||
/// </summary>
|
||||
/// <param name="avKey">The UUID of the target agent</param>
|
||||
/// <returns>A string containing the viewer name</returns>
|
||||
public LSL_String lxGetAgentViewer(LSL_Key avkey)
|
||||
{
|
||||
if (!UUID.TryParse(avkey.m_string, out UUID avId))
|
||||
return string.Empty;
|
||||
|
||||
AgentCircuitData aCircuit = World.AuthenticateHandler.GetAgentCircuitData(avId);
|
||||
if (aCircuit != null)
|
||||
return Util.GetViewerName(aCircuit);
|
||||
|
||||
return String.Empty;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -223,6 +223,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
|
||||
LSL_Vector llGetTextureScale(int side);
|
||||
LSL_Float llGetTime();
|
||||
LSL_Float llGetTimeOfDay();
|
||||
LSL_Float llGetRegionTimeOfDay();
|
||||
LSL_String llGetTimestamp();
|
||||
LSL_Vector llGetTorque();
|
||||
LSL_Integer llGetUnixTime();
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#pragma warning disable IDE1006
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using OpenSim.Region.ScriptEngine.Interfaces;
|
||||
|
||||
using LSL_Rotation = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Quaternion;
|
||||
using LSL_Vector = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Vector3;
|
||||
using LSL_List = OpenSim.Region.ScriptEngine.Shared.LSL_Types.list;
|
||||
using LSL_String = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString;
|
||||
using LSL_Integer = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger;
|
||||
using LSL_Float = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLFloat;
|
||||
using LSL_Key = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString;
|
||||
|
||||
namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
|
||||
{
|
||||
public interface ILickx_Api
|
||||
{
|
||||
LSL_String lxGetAgentViewer(LSL_Key avkey);
|
||||
}
|
||||
}
|
||||
@@ -1050,6 +1050,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||
public const int SOUND_TRIGGER = 2;
|
||||
public const int SOUND_SYNC = 4;
|
||||
|
||||
// returned by llRequestAgentData
|
||||
public const int PAYMENT_INFO_ON_FILE = 1;
|
||||
public const int PAYMENT_INFO_USED = 2;
|
||||
|
||||
//llRezObjectWithParams Parameters
|
||||
public const int REZ_PARAM = 0;
|
||||
public const int REZ_FLAGS = 1;
|
||||
|
||||
@@ -1040,6 +1040,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||
return m_LSL_Functions.llGetTimeOfDay();
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public LSL_Float llGetRegionTimeOfDay()
|
||||
{
|
||||
return m_LSL_Functions.llGetRegionTimeOfDay();
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public LSL_String llGetTimestamp()
|
||||
{
|
||||
|
||||
61
OpenSim/Region/ScriptEngine/Shared/Api/Runtime/Lickx_Stub.cs
Normal file
61
OpenSim/Region/ScriptEngine/Shared/Api/Runtime/Lickx_Stub.cs
Normal file
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
* 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.Runtime.CompilerServices;
|
||||
|
||||
using OpenSim.Region.ScriptEngine.Interfaces;
|
||||
using OpenSim.Region.ScriptEngine.Shared.Api.Interfaces;
|
||||
using LSL_Vector = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Vector3;
|
||||
using LSL_Rotation = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Quaternion;
|
||||
using LSL_List = OpenSim.Region.ScriptEngine.Shared.LSL_Types.list;
|
||||
using LSL_String = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString;
|
||||
using LSL_Float = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLFloat;
|
||||
using LSL_Integer = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger;
|
||||
using LSL_Key = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString;
|
||||
|
||||
#pragma warning disable IDE1006
|
||||
|
||||
namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||
{
|
||||
public partial class ScriptBaseClass
|
||||
{
|
||||
public ILickx_Api m_Lickx_Functions;
|
||||
|
||||
public void ApiTypeLickx(IScriptApi api)
|
||||
{
|
||||
if (api is ILickx_Api p)
|
||||
m_Lickx_Functions = p;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public LSL_String lxGetAgentViewer(LSL_Key avkey)
|
||||
{
|
||||
return m_Lickx_Functions.lxGetAgentViewer(avkey);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -32,6 +32,7 @@ using System;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Net.Security;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using System.Collections.Generic;
|
||||
using OpenSim.Framework;
|
||||
@@ -50,6 +51,7 @@ namespace OpenSim.Server
|
||||
protected static List<IServiceConnector> m_ServiceConnectors = new();
|
||||
|
||||
protected static PluginLoader loader;
|
||||
private static PosixSignalRegistration m_signalReg;
|
||||
private static bool m_NoVerifyCertChain = false;
|
||||
private static bool m_NoVerifyCertHostname = false;
|
||||
|
||||
@@ -95,13 +97,20 @@ namespace OpenSim.Server
|
||||
Culture.SetCurrentCulture();
|
||||
Culture.SetDefaultCurrentCulture();
|
||||
|
||||
m_signalReg = PosixSignalRegistration.Create(PosixSignal.SIGTERM, context =>
|
||||
{
|
||||
m_log.Info("Received SIGTERM, shutting down");
|
||||
m_Server?.Shutdown();
|
||||
Util.StopThreadPool();
|
||||
});
|
||||
|
||||
ServicePointManager.DefaultConnectionLimit = 64;
|
||||
ServicePointManager.MaxServicePointIdleTime = 30000;
|
||||
|
||||
ServicePointManager.Expect100Continue = false;
|
||||
ServicePointManager.UseNagleAlgorithm = false;
|
||||
ServicePointManager.ServerCertificateValidationCallback = ValidateServerCertificate;
|
||||
|
||||
|
||||
m_Server = new HttpServerBase("R.O.B.U.S.T.", args);
|
||||
|
||||
string registryLocation;
|
||||
|
||||
@@ -434,6 +434,12 @@ namespace OpenSim.Services.HypergridService
|
||||
if (m_ForeignAgentsAllowed && IsException(aCircuit, m_ForeignsAllowedExceptions))
|
||||
allowed = false;
|
||||
|
||||
string iponly = @"http\:\/\/\d+\.\d+\.\d+\.\d+\:\d+";
|
||||
Regex r = new Regex(iponly, RegexOptions.IgnoreCase);
|
||||
Match m = r.Match(aCircuit.ServiceURLs["HomeURI"].ToString());
|
||||
if (m_ForeignAgentsAllowed && m.Success)
|
||||
allowed = false; // HomeURI is an ip address, not a proper hostname
|
||||
|
||||
if (!m_ForeignAgentsAllowed && IsException(aCircuit, m_ForeignsDisallowedExceptions))
|
||||
allowed = true;
|
||||
|
||||
|
||||
@@ -114,7 +114,7 @@ namespace OpenSim.Services.HypergridService
|
||||
}
|
||||
catch
|
||||
{
|
||||
m_log.WarnFormat("[HG IM SERVICE]: Unable to load PresenceService");
|
||||
m_log.WarnFormat("[HG IM SERVICE]: Unable to load UserAgentService");
|
||||
}
|
||||
|
||||
m_InGatekeeper = serverConfig.GetBoolean("InGatekeeper", false);
|
||||
@@ -122,7 +122,7 @@ namespace OpenSim.Services.HypergridService
|
||||
IConfig cnf = config.Configs["Messaging"];
|
||||
if (cnf == null)
|
||||
{
|
||||
m_log.Debug("[HG IM SERVICE]: Starting (without [MEssaging])");
|
||||
m_log.Debug("[HG IM SERVICE]: Starting (without [Messaging])");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -11,11 +11,13 @@ namespace OpenSim.Services.HypergridService
|
||||
{
|
||||
public class UserAccountCache : IUserAccountService
|
||||
{
|
||||
private const double CACHE_EXPIRATION_SECONDS = 120000.0; // 33 hours!
|
||||
private const double CACHE_ALIEN_EXPIRATION_SECONDS = 7200.0; // 2 hours
|
||||
private const double CACHE_EXPIRATION_SECONDS = 3600; // 1 hour // 120000.0; // 33 hours!
|
||||
private const double CACHE_NULL_EXPIRATION_SECONDS = 600; // 10 minutes
|
||||
|
||||
// private static readonly ILog m_log =
|
||||
// LogManager.GetLogger(
|
||||
// MethodBase.GetCurrentMethod().DeclaringType);
|
||||
//private static readonly ILog m_log =
|
||||
// LogManager.GetLogger(
|
||||
// MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private ExpiringCache<UUID, UserAccount> m_UUIDCache;
|
||||
|
||||
@@ -40,7 +42,20 @@ namespace OpenSim.Services.HypergridService
|
||||
public void Cache(UUID userID, UserAccount account)
|
||||
{
|
||||
// Cache even null accounts
|
||||
m_UUIDCache.AddOrUpdate(userID, account, CACHE_EXPIRATION_SECONDS);
|
||||
if (account is null)
|
||||
{
|
||||
m_UUIDCache.AddOrUpdate(userID, account, CACHE_NULL_EXPIRATION_SECONDS);
|
||||
return;
|
||||
}
|
||||
|
||||
if (account.LocalToGrid)
|
||||
{
|
||||
m_UUIDCache.AddOrUpdate(userID, account, CACHE_EXPIRATION_SECONDS);
|
||||
return;
|
||||
}
|
||||
|
||||
// Foreigners
|
||||
m_UUIDCache.AddOrUpdate(userID, account, CACHE_ALIEN_EXPIRATION_SECONDS);
|
||||
|
||||
//m_log.DebugFormat("[USER CACHE]: cached user {0}", userID);
|
||||
}
|
||||
|
||||
@@ -44,6 +44,7 @@ namespace OpenSim.Services.PresenceService
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
protected bool m_allowDuplicatePresences = false;
|
||||
protected bool m_useCache = true;
|
||||
const int EXPIREMS = 300000;
|
||||
static ExpiringCacheOS<UUID, PresenceData> BySessionCache = new ExpiringCacheOS<UUID, PresenceData>(60000);
|
||||
static ExpiringCacheOS<string, PresenceData> ByUserCache = new ExpiringCacheOS<string, PresenceData>(60000);
|
||||
@@ -57,23 +58,32 @@ namespace OpenSim.Services.PresenceService
|
||||
if (presenceConfig != null)
|
||||
{
|
||||
m_allowDuplicatePresences = presenceConfig.GetBoolean("AllowDuplicatePresences", m_allowDuplicatePresences);
|
||||
m_useCache = presenceConfig.GetBoolean("UseCache", m_useCache);
|
||||
}
|
||||
}
|
||||
|
||||
public bool LoginAgent(string userID, UUID sessionID, UUID secureSessionID)
|
||||
{
|
||||
bool inCache = ByUserCache.TryGetValue(userID, out PresenceData prevUser);
|
||||
if (!inCache)
|
||||
bool inCache = false;
|
||||
PresenceData prevUser;
|
||||
|
||||
if (m_useCache)
|
||||
{
|
||||
PresenceData[] dataprv = m_Database.Get("UserID", userID);
|
||||
if (dataprv.Length > 0)
|
||||
prevUser = dataprv[0];
|
||||
inCache = ByUserCache.TryGetValue(userID, out prevUser);
|
||||
if (!inCache)
|
||||
{
|
||||
PresenceData[] dataprv = m_Database.Get("UserID", userID);
|
||||
if (dataprv.Length > 0)
|
||||
prevUser = dataprv[0];
|
||||
}
|
||||
}
|
||||
else
|
||||
prevUser = GetUser(userID);
|
||||
|
||||
if (!m_allowDuplicatePresences && (prevUser != null))
|
||||
{
|
||||
m_Database.Delete("UserID", userID.ToString());
|
||||
if(inCache)
|
||||
if(m_useCache && inCache)
|
||||
{
|
||||
BySessionCache.Remove(prevUser.SessionID);
|
||||
ByUserCache.Remove(userID);
|
||||
@@ -89,8 +99,11 @@ namespace OpenSim.Services.PresenceService
|
||||
data.Data["SecureSessionID"] = secureSessionID.ToString();
|
||||
|
||||
m_Database.Store(data);
|
||||
BySessionCache.Add(sessionID, data, EXPIREMS);
|
||||
ByUserCache.Add(userID, data, EXPIREMS);
|
||||
if (m_useCache)
|
||||
{
|
||||
BySessionCache.Add(sessionID, data, EXPIREMS);
|
||||
ByUserCache.Add(userID, data, EXPIREMS);
|
||||
}
|
||||
|
||||
string prevUserStr = "";
|
||||
if (prevUser != null)
|
||||
@@ -104,8 +117,16 @@ namespace OpenSim.Services.PresenceService
|
||||
|
||||
public bool LogoutAgent(UUID sessionID)
|
||||
{
|
||||
bool inCache = BySessionCache.TryGetValue(sessionID, out PresenceData presence);
|
||||
if(!inCache)
|
||||
bool inCache = false;
|
||||
PresenceData presence;
|
||||
|
||||
if (m_useCache)
|
||||
{
|
||||
inCache = BySessionCache.TryGetValue(sessionID, out presence);
|
||||
if(!inCache)
|
||||
presence = m_Database.Get(sessionID);
|
||||
}
|
||||
else
|
||||
presence = m_Database.Get(sessionID);
|
||||
|
||||
m_log.DebugFormat("[PRESENCE SERVICE]: LogoutAgent: session {0}, user {1}, region {2}",
|
||||
@@ -114,7 +135,7 @@ namespace OpenSim.Services.PresenceService
|
||||
(presence == null) ? null : presence.RegionID.ToString());
|
||||
|
||||
bool ret = m_Database.Delete("SessionID", sessionID.ToString());
|
||||
if(inCache)
|
||||
if(m_useCache && inCache)
|
||||
{
|
||||
BySessionCache.Remove(sessionID);
|
||||
if(presence is not null)
|
||||
@@ -130,11 +151,14 @@ namespace OpenSim.Services.PresenceService
|
||||
return true;
|
||||
|
||||
m_log.DebugFormat("[PRESENCE SERVICE]: Logout users in region {0}", regionID);
|
||||
for (int i = 0; i < prevSessions.Length; ++i)
|
||||
if (m_useCache)
|
||||
{
|
||||
PresenceData pd = prevSessions[i];
|
||||
BySessionCache.Remove(pd.SessionID);
|
||||
ByUserCache.Remove(pd.UserID);
|
||||
for (int i = 0; i < prevSessions.Length; ++i)
|
||||
{
|
||||
PresenceData pd = prevSessions[i];
|
||||
BySessionCache.Remove(pd.SessionID);
|
||||
ByUserCache.Remove(pd.UserID);
|
||||
}
|
||||
}
|
||||
|
||||
// There's a small chance that LogoutRegionAgents() will logout different users than the
|
||||
@@ -149,8 +173,16 @@ namespace OpenSim.Services.PresenceService
|
||||
{
|
||||
try
|
||||
{
|
||||
bool inCache = BySessionCache.TryGetValue(sessionID, out PresenceData presence);
|
||||
if(!inCache)
|
||||
bool inCache = false;
|
||||
PresenceData presence;
|
||||
|
||||
if (m_useCache)
|
||||
{
|
||||
inCache = BySessionCache.TryGetValue(sessionID, out presence);
|
||||
if(!inCache)
|
||||
presence = m_Database.Get(sessionID);
|
||||
}
|
||||
else
|
||||
presence = m_Database.Get(sessionID);
|
||||
|
||||
bool success;
|
||||
@@ -164,16 +196,19 @@ namespace OpenSim.Services.PresenceService
|
||||
sessionID, (presence == null) ? null : presence.UserID, regionID,
|
||||
(presence == null) ? "not logged-in" : "region " + presence.RegionID);
|
||||
|
||||
if (success)
|
||||
if (m_useCache)
|
||||
{
|
||||
presence.RegionID = regionID;
|
||||
BySessionCache.Add(sessionID, presence, EXPIREMS); // lastseen seems unused
|
||||
ByUserCache.Add(presence.UserID, presence, EXPIREMS); // lastseen seems unused
|
||||
}
|
||||
else if (inCache)
|
||||
{
|
||||
BySessionCache.Remove(sessionID);
|
||||
ByUserCache.Remove(presence.UserID);
|
||||
if (success)
|
||||
{
|
||||
presence.RegionID = regionID;
|
||||
BySessionCache.Add(sessionID, presence, EXPIREMS); // lastseen seems unused
|
||||
ByUserCache.Add(presence.UserID, presence, EXPIREMS); // lastseen seems unused
|
||||
}
|
||||
else if (inCache)
|
||||
{
|
||||
BySessionCache.Remove(sessionID);
|
||||
ByUserCache.Remove(presence.UserID);
|
||||
}
|
||||
}
|
||||
|
||||
return success;
|
||||
@@ -187,14 +222,24 @@ namespace OpenSim.Services.PresenceService
|
||||
|
||||
public PresenceInfo GetAgent(UUID sessionID)
|
||||
{
|
||||
if(!BySessionCache.TryGetValue(sessionID, out PresenceData data))
|
||||
PresenceData data;
|
||||
|
||||
if (m_useCache)
|
||||
{
|
||||
if(!BySessionCache.TryGetValue(sessionID, out data))
|
||||
data = m_Database.Get(sessionID);
|
||||
}
|
||||
else
|
||||
data = m_Database.Get(sessionID);
|
||||
|
||||
if (data == null)
|
||||
return null;
|
||||
|
||||
BySessionCache.Add(sessionID, data, EXPIREMS);
|
||||
ByUserCache.Add(data.UserID, data, EXPIREMS);
|
||||
if (m_useCache)
|
||||
{
|
||||
BySessionCache.Add(sessionID, data, EXPIREMS);
|
||||
ByUserCache.Add(data.UserID, data, EXPIREMS);
|
||||
}
|
||||
|
||||
var ret = new PresenceInfo()
|
||||
{
|
||||
@@ -210,8 +255,9 @@ namespace OpenSim.Services.PresenceService
|
||||
PresenceInfo ret;
|
||||
foreach (string userIDStr in userIDs)
|
||||
{
|
||||
if(ByUserCache.TryGetValue(userIDStr, out PresenceData pd))
|
||||
if(m_useCache && ByUserCache.TryGetValue(userIDStr, out PresenceData pd))
|
||||
{
|
||||
// cache hit
|
||||
ByUserCache.Add(pd.UserID, pd, EXPIREMS);
|
||||
BySessionCache.Add(pd.SessionID, pd, EXPIREMS);
|
||||
ret = new PresenceInfo()
|
||||
@@ -223,12 +269,16 @@ namespace OpenSim.Services.PresenceService
|
||||
}
|
||||
else
|
||||
{
|
||||
// no cache used or cache miss
|
||||
PresenceData[] data = m_Database.Get("UserID", userIDStr);
|
||||
if(data.Length == 0)
|
||||
continue;
|
||||
PresenceData d = data[0];
|
||||
ByUserCache.Add(d.UserID, d, EXPIREMS);
|
||||
BySessionCache.Add(d.SessionID, d, EXPIREMS);
|
||||
if (m_useCache)
|
||||
{
|
||||
ByUserCache.Add(d.UserID, d, EXPIREMS);
|
||||
BySessionCache.Add(d.SessionID, d, EXPIREMS);
|
||||
}
|
||||
ret = new PresenceInfo()
|
||||
{
|
||||
UserID = d.UserID,
|
||||
@@ -243,6 +293,18 @@ namespace OpenSim.Services.PresenceService
|
||||
return info.ToArray();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Return the user's Presence. This only really works well if !AllowDuplicatePresences, but that's the default.
|
||||
/// </summary>
|
||||
private PresenceData GetUser(string userID)
|
||||
{
|
||||
PresenceData[] data = m_Database.Get("UserID", userID);
|
||||
if (data.Length > 0)
|
||||
return data[0];
|
||||
else
|
||||
return null;
|
||||
}
|
||||
|
||||
private PresenceData[] GetRegionAgents(UUID regionID)
|
||||
{
|
||||
return m_Database.Get("RegionID", regionID.ToString());
|
||||
|
||||
@@ -44,6 +44,7 @@ namespace OpenSim.Services.UserAccountService
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
private static bool m_Initialized;
|
||||
protected bool m_useCache = true;
|
||||
|
||||
public GridUserService(IConfigSource config) : base(config)
|
||||
{
|
||||
@@ -69,6 +70,13 @@ namespace OpenSim.Services.UserAccountService
|
||||
"This number may not be accurate as a region may crash or not be cleanly shutdown and leave grid users shown as online\n."
|
||||
+ "For this reason, users online for more than 5 days are not currently counted",
|
||||
HandleShowGridUsersOnline);
|
||||
|
||||
IConfig griduserConfig = config.Configs["GridUserService"];
|
||||
if (griduserConfig != null)
|
||||
{
|
||||
m_useCache = griduserConfig.GetBoolean("UseCache", m_useCache);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -132,13 +140,13 @@ namespace OpenSim.Services.UserAccountService
|
||||
if (userID.Length > 36)
|
||||
userID = userID.Substring(0, 36);
|
||||
|
||||
if (cache.TryGetValue(userID, out GridUserData d))
|
||||
return d;
|
||||
if (m_useCache && cache.TryGetValue(userID, out GridUserData d))
|
||||
return d;
|
||||
|
||||
GridUserData[] ds = m_Database.GetAll(userID);
|
||||
if (ds == null || ds.Length == 0)
|
||||
{
|
||||
cache.Add(userID, null, 300000);
|
||||
if (m_useCache) cache.Add(userID, null, 300000);
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -168,7 +176,7 @@ namespace OpenSim.Services.UserAccountService
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
cache.Add(userID, d, 300000);
|
||||
if (m_useCache) cache.Add(userID, d, 300000);
|
||||
return d;
|
||||
}
|
||||
|
||||
@@ -249,7 +257,7 @@ namespace OpenSim.Services.UserAccountService
|
||||
d.Data["Login"] = Util.UnixTimeSinceEpoch().ToString();
|
||||
|
||||
m_Database.Store(d);
|
||||
if (userID.Length >= 36)
|
||||
if (m_useCache && userID.Length >= 36)
|
||||
cache.Add(userID.Substring(0, 36), d, 300000);
|
||||
|
||||
return ToInfo(d);
|
||||
@@ -275,7 +283,7 @@ namespace OpenSim.Services.UserAccountService
|
||||
|
||||
if(m_Database.Store(d))
|
||||
{
|
||||
if (userID.Length >= 36)
|
||||
if (m_useCache && userID.Length >= 36)
|
||||
cache.Add(userID.Substring(0, 36), d, 300000);
|
||||
return true;
|
||||
}
|
||||
@@ -298,7 +306,7 @@ namespace OpenSim.Services.UserAccountService
|
||||
|
||||
if(m_Database.Store(d))
|
||||
{
|
||||
if (userID.Length >= 36)
|
||||
if (m_useCache && userID.Length >= 36)
|
||||
cache.Add(userID.Substring(0, 36), d, 300000);
|
||||
return true;
|
||||
}
|
||||
@@ -323,7 +331,7 @@ namespace OpenSim.Services.UserAccountService
|
||||
|
||||
if(m_Database.Store(d))
|
||||
{
|
||||
if (userID.Length >= 36)
|
||||
if (m_useCache && userID.Length >= 36)
|
||||
cache.Add(userID.Substring(0, 36), d, 300000);
|
||||
return true;
|
||||
}
|
||||
|
||||
732
addon-modules/OpenSimSearch/Modules/SearchModule/OpenSearch.cs
Normal file
732
addon-modules/OpenSimSearch/Modules/SearchModule/OpenSearch.cs
Normal file
@@ -0,0 +1,732 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Net;
|
||||
using System.Net.Sockets;
|
||||
using System.Reflection;
|
||||
using System.Xml;
|
||||
using OpenMetaverse;
|
||||
using log4net;
|
||||
using Nini.Config;
|
||||
using Nwc.XmlRpc;
|
||||
using OpenSim.Framework;
|
||||
using OpenSim.Region.Framework.Interfaces;
|
||||
using OpenSim.Region.Framework.Scenes;
|
||||
using OpenSim.Services.Interfaces;
|
||||
using Mono.Addins;
|
||||
|
||||
using DirFindFlags = OpenMetaverse.DirectoryManager.DirFindFlags;
|
||||
|
||||
[assembly: Addin("OpenSimSearch", OpenSim.VersionInfo.VersionNumber + "0.4")]
|
||||
[assembly: AddinDependency("OpenSim.Region.Framework", OpenSim.VersionInfo.VersionNumber)]
|
||||
[assembly: AddinDescription("OpenSimSearch module.")]
|
||||
[assembly: AddinAuthor("Unknown")]
|
||||
|
||||
|
||||
namespace OpenSimSearch.Modules.OpenSearch
|
||||
{
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "OpenSimSearch")]
|
||||
public class OpenSearchModule : ISearchModule, ISharedRegionModule
|
||||
{
|
||||
//
|
||||
// Log module
|
||||
//
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
//
|
||||
// Module vars
|
||||
//
|
||||
private List<Scene> m_Scenes = new();
|
||||
private string m_SearchServer = "";
|
||||
private bool m_Enabled = true;
|
||||
|
||||
#region IRegionModuleBase implementation
|
||||
public void Initialise(IConfigSource config)
|
||||
{
|
||||
IConfig searchConfig = config.Configs["Search"];
|
||||
|
||||
if (searchConfig is null)
|
||||
{
|
||||
m_Enabled = false;
|
||||
return;
|
||||
}
|
||||
if (searchConfig.GetString("Module", "OpenSimSearch") != "OpenSimSearch")
|
||||
{
|
||||
m_Enabled = false;
|
||||
return;
|
||||
}
|
||||
|
||||
m_SearchServer = searchConfig.GetString("SearchURL", "");
|
||||
if (m_SearchServer == "")
|
||||
{
|
||||
m_Enabled = false;
|
||||
return;
|
||||
}
|
||||
|
||||
m_log.Info("[SEARCH] OpenSimSearch module is active");
|
||||
m_Enabled = true;
|
||||
}
|
||||
|
||||
public void AddRegion(Scene scene)
|
||||
{
|
||||
if (!m_Enabled)
|
||||
return;
|
||||
|
||||
// Hook up events
|
||||
scene.EventManager.OnNewClient += OnNewClient;
|
||||
|
||||
// Take ownership of the ISearchModule service
|
||||
scene.RegisterModuleInterface<ISearchModule>(this);
|
||||
|
||||
// Add our scene to our list...
|
||||
lock(m_Scenes)
|
||||
{
|
||||
m_Scenes.Add(scene);
|
||||
}
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene scene)
|
||||
{
|
||||
if (!m_Enabled)
|
||||
return;
|
||||
|
||||
scene.UnregisterModuleInterface<ISearchModule>(this);
|
||||
|
||||
scene.EventManager.OnNewClient -= OnNewClient;
|
||||
|
||||
lock(m_Scenes)
|
||||
{
|
||||
m_Scenes.Remove(scene);
|
||||
}
|
||||
}
|
||||
|
||||
public void RegionLoaded(Scene scene)
|
||||
{
|
||||
}
|
||||
|
||||
public Type ReplaceableInterface
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
public void PostInitialise()
|
||||
{
|
||||
}
|
||||
|
||||
public void Close()
|
||||
{
|
||||
}
|
||||
|
||||
public string Name
|
||||
{
|
||||
get { return "OpenSimSearch"; }
|
||||
}
|
||||
|
||||
public static bool IsSharedModule
|
||||
{
|
||||
get { return true; }
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// New Client Event Handler
|
||||
private void OnNewClient(IClientAPI client)
|
||||
{
|
||||
// Subscribe to messages
|
||||
client.OnDirPlacesQuery += DirPlacesQuery;
|
||||
client.OnDirFindQuery += DirFindQuery;
|
||||
client.OnDirPopularQuery += DirPopularQuery;
|
||||
client.OnDirLandQuery += DirLandQuery;
|
||||
client.OnDirClassifiedQuery += DirClassifiedQuery;
|
||||
// Response after Directory Queries
|
||||
client.OnEventInfoRequest += EventInfoRequest;
|
||||
client.OnClassifiedInfoRequest += ClassifiedInfoRequest;
|
||||
client.OnMapItemRequest += HandleMapItemRequest;
|
||||
}
|
||||
|
||||
//
|
||||
// Make external XMLRPC request
|
||||
//
|
||||
private Hashtable GenericXMLRPCRequest(Hashtable ReqParams, string method)
|
||||
{
|
||||
ArrayList SendParams = new()
|
||||
{
|
||||
ReqParams
|
||||
};
|
||||
|
||||
// Send Request
|
||||
XmlRpcResponse Resp;
|
||||
try
|
||||
{
|
||||
XmlRpcRequest Req = new(method, SendParams);
|
||||
Resp = Req.Send(m_SearchServer, 30000);
|
||||
}
|
||||
catch (WebException ex)
|
||||
{
|
||||
m_log.ErrorFormat("[SEARCH]: Unable to connect to Search " +
|
||||
"Server {0}. Exception {1}", m_SearchServer, ex);
|
||||
|
||||
Hashtable ErrorHash = new()
|
||||
{
|
||||
["success"] = false,
|
||||
["errorMessage"] = "Unable to search at this time. ",
|
||||
["errorURI"] = ""
|
||||
};
|
||||
|
||||
return ErrorHash;
|
||||
}
|
||||
catch (SocketException ex)
|
||||
{
|
||||
m_log.ErrorFormat(
|
||||
"[SEARCH]: Unable to connect to Search Server {0}. " +
|
||||
"Exception {1}", m_SearchServer, ex);
|
||||
|
||||
Hashtable ErrorHash = new()
|
||||
{
|
||||
["success"] = false,
|
||||
["errorMessage"] = "Unable to search at this time. ",
|
||||
["errorURI"] = ""
|
||||
};
|
||||
|
||||
return ErrorHash;
|
||||
}
|
||||
catch (XmlException ex)
|
||||
{
|
||||
m_log.ErrorFormat(
|
||||
"[SEARCH]: Unable to connect to Search Server {0}. " +
|
||||
"Exception {1}", m_SearchServer, ex);
|
||||
|
||||
Hashtable ErrorHash = new()
|
||||
{
|
||||
["success"] = false,
|
||||
["errorMessage"] = "Unable to search at this time. ",
|
||||
["errorURI"] = ""
|
||||
};
|
||||
|
||||
return ErrorHash;
|
||||
}
|
||||
if (Resp.IsFault)
|
||||
{
|
||||
Hashtable ErrorHash = new()
|
||||
{
|
||||
["success"] = false,
|
||||
["errorMessage"] = "Unable to search at this time. ",
|
||||
["errorURI"] = ""
|
||||
};
|
||||
return ErrorHash;
|
||||
}
|
||||
Hashtable RespData = (Hashtable)Resp.Value;
|
||||
|
||||
return RespData;
|
||||
}
|
||||
|
||||
protected void DirPlacesQuery(IClientAPI remoteClient, UUID queryID,
|
||||
string queryText, int queryFlags, int category, string simName,
|
||||
int queryStart)
|
||||
{
|
||||
Hashtable ReqHash = new()
|
||||
{
|
||||
["text"] = queryText,
|
||||
["flags"] = queryFlags.ToString(),
|
||||
["category"] = category.ToString(),
|
||||
["sim_name"] = simName,
|
||||
["query_start"] = queryStart.ToString()
|
||||
};
|
||||
|
||||
Hashtable result = GenericXMLRPCRequest(ReqHash, "dir_places_query");
|
||||
|
||||
if (!Convert.ToBoolean(result["success"]))
|
||||
{
|
||||
remoteClient.SendAgentAlertMessage(result["errorMessage"].ToString(), false);
|
||||
return;
|
||||
}
|
||||
|
||||
ArrayList dataArray = (ArrayList)result["data"];
|
||||
|
||||
int count = (dataArray.Count > 100) ? 101 : dataArray.Count;
|
||||
|
||||
DirPlacesReplyData[] data = new DirPlacesReplyData[count];
|
||||
|
||||
int i = 0;
|
||||
|
||||
foreach (Object o in dataArray)
|
||||
{
|
||||
Hashtable d = (Hashtable)o;
|
||||
|
||||
data[i] = new DirPlacesReplyData
|
||||
{
|
||||
parcelID = new UUID(d["parcel_id"].ToString()),
|
||||
name = d["name"].ToString(),
|
||||
forSale = Convert.ToBoolean(d["for_sale"]),
|
||||
auction = Convert.ToBoolean(d["auction"]),
|
||||
dwell = Convert.ToSingle(d["dwell"])
|
||||
};
|
||||
|
||||
if (++i >= count)
|
||||
break;
|
||||
}
|
||||
|
||||
remoteClient.SendDirPlacesReply(queryID, data);
|
||||
}
|
||||
|
||||
public void DirPopularQuery(IClientAPI remoteClient, UUID queryID, uint queryFlags)
|
||||
{
|
||||
Hashtable ReqHash = new()
|
||||
{
|
||||
["flags"] = queryFlags.ToString()
|
||||
};
|
||||
|
||||
Hashtable result = GenericXMLRPCRequest(ReqHash, "dir_popular_query");
|
||||
|
||||
if (!Convert.ToBoolean(result["success"]))
|
||||
{
|
||||
remoteClient.SendAgentAlertMessage(result["errorMessage"].ToString(), false);
|
||||
return;
|
||||
}
|
||||
|
||||
ArrayList dataArray = (ArrayList)result["data"];
|
||||
|
||||
int count = (dataArray.Count > 100) ? 101 : dataArray.Count;
|
||||
|
||||
DirPopularReplyData[] data = new DirPopularReplyData[count];
|
||||
|
||||
int i = 0;
|
||||
|
||||
foreach (Object o in dataArray)
|
||||
{
|
||||
Hashtable d = (Hashtable)o;
|
||||
|
||||
data[i] = new DirPopularReplyData
|
||||
{
|
||||
parcelID = new UUID(d["parcel_id"].ToString()),
|
||||
name = d["name"].ToString(),
|
||||
dwell = Convert.ToSingle(d["dwell"])
|
||||
};
|
||||
|
||||
if (++i >= count)
|
||||
break;
|
||||
}
|
||||
|
||||
remoteClient.SendDirPopularReply(queryID, data);
|
||||
}
|
||||
|
||||
public void DirLandQuery(IClientAPI remoteClient, UUID queryID,
|
||||
uint queryFlags, uint searchType, int price, int area,
|
||||
int queryStart)
|
||||
{
|
||||
Hashtable ReqHash = new()
|
||||
{
|
||||
["flags"] = queryFlags.ToString(),
|
||||
["type"] = searchType.ToString(),
|
||||
["price"] = price.ToString(),
|
||||
["area"] = area.ToString(),
|
||||
["query_start"] = queryStart.ToString()
|
||||
};
|
||||
|
||||
Hashtable result = GenericXMLRPCRequest(ReqHash, "dir_land_query");
|
||||
|
||||
if (!Convert.ToBoolean(result["success"]))
|
||||
{
|
||||
remoteClient.SendAgentAlertMessage(result["errorMessage"].ToString(), false);
|
||||
return;
|
||||
}
|
||||
|
||||
ArrayList dataArray = (ArrayList)result["data"];
|
||||
int count = 0;
|
||||
|
||||
/* Count entries in dataArray with valid region name to */
|
||||
/* prevent allocating data array with too many entries. */
|
||||
foreach (Object o in dataArray)
|
||||
{
|
||||
Hashtable d = (Hashtable)o;
|
||||
|
||||
if (d["name"] is not null)
|
||||
++count;
|
||||
}
|
||||
|
||||
count = (count > 100) ? 101 : count;
|
||||
|
||||
DirLandReplyData[] data = new DirLandReplyData[count];
|
||||
|
||||
int i = 0;
|
||||
|
||||
foreach (Object o in dataArray)
|
||||
{
|
||||
Hashtable d = (Hashtable)o;
|
||||
|
||||
if (d["name"] is null)
|
||||
continue;
|
||||
|
||||
data[i] = new DirLandReplyData
|
||||
{
|
||||
parcelID = new UUID(d["parcel_id"].ToString()),
|
||||
name = d["name"].ToString(),
|
||||
auction = Convert.ToBoolean(d["auction"]),
|
||||
forSale = Convert.ToBoolean(d["for_sale"]),
|
||||
salePrice = Convert.ToInt32(d["sale_price"]),
|
||||
actualArea = Convert.ToInt32(d["area"])
|
||||
};
|
||||
|
||||
if (++i >= count)
|
||||
break;
|
||||
}
|
||||
|
||||
remoteClient.SendDirLandReply(queryID, data);
|
||||
}
|
||||
|
||||
public void DirFindQuery(IClientAPI remoteClient, UUID queryID,
|
||||
string queryText, uint queryFlags, int queryStart)
|
||||
{
|
||||
if (((DirFindFlags)queryFlags & DirFindFlags.DateEvents) == DirFindFlags.DateEvents)
|
||||
{
|
||||
DirEventsQuery(remoteClient, queryID, queryText, queryFlags,
|
||||
queryStart);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
public void DirEventsQuery(IClientAPI remoteClient, UUID queryID,
|
||||
string queryText, uint queryFlags, int queryStart)
|
||||
{
|
||||
Hashtable ReqHash = new()
|
||||
{
|
||||
["text"] = queryText,
|
||||
["flags"] = queryFlags.ToString(),
|
||||
["query_start"] = queryStart.ToString()
|
||||
};
|
||||
|
||||
Hashtable result = GenericXMLRPCRequest(ReqHash, "dir_events_query");
|
||||
|
||||
if (!Convert.ToBoolean(result["success"]))
|
||||
{
|
||||
remoteClient.SendAgentAlertMessage(result["errorMessage"].ToString(), false);
|
||||
return;
|
||||
}
|
||||
|
||||
ArrayList dataArray = (ArrayList)result["data"];
|
||||
|
||||
int count = (dataArray.Count > 100) ? 101 : dataArray.Count;
|
||||
|
||||
DirEventsReplyData[] data = new DirEventsReplyData[count];
|
||||
|
||||
int i = 0;
|
||||
|
||||
foreach (Object o in dataArray)
|
||||
{
|
||||
Hashtable d = (Hashtable)o;
|
||||
|
||||
data[i] = new DirEventsReplyData
|
||||
{
|
||||
ownerID = new UUID(d["owner_id"].ToString()),
|
||||
name = d["name"].ToString(),
|
||||
eventID = Convert.ToUInt32(d["event_id"]),
|
||||
date = d["date"].ToString(),
|
||||
unixTime = Convert.ToUInt32(d["unix_time"]),
|
||||
eventFlags = Convert.ToUInt32(d["event_flags"])
|
||||
};
|
||||
|
||||
if (++i >= count)
|
||||
break;
|
||||
}
|
||||
|
||||
remoteClient.SendDirEventsReply(queryID, data);
|
||||
}
|
||||
|
||||
public void DirClassifiedQuery(IClientAPI remoteClient, UUID queryID,
|
||||
string queryText, uint queryFlags, uint category,
|
||||
int queryStart)
|
||||
{
|
||||
Hashtable ReqHash = new()
|
||||
{
|
||||
["text"] = queryText,
|
||||
["flags"] = queryFlags.ToString(),
|
||||
["category"] = category.ToString(),
|
||||
["query_start"] = queryStart.ToString()
|
||||
};
|
||||
|
||||
Hashtable result = GenericXMLRPCRequest(ReqHash, "dir_classified_query");
|
||||
|
||||
if (!Convert.ToBoolean(result["success"]))
|
||||
{
|
||||
remoteClient.SendAgentAlertMessage(result["errorMessage"].ToString(), false);
|
||||
return;
|
||||
}
|
||||
|
||||
ArrayList dataArray = (ArrayList)result["data"];
|
||||
|
||||
int count = (dataArray.Count > 100) ? 101 : dataArray.Count;
|
||||
|
||||
DirClassifiedReplyData[] data = new DirClassifiedReplyData[count];
|
||||
|
||||
int i = 0;
|
||||
|
||||
foreach (Object o in dataArray)
|
||||
{
|
||||
Hashtable d = (Hashtable)o;
|
||||
|
||||
data[i] = new DirClassifiedReplyData
|
||||
{
|
||||
classifiedID = new UUID(d["classifiedid"].ToString()),
|
||||
name = d["name"].ToString(),
|
||||
classifiedFlags = Convert.ToByte(d["classifiedflags"]),
|
||||
creationDate = Convert.ToUInt32(d["creation_date"]),
|
||||
expirationDate = Convert.ToUInt32(d["expiration_date"]),
|
||||
price = Convert.ToInt32(d["priceforlisting"])
|
||||
};
|
||||
|
||||
if (++i >= count)
|
||||
break;
|
||||
}
|
||||
|
||||
remoteClient.SendDirClassifiedReply(queryID, data);
|
||||
}
|
||||
|
||||
public void EventInfoRequest(IClientAPI remoteClient, uint queryEventID)
|
||||
{
|
||||
Hashtable ReqHash = new()
|
||||
{
|
||||
["eventID"] = queryEventID.ToString()
|
||||
};
|
||||
|
||||
Hashtable result = GenericXMLRPCRequest(ReqHash, "event_info_query");
|
||||
|
||||
if (!Convert.ToBoolean(result["success"]))
|
||||
{
|
||||
remoteClient.SendAgentAlertMessage(result["errorMessage"].ToString(), false);
|
||||
return;
|
||||
}
|
||||
|
||||
ArrayList dataArray = (ArrayList)result["data"];
|
||||
if (dataArray.Count == 0)
|
||||
{
|
||||
// something bad happened here, if we could return an
|
||||
// event after the search,
|
||||
// we should be able to find it here
|
||||
// TODO do some (more) sensible error-handling here
|
||||
remoteClient.SendAgentAlertMessage("Couldn't find this event.",
|
||||
false);
|
||||
return;
|
||||
}
|
||||
|
||||
Hashtable d = (Hashtable)dataArray[0];
|
||||
EventData data = new()
|
||||
{
|
||||
eventID = Convert.ToUInt32(d["event_id"]),
|
||||
creator = d["creator"].ToString(),
|
||||
name = d["name"].ToString(),
|
||||
category = d["category"].ToString(),
|
||||
description = d["description"].ToString(),
|
||||
date = d["date"].ToString(),
|
||||
dateUTC = Convert.ToUInt32(d["dateUTC"]),
|
||||
duration = Convert.ToUInt32(d["duration"]),
|
||||
cover = Convert.ToUInt32(d["covercharge"]),
|
||||
amount = Convert.ToUInt32(d["coveramount"]),
|
||||
simName = d["simname"].ToString()
|
||||
};
|
||||
data.globalPos = (Vector3.TryParse(d["globalposition"].ToString(), out data.globalPos)) ? data.globalPos : new();
|
||||
data.eventFlags = Convert.ToUInt32(d["eventflags"]);
|
||||
|
||||
remoteClient.SendEventInfoReply(data);
|
||||
}
|
||||
|
||||
public void ClassifiedInfoRequest(UUID queryClassifiedID, IClientAPI remoteClient)
|
||||
{
|
||||
Hashtable ReqHash = new()
|
||||
{
|
||||
["classifiedID"] = queryClassifiedID.ToString()
|
||||
};
|
||||
|
||||
Hashtable result = GenericXMLRPCRequest(ReqHash, "classifieds_info_query");
|
||||
|
||||
if (!Convert.ToBoolean(result["success"]))
|
||||
{
|
||||
remoteClient.SendAgentAlertMessage(result["errorMessage"].ToString(), false);
|
||||
return;
|
||||
}
|
||||
|
||||
//The viewer seems to issue an info request even when it is
|
||||
//creating a new classified which means the data hasn't been
|
||||
//saved to the database yet so there is no info to find.
|
||||
ArrayList dataArray = (ArrayList)result["data"];
|
||||
if (dataArray.Count == 0)
|
||||
{
|
||||
// Something bad happened here if we could not return an
|
||||
// event after the search. We should be able to find it here.
|
||||
// TODO do some (more) sensible error-handling here
|
||||
// remoteClient.SendAgentAlertMessage("Couldn't find data for classified ad.",
|
||||
// false);
|
||||
return;
|
||||
}
|
||||
|
||||
Hashtable d = (Hashtable)dataArray[0];
|
||||
|
||||
Vector3 globalPos = (Vector3.TryParse(d["posglobal"].ToString(), out globalPos)) ? globalPos : new();
|
||||
|
||||
remoteClient.SendClassifiedInfoReply(
|
||||
new UUID(d["classifieduuid"].ToString()),
|
||||
new UUID(d["creatoruuid"].ToString()),
|
||||
Convert.ToUInt32(d["creationdate"]),
|
||||
Convert.ToUInt32(d["expirationdate"]),
|
||||
Convert.ToUInt32(d["category"]),
|
||||
d["name"].ToString(),
|
||||
d["description"].ToString(),
|
||||
new UUID(d["parceluuid"].ToString()),
|
||||
Convert.ToUInt32(d["parentestate"]),
|
||||
new UUID(d["snapshotuuid"].ToString()),
|
||||
d["simname"].ToString(),
|
||||
globalPos,
|
||||
d["parcelname"].ToString(),
|
||||
Convert.ToByte(d["classifiedflags"]),
|
||||
Convert.ToInt32(d["priceforlisting"]));
|
||||
}
|
||||
|
||||
public void HandleMapItemRequest(IClientAPI remoteClient, uint flags,
|
||||
uint EstateID, bool godlike,
|
||||
uint itemtype, ulong regionhandle)
|
||||
{
|
||||
//The following constant appears to be from GridLayerType enum
|
||||
//defined in OpenMetaverse/GridManager.cs of libopenmetaverse.
|
||||
if (itemtype == (uint)OpenMetaverse.GridItemType.LandForSale)
|
||||
{
|
||||
Hashtable ReqHash = new()
|
||||
{
|
||||
//The flags are: SortAsc (1 << 15), PerMeterSort (1 << 17)
|
||||
["flags"] = "163840",
|
||||
["type"] = "4294967295", //This is -1 in 32 bits
|
||||
["price"] = "0",
|
||||
["area"] = "0",
|
||||
["query_start"] = "0"
|
||||
};
|
||||
|
||||
Hashtable result = GenericXMLRPCRequest(ReqHash, "dir_land_query");
|
||||
|
||||
if (!Convert.ToBoolean(result["success"]))
|
||||
{
|
||||
remoteClient.SendAgentAlertMessage(result["errorMessage"].ToString(), false);
|
||||
return;
|
||||
}
|
||||
|
||||
ArrayList dataArray = (ArrayList)result["data"];
|
||||
|
||||
List<mapItemReply> mapitems = new();
|
||||
string ParcelRegionUUID;
|
||||
string[] landingpoint;
|
||||
|
||||
foreach (Object o in dataArray)
|
||||
{
|
||||
Hashtable d = (Hashtable)o;
|
||||
|
||||
if (d["name"] is null)
|
||||
continue;
|
||||
|
||||
mapItemReply mapitem = new();
|
||||
|
||||
ParcelRegionUUID = d["region_UUID"].ToString();
|
||||
|
||||
foreach (Scene scene in m_Scenes)
|
||||
{
|
||||
if (scene.RegionInfo.RegionID.ToString() == ParcelRegionUUID)
|
||||
{
|
||||
landingpoint = d["landing_point"].ToString().Split('/');
|
||||
|
||||
mapitem.x = (uint)((scene.RegionInfo.RegionLocX * 256) +
|
||||
Convert.ToDecimal(landingpoint[0]));
|
||||
mapitem.y = (uint)((scene.RegionInfo.RegionLocY * 256) +
|
||||
Convert.ToDecimal(landingpoint[1]));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
mapitem.id = new UUID(d["parcel_id"].ToString());
|
||||
mapitem.Extra = Convert.ToInt32(d["area"]);
|
||||
mapitem.Extra2 = Convert.ToInt32(d["sale_price"]);
|
||||
mapitem.name = d["name"].ToString();
|
||||
|
||||
mapitems.Add(mapitem);
|
||||
}
|
||||
|
||||
remoteClient.SendMapItemReply(mapitems.ToArray(), itemtype, flags);
|
||||
mapitems.Clear();
|
||||
}
|
||||
|
||||
if (itemtype == (uint)OpenMetaverse.GridItemType.PgEvent ||
|
||||
itemtype == (uint)OpenMetaverse.GridItemType.MatureEvent ||
|
||||
itemtype == (uint)OpenMetaverse.GridItemType.AdultEvent)
|
||||
{
|
||||
|
||||
//Find the maturity level
|
||||
int maturity = (1 << 24);
|
||||
|
||||
//Find the maturity level
|
||||
if (itemtype == (uint)OpenMetaverse.GridItemType.MatureEvent)
|
||||
maturity = (1 << 25);
|
||||
else
|
||||
{
|
||||
if (itemtype == (uint)OpenMetaverse.GridItemType.AdultEvent)
|
||||
maturity = (1 << 26);
|
||||
}
|
||||
|
||||
//The flags are: SortAsc (1 << 15), PerMeterSort (1 << 17)
|
||||
maturity |= 163840;
|
||||
|
||||
//When character before | is a u get upcoming/in-progress events
|
||||
//Character before | is number of days before/after current date
|
||||
//Characters after | is the number for a category
|
||||
Hashtable ReqHash = new()
|
||||
{
|
||||
["text"] = "u|0",
|
||||
["flags"] = maturity.ToString(),
|
||||
["query_start"] = "0"
|
||||
};
|
||||
|
||||
Hashtable result = GenericXMLRPCRequest(ReqHash, "dir_events_query");
|
||||
|
||||
if (!Convert.ToBoolean(result["success"]))
|
||||
{
|
||||
remoteClient.SendAgentAlertMessage(result["errorMessage"].ToString(), false);
|
||||
return;
|
||||
}
|
||||
|
||||
ArrayList dataArray = (ArrayList)result["data"];
|
||||
|
||||
List<mapItemReply> mapitems = new();
|
||||
int event_id;
|
||||
string[] landingpoint;
|
||||
|
||||
foreach (Object o in dataArray)
|
||||
{
|
||||
Hashtable d = (Hashtable)o;
|
||||
|
||||
if (d["name"] is null)
|
||||
continue;
|
||||
|
||||
mapItemReply mapitem = new();
|
||||
|
||||
//Events use a comma separator in the landing point
|
||||
landingpoint = d["landing_point"].ToString().Split(',');
|
||||
mapitem.x = Convert.ToUInt32(landingpoint[0]);
|
||||
mapitem.y = Convert.ToUInt32(landingpoint[1]);
|
||||
|
||||
//This is a crazy way to pass the event ID back to the
|
||||
//viewer but that is the way it wants the information.
|
||||
event_id = Convert.ToInt32(d["event_id"]);
|
||||
mapitem.id = new UUID("00000000-0000-0000-0000-0000" +
|
||||
event_id.ToString("X8"));
|
||||
|
||||
mapitem.Extra = Convert.ToInt32(d["unix_time"]);
|
||||
mapitem.Extra2 = 0; //FIXME: No idea what to do here
|
||||
mapitem.name = d["name"].ToString();
|
||||
|
||||
mapitems.Add(mapitem);
|
||||
}
|
||||
|
||||
remoteClient.SendMapItemReply(mapitems.ToArray(), itemtype, flags);
|
||||
mapitems.Clear();
|
||||
}
|
||||
}
|
||||
|
||||
public void Refresh()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
30
addon-modules/OpenSimSearch/prebuild.xml
Normal file
30
addon-modules/OpenSimSearch/prebuild.xml
Normal file
@@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" ?>
|
||||
<Project name="OpenSimSearch.Modules" path="addon-modules/OpenSimSearch/Modules" type="Library" version="0.5.0-$Rev$" frameworkVersion="net8_0">
|
||||
<Configuration name="Debug">
|
||||
<Options>
|
||||
<OutputPath>../../../bin/</OutputPath>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Configuration name="Release">
|
||||
<Options>
|
||||
<OutputPath>../../../bin/</OutputPath>
|
||||
</Options>
|
||||
</Configuration>
|
||||
|
||||
<ReferencePath>../../../bin/</ReferencePath>
|
||||
<Reference name="OpenMetaverseTypes"/>
|
||||
<Reference name="OpenMetaverse"/>
|
||||
<Reference name="OpenSim.Framework"/>
|
||||
<Reference name="OpenSim.Region.Framework"/>
|
||||
<Reference name="OpenSim.Services.Interfaces"/>
|
||||
<Reference name="Nini"/>
|
||||
<Reference name="log4net"/>
|
||||
<Reference name="XMLRPC"/>
|
||||
<Reference name="Mono.Addins"/>
|
||||
|
||||
<Files>
|
||||
<Match pattern="*.cs" recurse="true">
|
||||
<Exclude name="obj" pattern="obj"/>
|
||||
</Match>
|
||||
</Files>
|
||||
</Project>
|
||||
@@ -1,4 +1,5 @@
|
||||
<configuration>
|
||||
<dllmap os="windows" cpu="x86-64" dll="sqlite3" target="lib64/sqlite3.dll" />
|
||||
<dllmap os="!windows,osx" cpu="x86-64" dll="sqlite3" target="lib64/libsqlite3_64.so" />
|
||||
<dllmap os="!windows,osx" cpu="arm64" dll="sqlite3" target="lib64/libsqlite3-arm64.so" />
|
||||
</configuration>
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
;# {ConsoleHistoryTimeStamp} {} {Time stamp commands in history file} {} false
|
||||
;; Time stamp commands in history file (default false)
|
||||
; ConsoleHistoryTimeStamp = false
|
||||
|
||||
|
||||
;# {save_crashes} {} {Save crashes to disk?} {true false} false
|
||||
;; Set this to true if you want to log crashes to disk
|
||||
;; this can be useful when submitting bug reports.
|
||||
@@ -269,14 +269,11 @@
|
||||
; script opensim-ode-sh starts opensim setting that limit. You may need to increase it even more on large regions
|
||||
; edit the line ulimit -s 262144, and change this last value
|
||||
|
||||
;# {DefaultScriptEngine} {} {Default script engine} {XEngine} XEngine
|
||||
;; Default script engine to use (Xengine if all commented)
|
||||
; DefaultScriptEngine = "XEngine"
|
||||
|
||||
;; new alternative engine
|
||||
;# {DefaultScriptEngine} {} {Default script engine} {YEngine} YEngine
|
||||
;; Default script engine to use (We only have YEngine; XEngine is EOL)
|
||||
;; see section [YEngine] below
|
||||
; DefaultScriptEngine = "YEngine"
|
||||
|
||||
|
||||
;# {HttpProxy} {} {Proxy URL for llHTTPRequest and dynamic texture loading} {} http://proxy.com:8080
|
||||
;; Http proxy setting for llHTTPRequest and dynamic texture loading, if
|
||||
;; required
|
||||
@@ -291,8 +288,11 @@
|
||||
; HttpProxyExceptions = ".mydomain.com;localhost"
|
||||
|
||||
;# {emailmodule} {} {Provide llEmail and llGetNextEmail functionality? (requires SMTP server)} {DefaultEmailModule} none
|
||||
;; The email module requires some configuration. It needs an SMTP
|
||||
;; server to send mail through.
|
||||
;; By default email only works within the boundaries of a sim
|
||||
;; For intersim mail, all sims involved need to use the same IMAP mailbox
|
||||
;; and enableEmailToExternalObjects = true in [Email]
|
||||
;; If you want to also allow mail to enter and leave the grid, SMTP will
|
||||
;; also need to be setup
|
||||
; emailmodule = DefaultEmailModule
|
||||
|
||||
;# {SpawnPointRouting} {} {Set routing method for Telehub Spawnpoints} {closest random sequence} closest
|
||||
@@ -374,7 +374,7 @@
|
||||
; NoVerifyCertHostname = true
|
||||
;; having both options true does provide encryption but with low security
|
||||
;; set both true if you don't care to use SSL, they are needed to contact regions or grids that do use it.
|
||||
|
||||
|
||||
[AccessControl]
|
||||
;# {AllowedClients} {} {Bar (|) separated list of allowed clients} {}
|
||||
;; Bar (|) separated list of viewers which may gain access to the regions.
|
||||
@@ -397,6 +397,16 @@
|
||||
;;
|
||||
; DeniedClients = ""
|
||||
|
||||
; It is strongly recommended to block at least these viewers by uncommenting ;DeniedClients below:
|
||||
; The first 6 viewers are problematic/bugged official Firestorm releases,
|
||||
; the last 4 viewers are copybots pretending to be (a very outdated) Firestorm
|
||||
; The + is absolutely needed after the space before the version (it means 'one or more spaces')
|
||||
;DeniedClients = "Firestorm-Releasex64 +4.7.7.48706|Firestorm-Release +4.7.7.48706|Firestorm-Releasex64 +6.6.8.68380|Firestorm-Release +6.6.8.68380|Firestorm-Releasex64 +6.6.16.70339|Firestorm-Release +6.6.16.70339|Firestorm-Releasex64 +4.6.8.42696|Firestorm-Release +4.6.8.42696|Firestorm-Releasex64 +6.4.13.63251|Firestorm-Release +6.4.13.63251"
|
||||
|
||||
;# {ViewerDeniedMsg} {} {A message string} {"Access denied, your viewer is banned"}
|
||||
; The message people see who attempt to teleport with a denied viewer
|
||||
;ViewerDeniedMsg = "Access denied, your viewer is banned"
|
||||
|
||||
|
||||
[Map]
|
||||
;# {GenerateMaptiles} {} {Generate map tiles?} {true false} true
|
||||
@@ -476,23 +486,23 @@
|
||||
;; If set to true, then all permissions checks are carried out
|
||||
; serverside_object_permissions = true
|
||||
|
||||
; if next 2 are false, several admin powers are only active if god powers requested on viewer
|
||||
; this reduces mistakes
|
||||
; set both to true to enable previous behaviour
|
||||
; if next 2 are false, several admin powers are only active if god powers requested on viewer
|
||||
; this reduces mistakes
|
||||
; set both to true to enable previous behaviour
|
||||
automatic_gods = false
|
||||
implicit_gods = false
|
||||
|
||||
;# {allow_grid_gods} {} {Allow grid gods?} {true false} false
|
||||
|
||||
;# {allow_grid_gods} {} {Allow grid gods?} {true false} false
|
||||
;; This allows users with a UserLevel of 200 or more to assume god
|
||||
;; powers in the regions in this simulator.
|
||||
;; if you don't trust grid admins, what are you doing there?
|
||||
;; if you don't trust grid admins, what are you doing there?
|
||||
allow_grid_gods = true
|
||||
|
||||
;; This allows some control over permissions
|
||||
;; please note that this still doesn't duplicate SL, and is not intended to
|
||||
;# {region_owner_is_god} {} {Allow region owner gods} {true false} true
|
||||
;# {region_owner_is_god} {} {Allow region owner gods} {true false} false
|
||||
;; Allow region owners to assume god powers in their regions
|
||||
; region_owner_is_god = true
|
||||
; region_owner_is_god = false
|
||||
|
||||
;# {region_manager_is_god} {} {Allow region manager gods} {true false} false
|
||||
;; Allow region managers to assume god powers in regions they manage
|
||||
@@ -508,6 +518,8 @@
|
||||
;; without having to use the Groups feature
|
||||
; simple_build_permissions = false
|
||||
|
||||
; Disallow "take copy" of ANY object set as "Allow anyone to take a copy"
|
||||
;take_copy_restricted = false
|
||||
|
||||
[Estates]
|
||||
; If these values are commented out then the user will be asked for estate details when required (this is the normal case).
|
||||
@@ -540,18 +552,10 @@
|
||||
;; Password for the default estate owner
|
||||
; DefaultEstateOwnerPassword = password
|
||||
|
||||
[SMTP]
|
||||
;; The SMTP server enabled the email module to send email to external
|
||||
;; destinations.
|
||||
|
||||
;# {enabled} {[Startup]emailmodule:DefaultEmailModule} {Enable module?} {true false} false
|
||||
[Email]
|
||||
;# {enabled} {[Startup]emailmodule:DefaultEmailModule} {Enable module?} {true false} true
|
||||
;; Enable the email module
|
||||
; enabled = false
|
||||
|
||||
;# {enabled} {[Startup]emailmodule:DefaultEmailModule} {Enable send to objects to regions not on instance?} {true false} true
|
||||
;; Enable sending email to regions not on current opensimulator instance. Currently does not work
|
||||
; enableEmailToExternalObjects = true
|
||||
|
||||
; enabled = true
|
||||
|
||||
;# {enabled} {[Startup]emailmodule:DefaultEmailModule} {maximum number of emails from a object owner per hour} {} 500
|
||||
; MailsFromOwnerPerHour = 500
|
||||
@@ -566,11 +570,11 @@
|
||||
;# {enabled} {[Startup]emailmodule:DefaultEmailModule} {maximum number of emails to a SMTP address per hour} {} 10
|
||||
; MailsToSMTPAddressPerHour = 10
|
||||
|
||||
;# {enabled} {[Startup]emailmodule:DefaultEmailModule} {Enable send to the world?} {true false} true
|
||||
;; Enable sending email to the world.
|
||||
; enableEmailToSMTP = true
|
||||
|
||||
;# {internal_object_host} {[Startup]emailmodule:DefaultEmailModule enabled:true} {Host name to treat as internal (object to object) email?} {} lsl.opensim.local
|
||||
; Messages with this domain are considered grid-local
|
||||
; Internal messages don't use SMTP.
|
||||
; - If the destination exists on THIS sim, delivers directly
|
||||
; - If the destination exists on ANOTHER sim, delivers through IMAP
|
||||
; internal_object_host = lsl.opensim.local
|
||||
|
||||
;# {host_domain_header_from} {[Startup]emailmodule:DefaultEmailModule enabled:true} {From address to use in the sent email header?} {} 127.0.0.1
|
||||
@@ -578,6 +582,14 @@
|
||||
; if not set SMTP_SERVER_FROM below
|
||||
; host_domain_header_from = "127.0.0.1"
|
||||
|
||||
; SMTP configuration: (off-grid mail)
|
||||
;; The SMTP server enabled the email module to send email to external
|
||||
;; destinations.
|
||||
|
||||
;# {enabled} {[Startup]emailmodule:DefaultEmailModule} {Enable send to the world?} {true false} false
|
||||
;; Enable sending email to the world.
|
||||
; enableEmailToSMTP = false
|
||||
|
||||
;# {SMTP_SERVER_FROM} {[Startup]emailmodule:DefaultEmailModule enabled:true} {SMTP server from name?} {}
|
||||
; some smtp servers require a known From email address or will give Error 500 - Envelope from address is not authorised
|
||||
; set to a valid email address that smtp will accept (in some cases must be like SMTP_SERVER_LOGIN)
|
||||
@@ -610,6 +622,38 @@
|
||||
;# {SMTP_VerifyCertNames} {[Startup]emailmodule:DefaultEmailModule enabled:true} {SMTP Verify cert chain option} {} true
|
||||
; SMTP_VerifyCertNames = true
|
||||
|
||||
; Imap configuration: (grid-local mail)
|
||||
|
||||
;# {enabled} {[Startup]emailmodule:DefaultEmailModule} {Enable send to objects to regions not on instance?} {true false} false
|
||||
;; Enable sending email to regions not on current opensimulator instance.
|
||||
;; Requires a dedicated IMAP account, locally or remote
|
||||
; enableEmailToExternalObjects = false
|
||||
|
||||
;# {IMAP_SERVER_TLS} {[Startup]emailmodule:DefaultEmailModule enabled:true} {IMAP use TLS?} {} false
|
||||
; IMAP_SERVER_TLS = false
|
||||
|
||||
;# {IMAP_SERVER_HOSTNAME} {[Startup]emailmodule:DefaultEmailModule enabled:true} {IMAP server name?} {} 127.0.0.1
|
||||
; IMAP_SERVER_HOSTNAME = 127.0.0.1
|
||||
|
||||
;# {IMAP_SERVER_PORT} {[Startup]emailmodule:DefaultEmailModule enabled:true} {IMAP server port?} {} 143
|
||||
; If using IMAP with TLS, it is port 993
|
||||
; IMAP_SERVER_PORT = 143
|
||||
|
||||
;# {IMAP_SERVER_LOGIN} {[Startup]emailmodule:DefaultEmailModule enabled:true} {IMAP server user name?} {}
|
||||
; The user needs to have a Maildir folder in its homedirectory, with perms 700
|
||||
; This can be made with: maildirmake.courier ~/Maildir
|
||||
; IMAP_SERVER_LOGIN = foo
|
||||
|
||||
;# {IMAP_SERVER_PASSWORD} {[Startup]emailmodule:DefaultEmailModule enabled:true} {IMAP server password} {}
|
||||
; IMAP_SERVER_PASSWORD = bar
|
||||
|
||||
; using TLS and an IMAP server with a self signed certificate you will need to set next two options false
|
||||
;# {IMAP_VerifyCertChain} {[Startup]emailmodule:DefaultEmailModule enabled:true} {IMAP Verify cert chain option} {} true
|
||||
; IMAP_VerifyCertChain = true
|
||||
;# {IMAP_VerifyCertNames} {[Startup]emailmodule:DefaultEmailModule enabled:true} {IMAP Verify cert chain option} {} true
|
||||
; IMAP_VerifyCertNames = true
|
||||
|
||||
|
||||
[Network]
|
||||
;# {ConsoleUser} {} {User name for console account} {}
|
||||
;; Configure the remote console user here. This will not actually be used
|
||||
@@ -633,15 +677,15 @@
|
||||
; to use others like self signed certificates with those viewers,
|
||||
; their debug option NoVerifySSLCert needs to be set true, You need to inform users about this
|
||||
; the main unsecure port will still open for some services. this may change in future.
|
||||
|
||||
|
||||
; set http_listener_ssl to enable main server ssl. it will replace unsecure port on most functions
|
||||
;# {http_listener_ssl}{} {enable main server ssl port} {} false
|
||||
;http_listener_ssl = false
|
||||
|
||||
|
||||
; Set port for main SSL connections
|
||||
;# {http_listener_sslport}{} {main server ssl port} {} 9001
|
||||
;http_listener_sslport = 9001 ;
|
||||
|
||||
|
||||
; currently if using ssl, regions ExternalHostName must the the same and equal to http_listener_cn
|
||||
; this may be removed in future
|
||||
;# {http_listener_cn}{} {main server ssl externalHostName} {} ""
|
||||
@@ -695,8 +739,8 @@
|
||||
;# {ExternalHostNameForLSL} {} {Hostname to use for HTTP-IN URLs. This should be reachable from the internet.} {}
|
||||
;; Hostname to use in llRequestURL/llRequestSecureURL
|
||||
;; if not defined - llRequestURL/llRequestSecureURL are disabled
|
||||
;; this should be reachable from internet and point this machine
|
||||
;; for standalones it can be
|
||||
;; this should be reachable from internet and point this machine
|
||||
;; for standalones it can be
|
||||
ExternalHostNameForLSL = ${Const|BaseHostname}
|
||||
|
||||
;# {shard} {} {Name to use for X-Secondlife-Shard header? (press enter if unsure)} {} OpenSim
|
||||
@@ -1048,118 +1092,6 @@
|
||||
; ScriptEnginesPath = "ScriptEngines"
|
||||
|
||||
|
||||
[XEngine]
|
||||
;# {Enabled} {} {Enable the XEngine scripting engine?} {true false} false
|
||||
;; Enable this engine in this OpenSim instance
|
||||
; Enabled = false
|
||||
|
||||
;; How many threads to keep alive even if nothing is happening
|
||||
; MinThreads = 2
|
||||
|
||||
;; How many threads to start at maximum load
|
||||
; MaxThreads = 100
|
||||
|
||||
;; Time a thread must be idle (in seconds) before it dies
|
||||
; IdleTimeout = 60
|
||||
|
||||
;; llSetTimerEvent minimum value. Default 0.5s, 0.05s whould be more resonable
|
||||
; MinTimerInterval = 0.5
|
||||
|
||||
;# {Priority} {Enabled:true} {Priority for script engine threads?} {Lowest BelowNormal Normal AboveNormal Highest} BelowNormal
|
||||
;; Thread priority ("Lowest", "BelowNormal", "Normal", "AboveNormal",
|
||||
;; "Highest")
|
||||
; Priority = "BelowNormal"
|
||||
|
||||
;; Maximum number of events to queue for a script (excluding timers)
|
||||
; MaxScriptEventQueue = 300
|
||||
|
||||
;; Stack size per script engine thread in bytes.
|
||||
;; If you are experiencing StackOverflowExceptions you may want to increase this (e.g. double it).
|
||||
;; The trade-off may be increased memory usage by the script engine.
|
||||
; ThreadStackSize = 262144
|
||||
|
||||
;; Set this to true to load each script into a separate
|
||||
;; AppDomain.
|
||||
;;
|
||||
;; Setting this to false will load all script assemblies into the
|
||||
;; current AppDomain, which will significantly improve script loading times.
|
||||
;; It will also reduce initial per-script memory overhead.
|
||||
;;
|
||||
;; However, setting this to false will also prevent script DLLs from being unloaded from memory if the script is deleted.
|
||||
;; This may cause an OutOfMemory problem over time when avatars with scripted attachments move in and out of the region.
|
||||
;; at this time some mono versions seem to have problems with the true option
|
||||
;; so default is now false until a fix is found, to simply life of less technical skilled users.
|
||||
;; this should only be a issue if regions stay alive for a long time with lots of scripts added or edited.
|
||||
AppDomainLoading = false
|
||||
|
||||
;; Controls whether scripts are stopped by aborting their threads externally (abort) or by co-operative checks from the compiled script (co-op)
|
||||
;; co-op will be more stable but this option is currently experimental.
|
||||
;; If moving from co-op to abort, existing script DLLs will need to be recompiled.
|
||||
;; This currently can only be done manually, either by setting DeleteScriptsOnStartup = true for one run
|
||||
;; or by deleting the script DLL* files in bin/ScriptEngines/<region-id>/
|
||||
;; One can move from co-op back to abort without recompilation, but reverting back to co-op again will need script recompile
|
||||
;; Current valid values are "abort" and "co-op"
|
||||
; ScriptStopStrategy = co-op
|
||||
|
||||
|
||||
;# {DeleteScriptsOnStartup} {} {Delete previously compiled script DLLs on startup?} {true false} true
|
||||
;; Controls whether previously compiled scripts DLLs are deleted on sim restart. If you set this to false
|
||||
;; then startup will be considerably faster since scripts won't need to be recompiled. However, then it becomes your responsibility to delete the
|
||||
;; compiled scripts if you're recompiling OpenSim from source code and internal interfaces used
|
||||
;; by scripts have changed.
|
||||
; DeleteScriptsOnStartup = true
|
||||
|
||||
;# {CompactMemOnLoad} {} {compacts memory on each script load at startup?} {true false} false
|
||||
;; forces calls to memory garbage collector before loading each script DLL during region startup.
|
||||
;; Peak memory usage is reduced and region starts with a more compacted memory allocation.
|
||||
;; But this costs a lot of time, so region load will take a lot longer.
|
||||
;; it is more usefull if there are no previously compiled scripts DLLs (as with DeleteScriptsOnStartup = true)
|
||||
;CompactMemOnLoad = false
|
||||
|
||||
;; Compile debug info (line numbers) into the script assemblies
|
||||
; CompileWithDebugInformation = true
|
||||
|
||||
; ==== Settings for MOD and OSSL functions have been moved to the [OSSL] section
|
||||
|
||||
;# {EventLimit} {} {Amount of time a script can spend in an event handler} {} 30
|
||||
;; Time a script can spend in an event handler before it is interrupted
|
||||
; EventLimit = 30
|
||||
|
||||
;# {KillTimedOutScripts} {} {Kill script in case of event time overruns?} {true false} false
|
||||
;; If a script overruns it's event limit, kill the script?
|
||||
; KillTimedOutScripts = false
|
||||
|
||||
;# {ScriptDelayFactor} {} {Multiplier for scripting delays} {} 1.0
|
||||
;; Sets the multiplier for the scripting delays
|
||||
; ScriptDelayFactor = 1.0
|
||||
|
||||
;# {ScriptDistanceLimitFactor} {} {Multiplier for 10.0m distance limits?} {}
|
||||
;; The factor the 10 m distances limits are multiplied by
|
||||
; ScriptDistanceLimitFactor = 1.0
|
||||
|
||||
;# {NotecardLineReadCharsMax} {} {Maximum length of notecard line?} {} 255
|
||||
;; Maximum length of notecard line read
|
||||
;; Increasing this to large values potentially opens
|
||||
;; up the system to malicious scripters
|
||||
; NotecardLineReadCharsMax = 255
|
||||
|
||||
;# {SensorMaxRange} {} {Sensor range} {} 96.0
|
||||
;; Sensor settings
|
||||
; SensorMaxRange = 96.0
|
||||
;# {SensorMaxResults} {} {Max sensor results returned?} {}
|
||||
; SensorMaxResults = 16
|
||||
|
||||
;# {DisableUndergroundMovement} {} {Disable underground movement of prims} {true false} true
|
||||
;; Disable underground movement of prims (default true); set to
|
||||
;; false to allow script controlled underground positioning of
|
||||
;; prims
|
||||
; DisableUndergroundMovement = true
|
||||
|
||||
;# {ScriptEnginesPath} {} {Path to script assemblies} {} ScriptEngines
|
||||
;; Path to script engine assemblies
|
||||
;; Default is ./bin/ScriptEngines
|
||||
; ScriptEnginesPath = "ScriptEngines"
|
||||
|
||||
[OSSL]
|
||||
;# {Include-osslDefaultEnable} {} {Include file for enabling and permissions for OSSL functions} {}
|
||||
;; If this INI file is not included, the OSSL functions are disabled.
|
||||
@@ -1261,7 +1193,7 @@
|
||||
|
||||
[InterestManagement]
|
||||
;; This section controls how state updates are prioritized for each client
|
||||
|
||||
|
||||
;# {UpdatePrioritizationScheme} {} {Update prioritization scheme?} {BestAvatarResponsiveness SimpleAngularDistance} BestAvatarResponsiveness
|
||||
;; Valid values are BestAvatarResponsiveness and SimpleAngularDistance
|
||||
;; SimpleAngularDistance does use more cpu
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
; Time stamp commands in history file (default false)
|
||||
; ConsoleHistoryTimeStamp = false
|
||||
|
||||
|
||||
; Set this to true if you want to log crashes to disk
|
||||
; this can be useful when submitting bug reports.
|
||||
; However, this will only log crashes within OpenSimulator that cause the entire program to exit
|
||||
@@ -112,12 +112,12 @@
|
||||
;; Allow child agents to see into the region even if their root counterpart isn't allowed in here
|
||||
see_into_region = true
|
||||
|
||||
;; use legacy math for sittarget offset "correction"
|
||||
;; set this option to false to use improved math more compatibility with SL.
|
||||
;; keep it true if you have many old objects with sits set by scripts.
|
||||
;; the offset in question is added to the SitTarget to find the sitting avatar position.
|
||||
;; acording to its size, etc.
|
||||
; LegacySitOffsets = true
|
||||
;; use legacy math for sittarget offset "correction"
|
||||
;; set this option to false to use improved math more compatibility with SL.
|
||||
;; keep it true if you have many old objects with sits set by scripts.
|
||||
;; the offset in question is added to the SitTarget to find the sitting avatar position.
|
||||
;; acording to its size, etc.
|
||||
; LegacySitOffsets = true
|
||||
|
||||
; Maximum number of position, rotation and scale changes for each prim that the simulator will store for later undos
|
||||
; Increasing this number will increase memory usage.
|
||||
@@ -176,22 +176,22 @@
|
||||
InworldRestartShutsDown = false
|
||||
|
||||
; Use of normalized 55FPS statistics
|
||||
; Opensim does not have a frame rate control like other simulators.
|
||||
; Most parameters that control timing can be configurable region by region.
|
||||
; To achieve closer compatibility with values expected by viewers, scripts and users
|
||||
; some parameters are converted to a equivalent per frame value.
|
||||
; Additionally, they are scaled to values they would have on a system running at a nominal 55 frames per second rate.
|
||||
; The scale factor it 55 * FrameTime, corresponding to 5 with default configuration
|
||||
; You can choose to show the true physics FPS to viewers by setting Normalized55FPS to false.
|
||||
; Normalized55FPS = true
|
||||
; Opensim does not have a frame rate control like other simulators.
|
||||
; Most parameters that control timing can be configurable region by region.
|
||||
; To achieve closer compatibility with values expected by viewers, scripts and users
|
||||
; some parameters are converted to a equivalent per frame value.
|
||||
; Additionally, they are scaled to values they would have on a system running at a nominal 55 frames per second rate.
|
||||
; The scale factor it 55 * FrameTime, corresponding to 5 with default configuration
|
||||
; You can choose to show the true physics FPS to viewers by setting Normalized55FPS to false.
|
||||
; Normalized55FPS = true
|
||||
|
||||
; Main Frame time
|
||||
; This defines the rate of several simulation events.
|
||||
; Default value should meet most needs.
|
||||
; It can be reduced to improve the simulation of moving objects, with possible increase of cpu and network loads.
|
||||
; It should not be less than the physics engine step time.
|
||||
; Being a integer multiple of it may reduce some jitter in reported physics FPS.
|
||||
; changing this value, you need to change some of the following *EveryNFrames so their actions timing remains the same
|
||||
; This defines the rate of several simulation events.
|
||||
; Default value should meet most needs.
|
||||
; It can be reduced to improve the simulation of moving objects, with possible increase of cpu and network loads.
|
||||
; It should not be less than the physics engine step time.
|
||||
; Being a integer multiple of it may reduce some jitter in reported physics FPS.
|
||||
; changing this value, you need to change some of the following *EveryNFrames so their actions timing remains the same
|
||||
FrameTime = 0.0909
|
||||
|
||||
; The values below represent the percentage of the target frame time that,
|
||||
@@ -269,12 +269,10 @@
|
||||
;
|
||||
; ZeroMesher is faster but leaves the physics engine to model the mesh using the basic shapes that it supports
|
||||
; Usually this is only a box
|
||||
; select ubODEMeshmerizer with and only with ubOde physics engine
|
||||
; meshing = ubODEMeshmerizer
|
||||
meshing = Meshmerizer
|
||||
;meshing = Meshmerizer
|
||||
;meshing = ZeroMesher
|
||||
;; select ubODEMeshmerizer only with ubOde physics engine
|
||||
; meshing = ubODEMeshmerizer
|
||||
meshing = ubODEMeshmerizer
|
||||
|
||||
; Path to decoded sculpty maps
|
||||
; Defaults to "j2kDecodeCache
|
||||
@@ -293,21 +291,20 @@
|
||||
;; It continues to provide a workable physics implementation. It does not currently support varregions.
|
||||
;; basicphysics effectively does not model physics at all, making all objects phantom.
|
||||
;; Default is BulletSim
|
||||
physics = BulletSim
|
||||
;physics = BulletSim
|
||||
;physics = modified_BulletX
|
||||
;physics = basicphysics
|
||||
;physics = POS
|
||||
; physics = ubODE
|
||||
; alternative OpenDynamicsEngine engine. ubODEMeshmerizer meshing above MUST be selected also
|
||||
physics = ubODE
|
||||
|
||||
; ##
|
||||
; ## SCRIPT ENGINE
|
||||
; ##
|
||||
|
||||
;; Default script engine to use. Currently, we only have XEngine
|
||||
;DefaultScriptEngine = "XEngine"
|
||||
;; new alternative engine
|
||||
;; Default script engine to use. Currently, we only have YEngine
|
||||
;; see section [YEngine] below
|
||||
DefaultScriptEngine = "YEngine"
|
||||
;DefaultScriptEngine = "YEngine"
|
||||
|
||||
; Http proxy setting for llHTTPRequest and dynamic texture loading, if
|
||||
; required
|
||||
@@ -323,9 +320,12 @@
|
||||
; ##
|
||||
; ## EMAIL MODULE
|
||||
; ##
|
||||
;; The email module requires some configuration. It needs an SMTP
|
||||
;; server to send mail through.
|
||||
;emailmodule = DefaultEmailModule
|
||||
;; By default email only works within the boundaries of a sim
|
||||
;; For intersim mail, all sims involved need to use the same IMAP mailbox
|
||||
;; and enableEmailToExternalObjects = true in [Email]
|
||||
;; If you want to also allow mail to enter and leave the grid, SMTP will
|
||||
;; also need to be setup
|
||||
emailmodule = DefaultEmailModule
|
||||
|
||||
; ##
|
||||
; ## ANIMATIONS
|
||||
@@ -452,7 +452,7 @@
|
||||
; #
|
||||
; # SSL certificates validation options
|
||||
; #
|
||||
|
||||
|
||||
; SSL certificate validation options
|
||||
; you can allow selfsigned certificates or no official CA with next option set to true
|
||||
; NoVerifyCertChain = true
|
||||
@@ -500,18 +500,21 @@
|
||||
|
||||
; Attempt to render meshes and sculpties on the map
|
||||
RenderMeshes = false
|
||||
|
||||
; warp3D rendering height limits for prims (relative to rez position not bounding box)
|
||||
; prims above RenderMaxHeight are excluded
|
||||
; valid values: 100 to 4086
|
||||
;RenderMaxHeight = 4086
|
||||
|
||||
; prims below RenderMinHeight are excluded
|
||||
; valid values: -100 to RenderMaxHeight - 10
|
||||
;RenderMinHeight = -100
|
||||
|
||||
|
||||
; warp3D rendering height limits for prims (relative to rez position not bounding box)
|
||||
; prims above RenderMaxHeight are excluded
|
||||
; valid values: 100 to 4086
|
||||
;RenderMaxHeight = 4086
|
||||
|
||||
; prims below RenderMinHeight are excluded
|
||||
; valid values: -100 to RenderMaxHeight - 10
|
||||
;RenderMinHeight = -100
|
||||
|
||||
; Show NPCs as green world map dots
|
||||
;ShowNPCs = true
|
||||
|
||||
; Where to store generated map tiles in the form of MAP-RegionUUID.png
|
||||
;GenTilesDirectory = "."
|
||||
|
||||
[Permissions]
|
||||
; ##
|
||||
@@ -534,11 +537,11 @@
|
||||
|
||||
; This allows grid users with a UserLevel of 200 or more to assume god
|
||||
; powers in the regions in this simulator.
|
||||
; if you don't trust grid admins, what are you doing there?
|
||||
; if you don't trust grid admins, what are you doing there?
|
||||
allow_grid_gods = true
|
||||
|
||||
; Allow region owners to assume god powers in their regions
|
||||
;region_owner_is_god = true
|
||||
;region_owner_is_god = false
|
||||
|
||||
; Allow region managers to assume god powers in regions they manage
|
||||
;region_manager_is_god = false
|
||||
@@ -581,6 +584,8 @@
|
||||
; Minimum user level required to upload assets
|
||||
;LevelUpload = 0
|
||||
|
||||
; Disallow "take copy" of ANY object set as "Allow anyone to take a copy"
|
||||
;take_copy_restricted = false
|
||||
|
||||
[RegionReady]
|
||||
; Enable this module to get notified once all items and scripts in the region have been completely loaded and compiled
|
||||
@@ -630,11 +635,13 @@
|
||||
; AllowUserProfileWebURLs = true
|
||||
|
||||
|
||||
[SMTP]
|
||||
enabled = false
|
||||
[Email]
|
||||
enabled = true
|
||||
|
||||
;enabled = true
|
||||
;internal_object_host = lsl.opensim.local
|
||||
|
||||
;enableEmailToSMTP = false
|
||||
;host_domain_header_from = 127.0.0.1
|
||||
;SMTP_SERVER_FROM = ""
|
||||
;SMTP_SERVER_HOSTNAME = 127.0.0.1
|
||||
@@ -645,6 +652,16 @@
|
||||
;SMTP_VerifyCertChain = true
|
||||
;SMTP_VerifyCertNames = true
|
||||
|
||||
;enableEmailToExternalObjects = false
|
||||
;IMAP_SERVER_HOSTNAME = 127.0.0.1
|
||||
;IMAP_SERVER_PORT = 143
|
||||
;IMAP_SERVER_TLS = false
|
||||
;IMAP_SERVER_LOGIN = foo
|
||||
;IMAP_SERVER_PASSWORD = bar
|
||||
;IMAP_VerifyCertChain = true
|
||||
;IMAP_VerifyCertNames = true
|
||||
|
||||
|
||||
[Network]
|
||||
ConsoleUser = "Test"
|
||||
ConsolePass = "secret"
|
||||
@@ -654,12 +671,12 @@
|
||||
; ssl config: Experimental!
|
||||
http_listener_ssl = false ; if set to true main server is replaced by a ssl one
|
||||
http_listener_sslport = 9001 ; Use this port for SSL connections
|
||||
; currently if using ssl, regions ExternalHostName must the the same and equal to http_listener_cn
|
||||
; this will change is future
|
||||
; currently if using ssl, regions ExternalHostName must the the same and equal to http_listener_cn
|
||||
; this will change is future
|
||||
http_listener_cn = "myRegionsExternalHostName"
|
||||
; if the cert doesnt have a oficial CA or is selfsigned viewers option NoVerifySSLCert need to be set true
|
||||
; if the cert doesnt have a oficial CA or is selfsigned viewers option NoVerifySSLCert need to be set true
|
||||
http_listener_cert_path = "mycert.p12" ; path for the cert file that is valid for the ExternalHostName
|
||||
http_listener_cert_pass = "mycertpass" ; the cert passwork
|
||||
http_listener_cert_pass = "mycertpass" ; the cert passwork
|
||||
|
||||
; addicional HTTPS for "Out of band" management applications such as the remote
|
||||
; admin module or scripts
|
||||
@@ -682,8 +699,8 @@
|
||||
; HttpBodyMaxLenMAX=16384
|
||||
|
||||
; Hostname to use in llRequestURL/llRequestSecureURL
|
||||
; must be a valid hostname for the ssl cert.
|
||||
; if not defined - llRequestURL/llRequestSecureURL are disabled
|
||||
; must be a valid hostname for the ssl cert.
|
||||
; if not defined - llRequestURL/llRequestSecureURL are disabled
|
||||
; ExternalHostNameForLSL=127.0.0.1
|
||||
|
||||
; Disallow the following address ranges for user scripting calls (e.g. llHttpRequest())
|
||||
@@ -723,32 +740,48 @@
|
||||
;MaxRequestConcurrency = 30
|
||||
|
||||
[ScriptsHttpRequestModule]
|
||||
; options for llHttpRequest
|
||||
|
||||
; max number of concurrent connections per instance (all scenes), default 8
|
||||
; MaxPoolThreads = 8
|
||||
|
||||
; options for llHttpRequest
|
||||
|
||||
; max number of concurrent connections per instance (all scenes), default 8
|
||||
; MaxPoolThreads = 8
|
||||
|
||||
; max requests per second for all scripts on a prim, default 1
|
||||
;PrimRequestsPerSec = 1.0
|
||||
; initial unthrottled burst for all scripts on a prim, default 3
|
||||
; initial unthrottled burst for all scripts on a prim, default 3
|
||||
;PrimRequestsBurst = 3.0
|
||||
|
||||
; max requests per second for the objects owner (per instance), default 25
|
||||
;PrimOwnerRequestsPerSec = 25.0
|
||||
; initial unthrottled burst for the objects owner (per instance), default 5
|
||||
; initial unthrottled burst for the objects owner (per instance), default 5
|
||||
;PrimOwnerRequestsBurst = 5.0
|
||||
|
||||
; requests timeout in miliseconds, range 200 to 60000, default 30000
|
||||
|
||||
; requests timeout in miliseconds, range 200 to 60000, default 30000
|
||||
;RequestsTimeOut = 30000
|
||||
|
||||
|
||||
[AccessControl]
|
||||
; Viewer-based access control. |-separated list of allowed viewers.
|
||||
;# {AllowedClients} {} {Bar (|) separated list of allowed clients} {}
|
||||
;; Bar (|) separated list of viewers which may gain access to the regions.
|
||||
;; One can use a substring of the viewer name to enable only certain
|
||||
;; versions
|
||||
;; Example: Agent uses the viewer "Imprudence 1.3.2.0"
|
||||
;; - "Imprudence" has access
|
||||
;; - "Imprudence 1.3" has access
|
||||
;; - "Imprudence 1.3.1" has no access
|
||||
; AllowedClients = ""
|
||||
|
||||
; Viewer-based access control. |-separated list of denied viewers.
|
||||
; No restrictions by default.
|
||||
;# {DeniedClients} {} {Bar (|) separated list of denied clients} {}
|
||||
;; Bar (|) separated list of viewers which may not gain access to the regions.
|
||||
;; One can use a Substring of the viewer name to disable only certain
|
||||
;; versions
|
||||
;; Example: Agent uses the viewer "Imprudence 1.3.2.0"
|
||||
;; - "Imprudence" has no access
|
||||
;; - "Imprudence 1.3" has no access
|
||||
;; - "Imprudence 1.3.1" has access
|
||||
; DeniedClients = ""
|
||||
|
||||
;# {ViewerDeniedMsg} {} {A message string} {"Access denied, your viewer is banned"}
|
||||
; The message people see who attempt to teleport with a denied viewer
|
||||
;ViewerDeniedMsg = "Access denied, your viewer is banned"
|
||||
|
||||
[ClientStack.LindenUDP]
|
||||
; Maximum outbound bytes per second for a single scene. This can be used to
|
||||
@@ -808,11 +841,11 @@
|
||||
;
|
||||
;PausedAckTimeout = 300
|
||||
|
||||
; Support viewers object cache, default true
|
||||
; users may need to reduce viewer bandwitdh if some prims or terrain parts fail to rez.
|
||||
; change to false if you need to use old viewers that do not support this feature
|
||||
;
|
||||
; SupportViewerObjectsCache = true
|
||||
; Support viewers object cache, default true
|
||||
; users may need to reduce viewer bandwitdh if some prims or terrain parts fail to rez.
|
||||
; change to false if you need to use old viewers that do not support this feature
|
||||
;
|
||||
; SupportViewerObjectsCache = true
|
||||
|
||||
[ClientStack.LindenCaps]
|
||||
;; Long list of capabilities taken from
|
||||
@@ -913,9 +946,9 @@
|
||||
; Allow avatars to cross into and out of the region.
|
||||
AllowAvatarCrossing = true
|
||||
|
||||
; This disables border transfers for objects. When true, objects can be placed outside
|
||||
; the region's border without being transferred to another simulator.
|
||||
DisableObjectTransfer = false
|
||||
; This disables border transfers for objects. When true, objects can be placed outside
|
||||
; the region's border without being transferred to another simulator.
|
||||
DisableObjectTransfer = false
|
||||
|
||||
; Minimum user level required for HyperGrid teleports
|
||||
LevelHGTeleport = 0
|
||||
@@ -925,10 +958,10 @@
|
||||
; Disabling cancellation can be okay in small closed grids where all teleports are highly likely to suceed.
|
||||
DisableInterRegionTeleportCancellation = false
|
||||
|
||||
;; This option exists to control the behavior of teleporting gods into places that have landing points
|
||||
;; and telehubs. Historically, there has been a difference: OpenSim (OS) has honored landing points and telehubs even for
|
||||
;; avatars with god permissions; SL lets gods land wherever they want.
|
||||
LandingPointBehavior = LandingPointBehavior_OS
|
||||
;; This option exists to control the behavior of teleporting gods into places that have landing points
|
||||
;; and telehubs. Historically, there has been a difference: OpenSim (OS) has honored landing points and telehubs even for
|
||||
;; avatars with god permissions; SL lets gods land wherever they want.
|
||||
LandingPointBehavior = LandingPointBehavior_OS
|
||||
|
||||
|
||||
[Messaging]
|
||||
@@ -1072,14 +1105,14 @@
|
||||
avatar_terminal_velocity = 54
|
||||
|
||||
; World Step size.
|
||||
; with legacy ODE this value needs to be close to 0.02s
|
||||
; with ubOde this value can be reduced to improve simulation quality with the cost of higher cpu load
|
||||
; you will need to test acording to you needs
|
||||
; choosing a value that is a integer sub multiple of FrameRate reduces some jitter on reported physics FPS
|
||||
; with legacy ODE this value needs to be close to 0.02s
|
||||
; with ubOde this value can be reduced to improve simulation quality with the cost of higher cpu load
|
||||
; you will need to test acording to you needs
|
||||
; choosing a value that is a integer sub multiple of FrameRate reduces some jitter on reported physics FPS
|
||||
world_stepsize = 0.01818
|
||||
; number of iterations of constrains solver, higher should improve results
|
||||
; up to a point where acumulated math errors eliminate the improvement
|
||||
; more steps may increase CPU load. No real gain in changing
|
||||
; number of iterations of constrains solver, higher should improve results
|
||||
; up to a point where acumulated math errors eliminate the improvement
|
||||
; more steps may increase CPU load. No real gain in changing
|
||||
world_solver_iterations = 10
|
||||
|
||||
|
||||
@@ -1716,13 +1749,13 @@
|
||||
;PriceObjectRent = 0
|
||||
;PriceObjectScaleFactor = 10
|
||||
;PriceParcelRent = 0
|
||||
|
||||
; Mesh upload settings, independent of economymodule
|
||||
|
||||
; Create inventory entries for textures uploaded with a model
|
||||
; default is false, ie, do not create
|
||||
; MeshModelAllowTextureToInventory = true
|
||||
|
||||
|
||||
; Mesh upload settings, independent of economymodule
|
||||
|
||||
; Create inventory entries for textures uploaded with a model
|
||||
; default is false, ie, do not create
|
||||
; MeshModelAllowTextureToInventory = true
|
||||
|
||||
|
||||
[YEngine]
|
||||
;; implements non preemptive microthreading, so fixing problems like llSleep or long events handlers
|
||||
@@ -1730,10 +1763,10 @@
|
||||
;; warning: scripts state is lost on TP or cross to Xengine regions (cars stop, etc)
|
||||
;; ignore its extensions (subset of original XMRengine), those are still undefined.
|
||||
Enabled = true
|
||||
|
||||
|
||||
; maximum stack a script can use in KB
|
||||
;ScriptStackSize = 2048
|
||||
|
||||
|
||||
; maximum heap memory a script can use in KB
|
||||
;ScriptHeapSize = 1024
|
||||
|
||||
@@ -1782,115 +1815,14 @@
|
||||
; scripts states and cache parent folder location
|
||||
;ScriptEnginesPath="ScriptEngines"
|
||||
|
||||
|
||||
[XEngine]
|
||||
; Enable this engine in this OpenSim instance
|
||||
Enabled = false
|
||||
|
||||
; How many threads to keep alive even if nothing is happening
|
||||
MinThreads = 2
|
||||
|
||||
; How many threads to start at maximum load
|
||||
MaxThreads = 100
|
||||
|
||||
; Time a thread must be idle (in seconds) before it dies
|
||||
IdleTimeout = 60
|
||||
|
||||
; Thread priority ("Lowest", "BelowNormal", "Normal", "AboveNormal", "Highest")
|
||||
Priority = "BelowNormal"
|
||||
|
||||
; Maximum number of events to queue for a script (excluding timers)
|
||||
MaxScriptEventQueue = 300
|
||||
|
||||
; Stack size per thread created
|
||||
ThreadStackSize = 262144
|
||||
|
||||
; Set this to true to load each script into a separate
|
||||
; AppDomain. Setting this to false will load all script assemblies into the
|
||||
; current AppDomain, which will reduce the per-script overhead but deleted scripts stay inactive using memory
|
||||
; this may only be a problem if regions stay alive for a long time with lots of scripts added or edited.
|
||||
; at this time some mono versions seem to have problems with the true option
|
||||
; so default is now false until a fix is found
|
||||
; AppDomainLoading = false
|
||||
|
||||
; Set this to true to load attachment scripts in separated domain, if AppDomainLoading is false
|
||||
; same issues as AppDomainLoading, but may be useful on regions with a lot of avatar traffic, if they carry scripts like AOs
|
||||
; AttachmentsDomainLoading = false
|
||||
|
||||
; Controls whether previously compiled scripts DLLs are deleted on sim restart.
|
||||
; If you set this to false then startup will be considerably faster since scripts won't need to be recompiled.
|
||||
; It should be true on first run after updating opensim binary version
|
||||
; after first run you can change to false.
|
||||
; You can also set it to false and delete the script DLLs by hand
|
||||
; This does not delete cached scripts state.
|
||||
; DeleteScriptsOnStartup = true
|
||||
|
||||
|
||||
; Controls whether scripts are stopped by aborting their threads externally (abort)
|
||||
; or by co-operative checks inserted by OpenSimulator into compiled script (co-op).
|
||||
; co-op will be more stable as aborting threads can cause instability.
|
||||
; abort was the default option in OpenSimulator 0.8 and before.
|
||||
; If this setting is changed between co-op and abort, then existing scripts will automatically be recompiled if necessary.
|
||||
; However, the setting change will not take affect until the next time you restart the simulator.
|
||||
; Setting changes will not affect state information stored for scripts.
|
||||
ScriptStopStrategy = co-op
|
||||
|
||||
; Rate to poll for asynchronous command replies (ms)
|
||||
;AsyncLLCommandLoopms = 100
|
||||
|
||||
; Save the source of all compiled scripts
|
||||
WriteScriptSourceToDebugFile = false
|
||||
|
||||
; Compile debug info (line numbers) into the script assemblies
|
||||
CompileWithDebugInformation = true
|
||||
|
||||
|
||||
; Interval (s) between background save of script states
|
||||
SaveInterval = 120
|
||||
|
||||
; Interval (s) between maintenance runs (0 = disable)
|
||||
MaintenanceInterval = 10
|
||||
|
||||
; Time a script can spend in an event handler before it is interrupted
|
||||
EventLimit = 30
|
||||
|
||||
; If a script overruns it's event limit, kill the script?
|
||||
KillTimedOutScripts = false
|
||||
|
||||
; Amount of time in milliseconds we will wait for an event to completely normally when a script stop is requested
|
||||
; before aborting the thread (such as when an object containing scripts is taken into inventory).
|
||||
WaitForEventCompletionOnScriptStop = 1000
|
||||
|
||||
; Sets the multiplier for the scripting delays
|
||||
;ScriptDelayFactor = 1.0
|
||||
|
||||
; The factor the 10 m distances llimits are multiplied by
|
||||
;ScriptDistanceLimitFactor = 1.0
|
||||
|
||||
; Maximum length of notecard line read
|
||||
; Increasing this to large values potentially opens
|
||||
; up the system to malicious scripters
|
||||
; NotecardLineReadCharsMax = 255
|
||||
|
||||
; Minimum settable timer interval. Any timer setting less than this is
|
||||
; rounded up to this minimum interval.
|
||||
; MinTimerInterval = 0.5
|
||||
|
||||
; Sensor settings
|
||||
;SensorMaxRange = 96.0
|
||||
;SensorMaxResults = 16
|
||||
|
||||
; Allow for llCreateLink and llBreakLink to work without asking for permission
|
||||
; only enable this in a trusted environment otherwise you may be subject to hijacking
|
||||
; AutomaticLinkPermission = false
|
||||
|
||||
; Disable underground movement of prims (default true); set to
|
||||
; false to allow script controlled underground positioning of
|
||||
; prims
|
||||
; DisableUndergroundMovement = true
|
||||
|
||||
;; Path to script assemblies
|
||||
; ScriptEnginesPath = "ScriptEngines"
|
||||
; Used in inventory offer messages to show the giving object origin
|
||||
; To make /decline work for RLVa inventory offers, this has to
|
||||
; start with "http://slurl", however a webpage does not need to
|
||||
; exist at given location. Your grid may choose to host a slurl.com-like
|
||||
; webmap if desired, for example at http://slurl.yourgrid.com
|
||||
; The dialog will display it inworld as: SlurlPrefix/regionname/x/y/z/
|
||||
; In SL the prefix is: http://slurl.com/secondlife
|
||||
;SlurlPrefix="http://slurl.opensim.local"
|
||||
|
||||
|
||||
[Concierge]
|
||||
@@ -2153,18 +2085,18 @@
|
||||
LimitParcelLayerUpdateDistance = true
|
||||
ParcelLayerViewDistance = 128
|
||||
|
||||
; set this to false to not display parcel ban lines
|
||||
ShowParcelBansLines = true
|
||||
|
||||
; Parcel Bans max height above ground. Default 100m
|
||||
; range 20m to 5000m
|
||||
; BanLineSafeHeight = 100
|
||||
; set this to false to not display parcel ban lines
|
||||
ShowParcelBansLines = true
|
||||
|
||||
; setting the parcel to admin content, It works as setting the land to Linden content in SL.
|
||||
; To use it, activate god mode in the viewer, select the parcel and go to: Admin -> Parcel -> Set to Linden Content ( CTRL+ALT+SHIFT+C)
|
||||
; DefaultAdministratorParcelName = "Admin Parcel"
|
||||
; DefaultAdministratorGroupUUID = "00000000-0000-0000-0000-000000000000"
|
||||
; DefaultAdministratorOwnerUUID = "00000000-0000-0000-0000-000000000000"
|
||||
; Parcel Bans max height above ground. Default 100m
|
||||
; range 20m to 5000m
|
||||
; BanLineSafeHeight = 100
|
||||
|
||||
; setting the parcel to admin content, It works as setting the land to Linden content in SL.
|
||||
; To use it, activate god mode in the viewer, select the parcel and go to: Admin -> Parcel -> Set to Linden Content ( CTRL+ALT+SHIFT+C)
|
||||
; DefaultAdministratorParcelName = "Admin Parcel"
|
||||
; DefaultAdministratorGroupUUID = "00000000-0000-0000-0000-000000000000"
|
||||
; DefaultAdministratorOwnerUUID = "00000000-0000-0000-0000-000000000000"
|
||||
|
||||
|
||||
;;
|
||||
@@ -2219,9 +2151,9 @@
|
||||
DwellModule = DefaultDwellModule
|
||||
|
||||
[ServerReleaseNotes]
|
||||
;; Comment or set to "" to disable
|
||||
ServerReleaseNotesURL = "http://opensimulator.org/wiki/0.9.3.1_Release"
|
||||
|
||||
;; Comment or set to "" to disable
|
||||
ServerReleaseNotesURL = "https://github.com/lickx/opensim-lickx"
|
||||
|
||||
[Modules]
|
||||
Include-modules = "addon-modules/*/config/*.ini"
|
||||
|
||||
|
||||
@@ -490,6 +490,7 @@
|
||||
[GridUserService]
|
||||
; for the server connector
|
||||
LocalServiceModule = "OpenSim.Services.UserAccountService.dll:GridUserService"
|
||||
;UseCache = true
|
||||
|
||||
|
||||
[AgentPreferencesService]
|
||||
@@ -500,6 +501,8 @@
|
||||
[PresenceService]
|
||||
; for the server connector
|
||||
LocalServiceModule = "OpenSim.Services.PresenceService.dll:PresenceService"
|
||||
;AllowDuplicatePresences = false
|
||||
;UseCache = true
|
||||
|
||||
[AvatarService]
|
||||
; for the server connector
|
||||
|
||||
@@ -431,6 +431,7 @@
|
||||
[GridUserService]
|
||||
; for the server connector
|
||||
LocalServiceModule = "OpenSim.Services.UserAccountService.dll:GridUserService"
|
||||
;UseCache = true
|
||||
|
||||
|
||||
[AgentPreferencesService]
|
||||
@@ -441,6 +442,8 @@
|
||||
[PresenceService]
|
||||
; for the server connector
|
||||
LocalServiceModule = "OpenSim.Services.PresenceService.dll:PresenceService"
|
||||
;AllowDuplicatePresences = false
|
||||
;UseCache = true
|
||||
|
||||
[AvatarService]
|
||||
; for the server connector
|
||||
|
||||
@@ -1858,6 +1858,14 @@
|
||||
<key>value</key><string>0x2</string>
|
||||
<key>tooltip</key><string>osTeleportObject flag: stop at jump point if tp fails</string>
|
||||
</map>
|
||||
<key>PAYMENT_INFO_ON_FILE</key><map>
|
||||
<key>type</key><string>integer</string>
|
||||
<key>value</key><string>1</string>
|
||||
</map>
|
||||
<key>PAYMENT_INFO_USED</key><map>
|
||||
<key>type</key><string>integer</string>
|
||||
<key>value</key><string>2</string>
|
||||
</map>
|
||||
<key>PARCEL_COUNT_GROUP</key><map>
|
||||
<key>type</key><string>integer</string>
|
||||
<key>value</key><string>2</string>
|
||||
@@ -5108,6 +5116,13 @@
|
||||
<map>
|
||||
<key>return</key><string>float</string>
|
||||
<key>arguments</key><undef/>
|
||||
<key>tooltip</key><string>Returns parcel time in seconds since midnight.\n- Sleep: 0 seconds.</string>
|
||||
</map>
|
||||
<key>llGetRegionTimeOfDay</key>
|
||||
<map>
|
||||
<key>return</key><string>float</string>
|
||||
<key>arguments</key><undef/>
|
||||
<key>tooltip</key><string>Returns region time in seconds since midnight.\n- Sleep: 0 seconds.</string>
|
||||
</map>
|
||||
<key>llGetTimestamp</key>
|
||||
<map>
|
||||
@@ -9548,5 +9563,12 @@
|
||||
<key>arguments</key><undef/>
|
||||
<key>tooltip</key><string>Returns the name of the currently enabled wind plugin.</string>
|
||||
</map>
|
||||
<key>lxGetAgentViewer</key>
|
||||
<map>
|
||||
<key>return</key><string>string</string>
|
||||
<key>arguments</key><array>
|
||||
<map><key>avkey</key><map><key>type</key><string>key</string></map></map>
|
||||
</array>
|
||||
</map>
|
||||
</map>
|
||||
</map></llsd>
|
||||
</map></llsd>
|
||||
|
||||
BIN
bin/assets/SoundsAssetSet/FSAlertSound.ogg
Normal file
BIN
bin/assets/SoundsAssetSet/FSAlertSound.ogg
Normal file
Binary file not shown.
@@ -161,4 +161,10 @@
|
||||
<Key Name="assetType" Value="1" />
|
||||
<Key Name="fileName" Value="OSSndWindowOpen.ogg" />
|
||||
</Section>
|
||||
<Section Name="FSAlertSound">
|
||||
<Key Name="assetID" Value="a3f48b85-c29f-1f97-ebb6-644b7c053512" />
|
||||
<Key Name="name" Value="FSAlertSound" />
|
||||
<Key Name="assetType" Value="1" />
|
||||
<Key Name="fileName" Value="FSAlertSound.ogg" />
|
||||
</Section>
|
||||
</Nini>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -270,14 +270,14 @@
|
||||
<Key Name="fileName" Value="water3.jp2" />
|
||||
</Section>
|
||||
<Section Name="Sea">
|
||||
<Key Name="assetID" Value="482E671B-9244-4B86-A036-68953A898D11" />
|
||||
<Key Name="assetID" Value="482e671b-9244-4b86-a036-68953a898d11" />
|
||||
<Key Name="name" Value="Sea" />
|
||||
<Key Name="assetType" Value="0" />
|
||||
<Key Name="fileName" Value="water3.jp2" />
|
||||
</Section>
|
||||
<Section Name="SeaWaterTrasp">
|
||||
<Section Name="SeaWaterTransp">
|
||||
<Key Name="assetID" Value="2bfd3884-7e27-69b9-ba3a-3e673f680004" />
|
||||
<Key Name="name" Value="SeaWaterTrasp" />
|
||||
<Key Name="name" Value="SeaWaterTransp" />
|
||||
<Key Name="assetType" Value="0" />
|
||||
<Key Name="fileName" Value="seaWaterTransp.j2c" />
|
||||
</Section>
|
||||
@@ -375,26 +375,51 @@
|
||||
</Section>
|
||||
|
||||
<Section Name="Terrain Dirt">
|
||||
<Key Name="assetID" Value="b8d3965a-ad78-bf43-699b-bff8eca6c975"/>
|
||||
<Key Name="assetID" Value="0bc58228-74a0-7e83-89bc-5c23464bcec5"/>
|
||||
<Key Name="name" Value="Terrain Dirt"/>
|
||||
<Key Name="assetType" Value="0" />
|
||||
<Key Name="fileName" Value="0bc58228-74a0-7e83-89bc-5c23464bcec5.j2c" />
|
||||
</Section>
|
||||
<Section Name="Terrain Grass">
|
||||
<Key Name="assetID" Value="63338ede-0037-c4fd-855b-015d77112fc8"/>
|
||||
<Key Name="name" Value="Terrain Grass"/>
|
||||
<Key Name="assetType" Value="0" />
|
||||
<Key Name="fileName" Value="63338ede-0037-c4fd-855b-015d77112fc8.j2c" />
|
||||
</Section>
|
||||
<Section Name="Terrain Mountain">
|
||||
<Key Name="assetID" Value="303cd381-8560-7579-23f1-f0a880799740"/>
|
||||
<Key Name="name" Value="Terrain Mountain"/>
|
||||
<Key Name="assetType" Value="0" />
|
||||
<Key Name="fileName" Value="303cd381-8560-7579-23f1-f0a880799740.j2c" />
|
||||
</Section>
|
||||
<Section Name="Terrain Rock">
|
||||
<Key Name="assetID" Value="53a2f406-4895-1d13-d541-d2e3b86bc19c"/>
|
||||
<Key Name="name" Value="Terrain Rock"/>
|
||||
<Key Name="assetType" Value="0" />
|
||||
<Key Name="fileName" Value="53a2f406-4895-1d13-d541-d2e3b86bc19c.j2c" />
|
||||
</Section>
|
||||
|
||||
<Section Name="Terrain Dirt (legacy)">
|
||||
<Key Name="assetID" Value="b8d3965a-ad78-bf43-699b-bff8eca6c975"/>
|
||||
<Key Name="name" Value="Terrain Dirt (legacy)"/>
|
||||
<Key Name="assetType" Value="0" />
|
||||
<Key Name="fileName" Value="Terrain Dirt-b8d3965a-ad78-bf43-699b-bff8eca6c975.texture" />
|
||||
</Section>
|
||||
<Section Name="Terrain Grass">
|
||||
<Section Name="Terrain Grass (legacy)">
|
||||
<Key Name="assetID" Value="abb783e6-3e93-26c0-248a-247666855da3"/>
|
||||
<Key Name="name" Value="Terrain Grass"/>
|
||||
<Key Name="name" Value="Terrain Grass (legacy)"/>
|
||||
<Key Name="assetType" Value="0" />
|
||||
<Key Name="fileName" Value="Terrain Grass-abb783e6-3e93-26c0-248a-247666855da3.texture" />
|
||||
</Section>
|
||||
<Section Name="Terrain Mountain">
|
||||
<Section Name="Terrain Mountain (legacy)">
|
||||
<Key Name="assetID" Value="179cdabd-398a-9b6b-1391-4dc333ba321f"/>
|
||||
<Key Name="name" Value="Terrain Mountain"/>
|
||||
<Key Name="name" Value="Terrain Mountain (legacy)"/>
|
||||
<Key Name="assetType" Value="0" />
|
||||
<Key Name="fileName" Value="Terrain Mountain-179cdabd-398a-9b6b-1391-4dc333ba321f.texture" />
|
||||
</Section>
|
||||
<Section Name="Terrain Rock">
|
||||
<Section Name="Terrain Rock (legacy)">
|
||||
<Key Name="assetID" Value="beb169c7-11ea-fff2-efe5-0f24dc881df2"/>
|
||||
<Key Name="name" Value="Terrain Rock"/>
|
||||
<Key Name="name" Value="Terrain Rock (legacy)"/>
|
||||
<Key Name="assetType" Value="0" />
|
||||
<Key Name="fileName" Value="Terrain Rock-beb169c7-11ea-fff2-efe5-0f24dc881df2.texture" />
|
||||
</Section>
|
||||
@@ -755,13 +780,13 @@
|
||||
Texture expected by viewers for properly displaying stars in the night sky
|
||||
Name derives from label in viewer code
|
||||
-->
|
||||
<Section Name="IMG_BLOOM1 Texture">
|
||||
<Section Name="IMG_BLOOM1">
|
||||
<Key Name="assetID" Value="3c59f7fe-9dc8-47f9-8aaf-a9dd1fbc3bef"/>
|
||||
<Key Name="name" Value="IMG_BLOOM1 Texture"/>
|
||||
<Key Name="name" Value="IMG_BLOOM1"/>
|
||||
<Key Name="assetType" Value="0" />
|
||||
<Key Name="fileName" Value="IMG_BLOOM1.jp2" />
|
||||
<Key Name="fileName" Value="3c59f7fe-9dc8-47f9-8aaf-a9dd1fbc3bef.j2c" />
|
||||
</Section>
|
||||
|
||||
|
||||
<Section Name="Smoke">
|
||||
<Key Name="assetID" Value="b4ba225c-373f-446d-9f7e-6cb7b5cf9b3d"/>
|
||||
<Key Name="name" Value="Smoke"/>
|
||||
@@ -769,8 +794,39 @@
|
||||
<Key Name="fileName" Value="b4ba225c-373f-446d-9f7e-6cb7b5cf9b3d.j2c"/>
|
||||
</Section>
|
||||
|
||||
<!-- Sprite used to generate collision visual effect -->
|
||||
<Section Name="IMG_SHOT">
|
||||
<Key Name="assetID" Value="35f217a3-f618-49cf-bbca-c86d486551a9"/>
|
||||
<Key Name="name" Value="IMG_SHOT"/>
|
||||
<Key Name="assetType" Value="0" />
|
||||
<Key Name="fileName" Value="35f217a3-f618-49cf-bbca-c86d486551a9.j2c" />
|
||||
</Section>
|
||||
|
||||
<!-- Not sure what this is used for but it looks like a smokey cloud in Photoshop -->
|
||||
<Section Name="IMG_DEFAULT">
|
||||
<Key Name="assetID" Value="d2114404-dd59-4a4d-8e6c-49359e91bbf0"/>
|
||||
<Key Name="name" Value="IMG_DEFAULT"/>
|
||||
<Key Name="assetType" Value="0" />
|
||||
<Key Name="fileName" Value="d2114404-dd59-4a4d-8e6c-49359e91bbf0.j2c" />
|
||||
</Section>
|
||||
|
||||
<!-- Pre-EEP sun -->
|
||||
<Section Name="IMG_SUN">
|
||||
<Key Name="assetID" Value="cce0f112-878f-4586-a2e2-a8f104bba271"/>
|
||||
<Key Name="name" Value="IMG_SUN"/>
|
||||
<Key Name="assetType" Value="0" />
|
||||
<Key Name="fileName" Value="sun.j2c" />
|
||||
</Section>
|
||||
|
||||
<Section Name="IMG_SMOKE_POOF">
|
||||
<Key Name="assetID" Value="1e63e323-5fe0-452e-92f8-b98bd0f764e3"/>
|
||||
<Key Name="name" Value="IMG_SMOKE_POOF"/>
|
||||
<Key Name="assetType" Value="0" />
|
||||
<Key Name="fileName" Value="1e63e323-5fe0-452e-92f8-b98bd0f764e3.j2c" />
|
||||
</Section>
|
||||
|
||||
<Section Name="Water">
|
||||
<Key Name="assetID" Value="DB814CAF-26AC-4D75-977B-A68578FE643D"/>
|
||||
<Key Name="assetID" Value="db814caf-26ac-4d75-977b-a68578fe643d"/>
|
||||
<Key Name="name" Value="Water"/>
|
||||
<Key Name="assetType" Value="0" />
|
||||
<Key Name="fileName" Value="water.jp2" />
|
||||
|
||||
Binary file not shown.
BIN
bin/assets/TexturesAssetSet/sun.j2c
Normal file
BIN
bin/assets/TexturesAssetSet/sun.j2c
Normal file
Binary file not shown.
@@ -223,7 +223,7 @@
|
||||
Allow_osTeleportObject = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER
|
||||
|
||||
; ThreatLevel Severe with additional internal restrictions
|
||||
Allow_osGetAgentIP = true ; always restricted to Administrators (true or false to disable)
|
||||
Allow_osGetAgentIP = false ; always restricted to Administrators (true or false to disable)
|
||||
Allow_osSetContentType = false
|
||||
|
||||
|
||||
|
||||
@@ -516,7 +516,7 @@
|
||||
|
||||
<Section Name="Terrain Dirt">
|
||||
<Key Name="inventoryID" Value="00000000-0000-2222-9999-000000000006"/>
|
||||
<Key Name="assetID" Value="b8d3965a-ad78-bf43-699b-bff8eca6c975"/>
|
||||
<Key Name="assetID" Value="0bc58228-74a0-7e83-89bc-5c23464bcec5"/>
|
||||
<Key Name="folderID" Value="00000112-000f-0000-0000-000100bba001"/>
|
||||
<Key Name="description" Value="" />
|
||||
<Key Name="name" Value="Terrain Dirt" />
|
||||
@@ -526,7 +526,7 @@
|
||||
|
||||
<Section Name="Terrain Grass">
|
||||
<Key Name="inventoryID" Value="00000000-0000-2222-9999-000000000007"/>
|
||||
<Key Name="assetID" Value="abb783e6-3e93-26c0-248a-247666855da3"/>
|
||||
<Key Name="assetID" Value="63338ede-0037-c4fd-855b-015d77112fc8"/>
|
||||
<Key Name="folderID" Value="00000112-000f-0000-0000-000100bba001"/>
|
||||
<Key Name="description" Value="" />
|
||||
<Key Name="name" Value="Terrain Grass" />
|
||||
@@ -536,7 +536,7 @@
|
||||
|
||||
<Section Name="Terrain Mountain">
|
||||
<Key Name="inventoryID" Value="00000000-0000-2222-9999-000000000008"/>
|
||||
<Key Name="assetID" Value="179cdabd-398a-9b6b-1391-4dc333ba321f"/>
|
||||
<Key Name="assetID" Value="303cd381-8560-7579-23f1-f0a880799740"/>
|
||||
<Key Name="folderID" Value="00000112-000f-0000-0000-000100bba001"/>
|
||||
<Key Name="description" Value="" />
|
||||
<Key Name="name" Value="Terrain Mountain" />
|
||||
@@ -546,7 +546,7 @@
|
||||
|
||||
<Section Name="Terrain Rock">
|
||||
<Key Name="inventoryID" Value="00000000-0000-2222-9999-000000000009"/>
|
||||
<Key Name="assetID" Value="beb169c7-11ea-fff2-efe5-0f24dc881df2"/>
|
||||
<Key Name="assetID" Value="53a2f406-4895-1d13-d541-d2e3b86bc19c"/>
|
||||
<Key Name="folderID" Value="00000112-000f-0000-0000-000100bba001"/>
|
||||
<Key Name="description" Value="" />
|
||||
<Key Name="name" Value="Terrain Rock" />
|
||||
|
||||
BIN
bin/lib64/libsqlite3-arm64.so
Executable file
BIN
bin/lib64/libsqlite3-arm64.so
Executable file
Binary file not shown.
47
extra/OpenSimMutelist/mutelist.sql
Normal file
47
extra/OpenSimMutelist/mutelist.sql
Normal file
@@ -0,0 +1,47 @@
|
||||
/*M!999999\- enable the sandbox mode */
|
||||
-- MariaDB dump 10.19 Distrib 10.11.11-MariaDB, for debian-linux-gnu (aarch64)
|
||||
--
|
||||
-- Host: localhost Database: grid
|
||||
-- ------------------------------------------------------
|
||||
-- Server version 10.11.11-MariaDB-0+deb12u1
|
||||
|
||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
||||
/*!40101 SET NAMES utf8mb4 */;
|
||||
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
|
||||
/*!40103 SET TIME_ZONE='+00:00' */;
|
||||
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
|
||||
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
|
||||
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
||||
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
||||
|
||||
--
|
||||
-- Table structure for table `mutelist`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `mutelist`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8mb4 */;
|
||||
CREATE TABLE `mutelist` (
|
||||
`AgentID` char(36) NOT NULL,
|
||||
`MuteID` char(36) NOT NULL,
|
||||
`MuteName` varchar(255) NOT NULL,
|
||||
`type` int(11) unsigned NOT NULL,
|
||||
`flags` int(11) unsigned NOT NULL,
|
||||
`Stamp` timestamp NOT NULL DEFAULT current_timestamp(),
|
||||
UNIQUE KEY `AgentID_2` (`AgentID`,`MuteID`) USING BTREE,
|
||||
KEY `AgentID` (`AgentID`) USING BTREE
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
||||
|
||||
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
||||
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
||||
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
|
||||
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
-- Dump completed on 2025-04-14 10:18:07
|
||||
13
extra/OpenSimMutelist/readme.txt
Normal file
13
extra/OpenSimMutelist/readme.txt
Normal file
@@ -0,0 +1,13 @@
|
||||
OpenSimMutelist
|
||||
https://github.com/lickx/OpenSimMutelist
|
||||
|
||||
The advantage of this 3rd party module over the standard
|
||||
mutelist module, is that mutes are stored on the grid
|
||||
instead of the user's viewer cache; thus surviving
|
||||
a viewer cache clear.
|
||||
|
||||
Only MySQL/MariaDB supported for now
|
||||
|
||||
To be sourced into your robust database
|
||||
|
||||
Needs the mute web helper to also be setup
|
||||
1
extra/OpenSimSearch/crontab.example
Normal file
1
extra/OpenSimSearch/crontab.example
Normal file
@@ -0,0 +1 @@
|
||||
0 * * * * wget -q --spider https://example.com/helper/search/parser.php
|
||||
12
extra/OpenSimSearch/readme.txt
Normal file
12
extra/OpenSimSearch/readme.txt
Normal file
@@ -0,0 +1,12 @@
|
||||
OpenSimSearch
|
||||
https://github.com/lickx/OpenSimSearch
|
||||
|
||||
For having search functionality on a grid
|
||||
|
||||
Only MySQL/MariaDB supported for now
|
||||
|
||||
To be sourced in your robust database
|
||||
|
||||
Note the classifieds table will already be made by robust itself
|
||||
|
||||
Needs the search web helper to also be setup
|
||||
198
extra/OpenSimSearch/search.sql
Normal file
198
extra/OpenSimSearch/search.sql
Normal file
@@ -0,0 +1,198 @@
|
||||
/*M!999999\- enable the sandbox mode */
|
||||
-- MariaDB dump 10.19 Distrib 10.11.11-MariaDB, for debian-linux-gnu (aarch64)
|
||||
--
|
||||
-- Host: localhost Database: grid
|
||||
-- ------------------------------------------------------
|
||||
-- Server version 10.11.11-MariaDB-0+deb12u1
|
||||
|
||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
||||
/*!40101 SET NAMES utf8mb4 */;
|
||||
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
|
||||
/*!40103 SET TIME_ZONE='+00:00' */;
|
||||
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
|
||||
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
|
||||
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
||||
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
||||
|
||||
--
|
||||
-- Table structure for table `search_allparcels`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `search_allparcels`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8mb4 */;
|
||||
CREATE TABLE `search_allparcels` (
|
||||
`regionUUID` char(36) NOT NULL,
|
||||
`parcelname` varchar(255) NOT NULL,
|
||||
`ownerUUID` char(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000',
|
||||
`groupUUID` char(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000',
|
||||
`landingpoint` varchar(255) NOT NULL,
|
||||
`parcelUUID` char(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000',
|
||||
`infoUUID` char(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000',
|
||||
`parcelarea` int(11) NOT NULL,
|
||||
PRIMARY KEY (`parcelUUID`),
|
||||
KEY `regionUUID` (`regionUUID`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `search_events`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `search_events`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8mb4 */;
|
||||
CREATE TABLE `search_events` (
|
||||
`owneruuid` char(36) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`eventid` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`creatoruuid` char(36) NOT NULL,
|
||||
`category` int(2) NOT NULL,
|
||||
`description` text NOT NULL,
|
||||
`dateUTC` int(10) NOT NULL,
|
||||
`duration` int(10) NOT NULL,
|
||||
`covercharge` tinyint(1) NOT NULL,
|
||||
`coveramount` int(10) NOT NULL,
|
||||
`simname` varchar(255) NOT NULL,
|
||||
`parcelUUID` char(36) NOT NULL,
|
||||
`globalPos` varchar(255) NOT NULL,
|
||||
`eventflags` int(1) NOT NULL,
|
||||
PRIMARY KEY (`eventid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `search_hostsregister`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `search_hostsregister`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8mb4 */;
|
||||
CREATE TABLE `search_hostsregister` (
|
||||
`host` varchar(255) NOT NULL,
|
||||
`port` int(5) NOT NULL,
|
||||
`register` int(10) NOT NULL,
|
||||
`nextcheck` int(10) NOT NULL,
|
||||
`checked` tinyint(1) NOT NULL,
|
||||
`failcounter` int(10) NOT NULL,
|
||||
PRIMARY KEY (`host`,`port`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `search_objects`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `search_objects`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8mb4 */;
|
||||
CREATE TABLE `search_objects` (
|
||||
`objectuuid` char(36) NOT NULL,
|
||||
`parceluuid` char(36) NOT NULL,
|
||||
`location` varchar(255) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`description` varchar(255) NOT NULL,
|
||||
`regionuuid` char(36) NOT NULL DEFAULT '',
|
||||
PRIMARY KEY (`objectuuid`,`parceluuid`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `search_parcels`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `search_parcels`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8mb4 */;
|
||||
CREATE TABLE `search_parcels` (
|
||||
`regionUUID` char(36) NOT NULL,
|
||||
`parcelname` varchar(255) NOT NULL,
|
||||
`parcelUUID` char(36) NOT NULL,
|
||||
`landingpoint` varchar(255) NOT NULL,
|
||||
`description` varchar(255) NOT NULL,
|
||||
`searchcategory` varchar(50) NOT NULL,
|
||||
`build` enum('true','false') NOT NULL,
|
||||
`script` enum('true','false') NOT NULL,
|
||||
`public` enum('true','false') NOT NULL,
|
||||
`dwell` float NOT NULL DEFAULT 0,
|
||||
`infouuid` varchar(36) NOT NULL DEFAULT '',
|
||||
`mature` varchar(10) NOT NULL DEFAULT 'PG',
|
||||
`pictureUUID` char(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000',
|
||||
PRIMARY KEY (`regionUUID`,`parcelUUID`),
|
||||
KEY `name` (`parcelname`),
|
||||
KEY `description` (`description`),
|
||||
KEY `searchcategory` (`searchcategory`),
|
||||
KEY `dwell` (`dwell`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `search_parcelsales`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `search_parcelsales`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8mb4 */;
|
||||
CREATE TABLE `search_parcelsales` (
|
||||
`regionUUID` char(36) NOT NULL,
|
||||
`parcelname` varchar(255) NOT NULL,
|
||||
`parcelUUID` char(36) NOT NULL,
|
||||
`area` int(6) NOT NULL,
|
||||
`saleprice` int(11) NOT NULL,
|
||||
`landingpoint` varchar(255) NOT NULL,
|
||||
`infoUUID` char(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000',
|
||||
`dwell` int(11) NOT NULL,
|
||||
`parentestate` int(11) NOT NULL DEFAULT 1,
|
||||
`mature` varchar(10) NOT NULL DEFAULT 'PG',
|
||||
PRIMARY KEY (`regionUUID`,`parcelUUID`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `search_popularplaces`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `search_popularplaces`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8mb4 */;
|
||||
CREATE TABLE `search_popularplaces` (
|
||||
`parcelUUID` char(36) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`dwell` float NOT NULL,
|
||||
`infoUUID` char(36) NOT NULL,
|
||||
`has_picture` tinyint(1) NOT NULL,
|
||||
`mature` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
|
||||
PRIMARY KEY (`parcelUUID`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `search_regions`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `search_regions`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8mb4 */;
|
||||
CREATE TABLE `search_regions` (
|
||||
`regionname` varchar(255) NOT NULL,
|
||||
`regionUUID` char(36) NOT NULL,
|
||||
`regionhandle` varchar(255) NOT NULL,
|
||||
`url` varchar(255) NOT NULL,
|
||||
`owner` varchar(255) NOT NULL,
|
||||
`owneruuid` char(36) NOT NULL,
|
||||
PRIMARY KEY (`regionUUID`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
||||
|
||||
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
||||
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
||||
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
|
||||
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
-- Dump completed on 2025-04-14 10:16:19
|
||||
1
helper/index.html
Normal file
1
helper/index.html
Normal file
@@ -0,0 +1 @@
|
||||
<p></p>
|
||||
6
helper/mute/databaseinfo.php
Normal file
6
helper/mute/databaseinfo.php
Normal file
@@ -0,0 +1,6 @@
|
||||
<?php
|
||||
$DB_HOST = "localhost";
|
||||
$DB_USER = "opensim";
|
||||
$DB_PASSWORD = "password";
|
||||
$DB_NAME = "grid";
|
||||
?>
|
||||
1
helper/mute/index.html
Normal file
1
helper/mute/index.html
Normal file
@@ -0,0 +1 @@
|
||||
<p></p>
|
||||
144
helper/mute/mutelist.php
Normal file
144
helper/mute/mutelist.php
Normal file
@@ -0,0 +1,144 @@
|
||||
<?php
|
||||
|
||||
include("databaseinfo.php");
|
||||
|
||||
// Attempt to connect to the database with the mutelist table
|
||||
try {
|
||||
$db = new PDO("mysql:host=$DB_HOST;dbname=$DB_NAME", $DB_USER, $DB_PASSWORD);
|
||||
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||
}
|
||||
catch(PDOException $e)
|
||||
{
|
||||
echo "Error connecting to the database with the mutelist table\n";
|
||||
file_put_contents('PDOErrors.txt', $e->getMessage() . "\n-----\n", FILE_APPEND);
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
###################### No user serviceable parts below #####################
|
||||
|
||||
function get_error_message($result)
|
||||
{
|
||||
global $db;
|
||||
|
||||
if (!$result)
|
||||
return "";
|
||||
|
||||
$errorInfo = $db->errorInfo();
|
||||
return $errorInfo[2];
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# The XMLRPC server object
|
||||
#
|
||||
|
||||
$xmlrpc_server = xmlrpc_server_create();
|
||||
|
||||
#
|
||||
# Return list of muted agents and objects
|
||||
#
|
||||
|
||||
xmlrpc_server_register_method($xmlrpc_server, "mutelist_request",
|
||||
"mutelist_request");
|
||||
|
||||
function mutelist_request($method_name, $params, $app_data)
|
||||
{
|
||||
global $db;
|
||||
|
||||
$req = $params[0];
|
||||
|
||||
$avatarUUID = $req['avataruuid'];
|
||||
|
||||
$query = $db->prepare("SELECT * FROM mutelist WHERE AgentID = ?");
|
||||
$result = $query->execute( array($avatarUUID) );
|
||||
|
||||
$mutelist = "";
|
||||
if ($query->rowCount() > 0)
|
||||
{
|
||||
while ($row = $query->fetch(PDO::FETCH_ASSOC))
|
||||
{
|
||||
$mutelist .= $row["type"] . " ";
|
||||
$mutelist .= $row["MuteID"] . " ";
|
||||
$mutelist .= $row["MuteName"] . "|";
|
||||
$mutelist .= $row["flags"] . "\n";
|
||||
}
|
||||
}
|
||||
|
||||
$response_xml = xmlrpc_encode(array(
|
||||
'success' => $result,
|
||||
'errorMessage' => get_error_message($result),
|
||||
'mutelist' => $mutelist
|
||||
));
|
||||
|
||||
print $response_xml;
|
||||
}
|
||||
|
||||
#
|
||||
# Remove an event notify reminder request
|
||||
#
|
||||
|
||||
xmlrpc_server_register_method($xmlrpc_server, "mutelist_update",
|
||||
"mutelist_update");
|
||||
|
||||
function mutelist_update($method_name, $params, $app_data)
|
||||
{
|
||||
global $db;
|
||||
|
||||
$req = $params[0];
|
||||
|
||||
$avatarUUID = $req['avataruuid'];
|
||||
$muteUUID = $req['muteuuid'];
|
||||
$name = $req['name'];
|
||||
$type = $req['type'];
|
||||
$flags = $req['flags'];
|
||||
|
||||
$query = $db->prepare("INSERT INTO mutelist VALUES (?, ?, ?, ?, ?, NOW())");
|
||||
$result = $query->execute(
|
||||
array($avatarUUID, $muteUUID, $name, $type, $flags) );
|
||||
|
||||
$response_xml = xmlrpc_encode(array(
|
||||
'success' => $result,
|
||||
'errorMessage' => get_error_message($result)
|
||||
));
|
||||
|
||||
print $response_xml;
|
||||
}
|
||||
|
||||
#
|
||||
# Remove an event notify reminder request
|
||||
#
|
||||
|
||||
xmlrpc_server_register_method($xmlrpc_server, "mutelist_remove",
|
||||
"mutelist_remove");
|
||||
|
||||
function mutelist_remove($method_name, $params, $app_data)
|
||||
{
|
||||
global $db;
|
||||
|
||||
$req = $params[0];
|
||||
|
||||
$avatarUUID = $req['avataruuid'];
|
||||
$muteUUID = $req['muteuuid'];
|
||||
|
||||
$query = $db->prepare("DELETE FROM mutelist WHERE" .
|
||||
" AgentID = ? AND MuteID = ?");
|
||||
$result = $query->execute( array($avatarUUID, $muteUUID) );
|
||||
|
||||
$response_xml = xmlrpc_encode(array(
|
||||
'success' => $result,
|
||||
'errorMessage' => get_error_message($result)
|
||||
));
|
||||
|
||||
print $response_xml;
|
||||
}
|
||||
|
||||
#
|
||||
# Process the request
|
||||
#
|
||||
|
||||
$request_xml = file_get_contents("php://input");
|
||||
|
||||
xmlrpc_server_call_method($xmlrpc_server, $request_xml, '');
|
||||
xmlrpc_server_destroy($xmlrpc_server);
|
||||
?>
|
||||
2
helper/robots.txt
Normal file
2
helper/robots.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
User-agent: *
|
||||
Disallow: /
|
||||
6
helper/search/databaseinfo.php
Normal file
6
helper/search/databaseinfo.php
Normal file
@@ -0,0 +1,6 @@
|
||||
<?php
|
||||
$DB_HOST = "localhost";
|
||||
$DB_USER = "opensim";
|
||||
$DB_PASSWORD = "password";
|
||||
$DB_NAME = "grid";
|
||||
?>
|
||||
1
helper/search/index.html
Normal file
1
helper/search/index.html
Normal file
@@ -0,0 +1 @@
|
||||
<p></p>
|
||||
354
helper/search/parser.php
Normal file
354
helper/search/parser.php
Normal file
@@ -0,0 +1,354 @@
|
||||
<?php
|
||||
include("databaseinfo.php");
|
||||
|
||||
//Supress all Warnings/Errors
|
||||
//error_reporting(0);
|
||||
|
||||
$now = time();
|
||||
|
||||
// Attempt to connect to the search database
|
||||
try {
|
||||
$db = new PDO("mysql:host=$DB_HOST;dbname=$DB_NAME", $DB_USER, $DB_PASSWORD);
|
||||
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||
}
|
||||
catch(PDOException $e)
|
||||
{
|
||||
echo "Error connecting to the search database\n";
|
||||
file_put_contents('PDOErrors.txt', $e->getMessage() . "\n-----\n", FILE_APPEND);
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
function GetURL($host, $port, $url)
|
||||
{
|
||||
$url = "http://$host:$port/$url";
|
||||
|
||||
$ch = curl_init();
|
||||
curl_setopt($ch, CURLOPT_URL, $url);
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
||||
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10);
|
||||
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
|
||||
|
||||
$data = curl_exec($ch);
|
||||
if (curl_errno($ch) == 0)
|
||||
{
|
||||
curl_close($ch);
|
||||
return $data;
|
||||
}
|
||||
|
||||
curl_close($ch);
|
||||
return "";
|
||||
}
|
||||
|
||||
function CheckHost($hostname, $port)
|
||||
{
|
||||
global $db, $now;
|
||||
|
||||
$xml = GetURL($hostname, $port, "?method=collector");
|
||||
if ($xml == "") //No data was retrieved? (CURL may have timed out)
|
||||
$failcounter = "failcounter + 1";
|
||||
else
|
||||
$failcounter = "0";
|
||||
|
||||
//Update nextcheck to be 10 minutes from now. The current OS instance
|
||||
//won't be checked again until at least this much time has gone by.
|
||||
$next = $now + 600;
|
||||
|
||||
$query = $db->prepare("UPDATE search_hostsregister SET nextcheck = ?," .
|
||||
" checked = 1, failcounter = $failcounter" .
|
||||
" WHERE host = ? AND port = ?");
|
||||
$query->execute( array($next, $hostname, $port) );
|
||||
|
||||
if ($xml != "")
|
||||
parse($hostname, $port, $xml);
|
||||
}
|
||||
|
||||
function parse($hostname, $port, $xml)
|
||||
{
|
||||
global $db, $now;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Search engine sim scanner
|
||||
//
|
||||
|
||||
//
|
||||
// Load XML doc from URL
|
||||
//
|
||||
$objDOM = new DOMDocument();
|
||||
$objDOM->resolveExternals = false;
|
||||
|
||||
//Don't try and parse if XML is invalid or we got an HTML 404 error.
|
||||
if ($objDOM->loadXML($xml) == False)
|
||||
return;
|
||||
|
||||
//
|
||||
// Get the region data to update
|
||||
//
|
||||
$regiondata = $objDOM->getElementsByTagName("regiondata");
|
||||
|
||||
//If returned length is 0, collector method may have returned an error
|
||||
if ($regiondata->length == 0)
|
||||
return;
|
||||
|
||||
$regiondata = $regiondata->item(0);
|
||||
|
||||
//
|
||||
// Update nextcheck so this host entry won't be checked again until after
|
||||
// the DataSnapshot module has generated a new set of data to be parsed.
|
||||
//
|
||||
$expire = $regiondata->getElementsByTagName("expire")->item(0)->nodeValue;
|
||||
$next = $now + $expire;
|
||||
|
||||
$query = $db->prepare("UPDATE search_hostsregister SET nextcheck = ?" .
|
||||
" WHERE host = ? AND port = ?");
|
||||
$query->execute( array($next, $hostname, $port) );
|
||||
|
||||
//
|
||||
// Get the region data to be saved in the database
|
||||
//
|
||||
$regionlist = $regiondata->getElementsByTagName("region");
|
||||
|
||||
foreach ($regionlist as $region)
|
||||
{
|
||||
$regioncategory = $region->getAttributeNode("category")->nodeValue;
|
||||
|
||||
//
|
||||
// Start reading the Region info
|
||||
//
|
||||
$info = $region->getElementsByTagName("info")->item(0);
|
||||
|
||||
$regionuuid = $info->getElementsByTagName("uuid")->item(0)->nodeValue;
|
||||
|
||||
$regionname = $info->getElementsByTagName("name")->item(0)->nodeValue;
|
||||
|
||||
$regionhandle = $info->getElementsByTagName("handle")->item(0)->nodeValue;
|
||||
|
||||
$url = $info->getElementsByTagName("url")->item(0)->nodeValue;
|
||||
|
||||
//
|
||||
// First, check if we already have a region that is the same
|
||||
//
|
||||
$check = $db->prepare("SELECT * FROM search_regions WHERE regionUUID = ?");
|
||||
$check->execute( array($regionuuid) );
|
||||
|
||||
if ($check->rowCount() > 0)
|
||||
{
|
||||
$query = $db->prepare("DELETE FROM search_regions WHERE regionUUID = ?");
|
||||
$query->execute( array($regionuuid) );
|
||||
$query = $db->prepare("DELETE FROM search_parcels WHERE regionUUID = ?");
|
||||
$query->execute( array($regionuuid) );
|
||||
$query = $db->prepare("DELETE FROM search_allparcels WHERE regionUUID = ?");
|
||||
$query->execute( array($regionuuid) );
|
||||
$query = $db->prepare("DELETE FROM search_parcelsales WHERE regionUUID = ?");
|
||||
$query->execute( array($regionuuid) );
|
||||
$query = $db->prepare("DELETE FROM search_objects WHERE regionuuid = ?");
|
||||
$query->execute( array($regionuuid) );
|
||||
}
|
||||
|
||||
$data = $region->getElementsByTagName("data")->item(0);
|
||||
$estate = $data->getElementsByTagName("estate")->item(0);
|
||||
|
||||
$username = $estate->getElementsByTagName("name")->item(0)->nodeValue;
|
||||
$useruuid = $estate->getElementsByTagName("uuid")->item(0)->nodeValue;
|
||||
|
||||
$estateid = $estate->getElementsByTagName("id")->item(0)->nodeValue;
|
||||
|
||||
//
|
||||
// Second, add the new info to the database
|
||||
//
|
||||
$query = $db->prepare("INSERT INTO search_regions VALUES(:r_name, :r_uuid, " .
|
||||
":r_handle, :url, :u_name, :u_uuid)");
|
||||
$query->execute( array("r_name" => $regionname, "r_uuid" => $regionuuid,
|
||||
"r_handle" => $regionhandle, "url" => $url,
|
||||
"u_name" => $username, "u_uuid" => $useruuid) );
|
||||
|
||||
//
|
||||
// Start reading the parcel info
|
||||
//
|
||||
$parcel = $data->getElementsByTagName("parcel");
|
||||
|
||||
foreach ($parcel as $value)
|
||||
{
|
||||
$parcelname = $value->getElementsByTagName("name")->item(0)->nodeValue;
|
||||
|
||||
$parceluuid = $value->getElementsByTagName("uuid")->item(0)->nodeValue;
|
||||
|
||||
$infouuid = $value->getElementsByTagName("infouuid")->item(0)->nodeValue;
|
||||
|
||||
$parcellanding = $value->getElementsByTagName("location")->item(0)->nodeValue;
|
||||
|
||||
$parceldescription = $value->getElementsByTagName("description")->item(0)->nodeValue;
|
||||
|
||||
$parcelarea = $value->getElementsByTagName("area")->item(0)->nodeValue;
|
||||
|
||||
$parcelcategory = $value->getAttributeNode("category")->nodeValue;
|
||||
|
||||
$parcelsaleprice = $value->getAttributeNode("salesprice")->nodeValue;
|
||||
|
||||
$dwell = $value->getElementsByTagName("dwell")->item(0)->nodeValue;
|
||||
|
||||
//The image tag will only exist if the parcel has a snapshot image
|
||||
$has_pic = 0;
|
||||
$image = "00000000-0000-0000-0000-000000000000";
|
||||
$image_node = $value->getElementsByTagName("image");
|
||||
|
||||
if ($image_node->length > 0)
|
||||
{
|
||||
$image = $image_node->item(0)->nodeValue;
|
||||
|
||||
if ($image != "00000000-0000-0000-0000-000000000000")
|
||||
$has_pic = 1;
|
||||
}
|
||||
|
||||
$owner = $value->getElementsByTagName("owner")->item(0);
|
||||
|
||||
$owneruuid = $owner->getElementsByTagName("uuid")->item(0)->nodeValue;
|
||||
|
||||
// Adding support for groups
|
||||
|
||||
$group = $value->getElementsByTagName("group")->item(0);
|
||||
|
||||
if ($group != "")
|
||||
{
|
||||
$groupuuid = $group->getElementsByTagName("groupuuid")->item(0)->nodeValue;
|
||||
}
|
||||
else
|
||||
{
|
||||
$groupuuid = "00000000-0000-0000-0000-000000000000";
|
||||
}
|
||||
|
||||
//
|
||||
// Check bits on Public, Build, Script
|
||||
//
|
||||
$parcelforsale = $value->getAttributeNode("forsale")->nodeValue;
|
||||
$parceldirectory = $value->getAttributeNode("showinsearch")->nodeValue;
|
||||
$parcelbuild = $value->getAttributeNode("build")->nodeValue;
|
||||
$parcelscript = $value->getAttributeNode("scripts")->nodeValue;
|
||||
$parcelpublic = $value->getAttributeNode("public")->nodeValue;
|
||||
|
||||
//Prepare for the insert of data in to the popularplaces table. This gets
|
||||
//rid of any obsolete data for parcels no longer set to show in search.
|
||||
$query = $db->prepare("DELETE FROM search_popularplaces WHERE parcelUUID = ?");
|
||||
$query->execute( array($parceluuid) );
|
||||
|
||||
//
|
||||
// Save
|
||||
//
|
||||
$query = $db->prepare("INSERT INTO search_allparcels VALUES(" .
|
||||
":r_uuid, :p_name, :o_uuid, :g_uuid, " .
|
||||
":landing, :p_uuid, :i_uuid, :area)");
|
||||
$query->execute( array("r_uuid" => $regionuuid,
|
||||
"p_name" => $parcelname,
|
||||
"o_uuid" => $owneruuid,
|
||||
"g_uuid" => $groupuuid,
|
||||
"landing" => $parcellanding,
|
||||
"p_uuid" => $parceluuid,
|
||||
"i_uuid" => $infouuid,
|
||||
"area" => $parcelarea) );
|
||||
|
||||
if ($parceldirectory == "true")
|
||||
{
|
||||
$query = $db->prepare("INSERT INTO search_parcels VALUES(" .
|
||||
":r_uuid, :p_name, :p_uuid, :landing, " .
|
||||
":desc, :cat, :build, :script, :public, ".
|
||||
":dwell, :i_uuid, :r_cat, :pic_uuid)");
|
||||
$query->execute( array("r_uuid" => $regionuuid,
|
||||
"p_name" => $parcelname,
|
||||
"p_uuid" => $parceluuid,
|
||||
"landing" => $parcellanding,
|
||||
"desc" => $parceldescription,
|
||||
"cat" => $parcelcategory,
|
||||
"build" => $parcelbuild,
|
||||
"script" => $parcelscript,
|
||||
"public" => $parcelpublic,
|
||||
"dwell" => $dwell,
|
||||
"i_uuid" => $infouuid,
|
||||
"r_cat" => $regioncategory,
|
||||
"pic_uuid" => $image) );
|
||||
|
||||
$query = $db->prepare("INSERT INTO search_popularplaces VALUES(" .
|
||||
":p_uuid, :p_name, :dwell, " .
|
||||
":i_uuid, :has_pic, :r_cat)");
|
||||
$query->execute( array("p_uuid" => $parceluuid,
|
||||
"p_name" => $parcelname,
|
||||
"dwell" => $dwell,
|
||||
"i_uuid" => $infouuid,
|
||||
"has_pic" => $has_pic,
|
||||
"r_cat" => $regioncategory) );
|
||||
}
|
||||
|
||||
if ($parcelforsale == "true")
|
||||
{
|
||||
$query = $db->prepare("INSERT INTO search_parcelsales VALUES(" .
|
||||
":r_uuid, :p_name, :p_uuid, :area, " .
|
||||
":price, :landing, :i_uuid, :dwell, " .
|
||||
":e_id, :r_cat)");
|
||||
$query->execute( array("r_uuid" => $regionuuid,
|
||||
"p_name" => $parcelname,
|
||||
"p_uuid" => $parceluuid,
|
||||
"area" => $parcelarea,
|
||||
"price" => $parcelsaleprice,
|
||||
"landing" => $parcellanding,
|
||||
"i_uuid" => $infouuid,
|
||||
"dwell" => $dwell,
|
||||
"e_id" => $estateid,
|
||||
"r_cat" => $regioncategory) );
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Handle objects
|
||||
//
|
||||
$objects = $data->getElementsByTagName("object");
|
||||
|
||||
foreach ($objects as $value)
|
||||
{
|
||||
$uuid = $value->getElementsByTagName("uuid")->item(0)->nodeValue;
|
||||
|
||||
$regionuuid = $value->getElementsByTagName("regionuuid")->item(0)->nodeValue;
|
||||
|
||||
$parceluuid = $value->getElementsByTagName("parceluuid")->item(0)->nodeValue;
|
||||
|
||||
$location = $value->getElementsByTagName("location")->item(0)->nodeValue;
|
||||
|
||||
$title = $value->getElementsByTagName("title")->item(0)->nodeValue;
|
||||
|
||||
$description = $value->getElementsByTagName("description")->item(0)->nodeValue;
|
||||
|
||||
$flags = $value->getElementsByTagName("flags")->item(0)->nodeValue;
|
||||
|
||||
$query = $db->prepare("INSERT INTO search_objects VALUES(" .
|
||||
":uuid, :p_uuid, :location, " .
|
||||
":title, :desc, :r_uuid)");
|
||||
$query->execute( array("uuid" => $uuid,
|
||||
"p_uuid" => $parceluuid,
|
||||
"location" => $location,
|
||||
"title" => $title,
|
||||
"desc" => $description,
|
||||
"r_uuid" => $regionuuid) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$sql = "SELECT host, port FROM search_hostsregister " .
|
||||
"WHERE nextcheck<$now AND checked=0 AND failcounter<10 LIMIT 0,10";
|
||||
$jobsearch = $db->query($sql);
|
||||
|
||||
//
|
||||
// If the sql query returns no rows, all entries in the hostsregister
|
||||
// table have been checked. Reset the checked flag and re-run the
|
||||
// query to select the next set of hosts to be checked.
|
||||
//
|
||||
if ($jobsearch->rowCount() == 0)
|
||||
{
|
||||
$jobsearch = $db->query("UPDATE search_hostsregister SET checked = 0");
|
||||
|
||||
$jobsearch = $db->query($sql);
|
||||
}
|
||||
|
||||
while ($jobs = $jobsearch->fetch(PDO::FETCH_NUM))
|
||||
CheckHost($jobs[0], $jobs[1]);
|
||||
|
||||
$db = NULL;
|
||||
?>
|
||||
694
helper/search/query.php
Normal file
694
helper/search/query.php
Normal file
@@ -0,0 +1,694 @@
|
||||
<?php
|
||||
//The description of the flags used in this file are being based on the
|
||||
//DirFindFlags enum which is defined in OpenMetaverse/DirectoryManager.cs
|
||||
//of the libopenmetaverse library.
|
||||
|
||||
include("databaseinfo.php");
|
||||
|
||||
// Attempt to connect to the database
|
||||
try {
|
||||
$db = new PDO("mysql:host=$DB_HOST;dbname=$DB_NAME", $DB_USER, $DB_PASSWORD);
|
||||
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||
}
|
||||
catch(PDOException $e)
|
||||
{
|
||||
echo "Error connecting to database\n";
|
||||
file_put_contents('PDOErrors.txt', $e->getMessage() . "\n-----\n", FILE_APPEND);
|
||||
exit;
|
||||
}
|
||||
|
||||
#
|
||||
# Copyright (c)Melanie Thielker (http://opensimulator.org/)
|
||||
#
|
||||
|
||||
###################### No user serviceable parts below #####################
|
||||
|
||||
//Join a series of terms together with optional parentheses around the result.
|
||||
//This function is used in place of the simpler join to handle the cases where
|
||||
//one or more of the supplied terms are an empty string. The parentheses can
|
||||
//be added when mixing AND and OR clauses in a SQL query.
|
||||
function join_terms($glue, $terms, $add_paren)
|
||||
{
|
||||
if (count($terms) > 1)
|
||||
{
|
||||
$type = join($glue, $terms);
|
||||
if ($add_paren == True)
|
||||
$type = "(" . $type . ")";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (count($terms) == 1)
|
||||
$type = $terms[0];
|
||||
else
|
||||
$type = "";
|
||||
}
|
||||
|
||||
return $type;
|
||||
}
|
||||
|
||||
|
||||
function process_region_type_flags($flags)
|
||||
{
|
||||
$terms = array();
|
||||
|
||||
if ($flags & 16777216) //IncludePG (1 << 24)
|
||||
$terms[] = "mature = 'PG'";
|
||||
if ($flags & 33554432) //IncludeMature (1 << 25)
|
||||
$terms[] = "mature = 'Mature'";
|
||||
if ($flags & 67108864) //IncludeAdult (1 << 26)
|
||||
$terms[] = "mature = 'Adult'";
|
||||
|
||||
return join_terms(" OR ", $terms, True);
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# The XMLRPC server object
|
||||
#
|
||||
|
||||
$xmlrpc_server = xmlrpc_server_create();
|
||||
|
||||
#
|
||||
# Places Query
|
||||
#
|
||||
|
||||
xmlrpc_server_register_method($xmlrpc_server, "dir_places_query",
|
||||
"dir_places_query");
|
||||
|
||||
function dir_places_query($method_name, $params, $app_data)
|
||||
{
|
||||
global $db;
|
||||
|
||||
$req = $params[0];
|
||||
|
||||
$flags = $req['flags'];
|
||||
$text = $req['text'];
|
||||
$category = $req['category'];
|
||||
$query_start = $req['query_start'];
|
||||
|
||||
$pieces = explode(" ", $text);
|
||||
$text = join("%", $pieces);
|
||||
|
||||
if ($text != "%%%")
|
||||
$text = "%$text%";
|
||||
else
|
||||
{
|
||||
$response_xml = xmlrpc_encode(array(
|
||||
'success' => False,
|
||||
'errorMessage' => "Invalid search terms"
|
||||
));
|
||||
|
||||
print $response_xml;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$terms = array();
|
||||
$sqldata = array();
|
||||
|
||||
$type = process_region_type_flags($flags);
|
||||
if ($type != "")
|
||||
$type = " AND " . $type;
|
||||
|
||||
if ($flags & 1024)
|
||||
$order = "dwell DESC,";
|
||||
|
||||
if ($category <= 0)
|
||||
$cat_where = "";
|
||||
else
|
||||
{
|
||||
$cat_where = "searchcategory = :cat AND ";
|
||||
|
||||
$sqldata['cat'] = $category;
|
||||
}
|
||||
|
||||
$sqldata['text1'] = $text;
|
||||
$sqldata['text2'] = $text;
|
||||
|
||||
//Prevent SQL injection by checking that $query_start is a number
|
||||
$query_start = (int)$query_start;
|
||||
if ($query_start != 0 && ($query_start%100 != 0))
|
||||
$query_start = 0;
|
||||
|
||||
$query_end = 101;
|
||||
|
||||
$sql = "SELECT * FROM search_parcels WHERE $cat_where" .
|
||||
" (parcelname LIKE :text1" .
|
||||
" OR description LIKE :text2)" .
|
||||
$type . " ORDER BY $order parcelname" .
|
||||
" LIMIT ".$query_start.",".$query_end.";";
|
||||
$query = $db->prepare($sql);
|
||||
$result = $query->execute($sqldata);
|
||||
|
||||
$data = array();
|
||||
while ($row = $query->fetch(PDO::FETCH_ASSOC))
|
||||
{
|
||||
$data[] = array(
|
||||
"parcel_id" => $row["infouuid"],
|
||||
"name" => $row["parcelname"],
|
||||
"for_sale" => "False",
|
||||
"auction" => "False",
|
||||
"dwell" => $row["dwell"]);
|
||||
}
|
||||
$response_xml = xmlrpc_encode(array(
|
||||
'success' => True,
|
||||
'errorMessage' => "",
|
||||
'data' => $data
|
||||
));
|
||||
|
||||
print $response_xml;
|
||||
}
|
||||
|
||||
#
|
||||
# Popular Places Query
|
||||
#
|
||||
|
||||
xmlrpc_server_register_method($xmlrpc_server, "dir_popular_query",
|
||||
"dir_popular_query");
|
||||
|
||||
function dir_popular_query($method_name, $params, $app_data)
|
||||
{
|
||||
global $db;
|
||||
|
||||
$req = $params[0];
|
||||
|
||||
$text = $req['text'];
|
||||
$flags = $req['flags'];
|
||||
$query_start = $req['query_start'];
|
||||
|
||||
$terms = array();
|
||||
$sqldata = array();
|
||||
|
||||
if ($flags & 0x1000) //PicturesOnly (1 << 12)
|
||||
$terms[] = "has_picture = 1";
|
||||
|
||||
if ($flags & 0x0800) //PgSimsOnly (1 << 11)
|
||||
$terms[] = "mature = 0";
|
||||
|
||||
if ($text != "")
|
||||
{
|
||||
$terms[] = "(name LIKE :text)";
|
||||
|
||||
$text = "%text%";
|
||||
$sqldata['text'] = $text;
|
||||
}
|
||||
|
||||
if (count($terms) > 0)
|
||||
$where = " WHERE " . join_terms(" AND ", $terms, False);
|
||||
else
|
||||
$where = "";
|
||||
|
||||
//Prevent SQL injection by checking that $query_start is a number
|
||||
if (!is_int($query_start))
|
||||
$query_start = 0;
|
||||
|
||||
$query = $db->prepare("SELECT * FROM search_popularplaces" . $where .
|
||||
" LIMIT $query_start,101");
|
||||
$result = $query->execute($sqldata);
|
||||
|
||||
$data = array();
|
||||
while ($row = $query->fetch(PDO::FETCH_ASSOC))
|
||||
{
|
||||
$data[] = array(
|
||||
"parcel_id" => $row["infoUUID"],
|
||||
"name" => $row["name"],
|
||||
"dwell" => $row["dwell"]);
|
||||
}
|
||||
|
||||
$response_xml = xmlrpc_encode(array(
|
||||
'success' => True,
|
||||
'errorMessage' => "",
|
||||
'data' => $data));
|
||||
|
||||
print $response_xml;
|
||||
}
|
||||
|
||||
#
|
||||
# Land Query
|
||||
#
|
||||
|
||||
xmlrpc_server_register_method($xmlrpc_server, "dir_land_query",
|
||||
"dir_land_query");
|
||||
|
||||
function dir_land_query($method_name, $params, $app_data)
|
||||
{
|
||||
global $db;
|
||||
|
||||
$req = $params[0];
|
||||
|
||||
$flags = $req['flags'];
|
||||
$type = $req['type'];
|
||||
$price = $req['price'];
|
||||
$area = $req['area'];
|
||||
$query_start = $req['query_start'];
|
||||
|
||||
$terms = array();
|
||||
$sqldata = array();
|
||||
|
||||
if ($type != 4294967295) //Include all types of land?
|
||||
{
|
||||
//Do this check first so we can bail out quickly on Auction search
|
||||
if (($type & 26) == 2) // Auction (from SearchTypeFlags enum)
|
||||
{
|
||||
$response_xml = xmlrpc_encode(array(
|
||||
'success' => False,
|
||||
'errorMessage' => "No auctions listed"));
|
||||
|
||||
print $response_xml;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (($type & 24) == 8) //Mainland (24=0x18 [bits 3 & 4])
|
||||
$terms[] = "parentestate = 1";
|
||||
if (($type & 24) == 16) //Estate (24=0x18 [bits 3 & 4])
|
||||
$terms[] = "parentestate <> 1";
|
||||
}
|
||||
|
||||
$s = process_region_type_flags($flags);
|
||||
if ($s != "")
|
||||
$terms[] = $s;
|
||||
|
||||
if ($flags & 0x100000) //LimitByPrice (1 << 20)
|
||||
{
|
||||
$terms[] = "saleprice <= :price";
|
||||
|
||||
$sqldata['price'] = $price;
|
||||
}
|
||||
if ($flags & 0x200000) //LimitByArea (1 << 21)
|
||||
{
|
||||
$terms[] = "area >= :area";
|
||||
|
||||
$sqldata['area'] = $area;
|
||||
}
|
||||
|
||||
//The PerMeterSort flag is always passed from a map item query.
|
||||
//It doesn't hurt to have this as the default search order.
|
||||
$order = "lsq"; //PerMeterSort (1 << 17)
|
||||
|
||||
if ($flags & 0x80000) //NameSort (1 << 19)
|
||||
$order = "parcelname";
|
||||
if ($flags & 0x10000) //PriceSort (1 << 16)
|
||||
$order = "saleprice";
|
||||
if ($flags & 0x40000) //AreaSort (1 << 18)
|
||||
$order = "area";
|
||||
if (!($flags & 0x8000)) //SortAsc (1 << 15)
|
||||
$order .= " DESC";
|
||||
|
||||
if (count($terms) > 0)
|
||||
$where = " WHERE " . join_terms(" AND ", $terms, False);
|
||||
else
|
||||
$where = "";
|
||||
|
||||
//Prevent SQL injection by checking that $query_start is a number
|
||||
if (!is_int($query_start))
|
||||
$query_start = 0;
|
||||
|
||||
$sql = "SELECT *,saleprice/area AS lsq FROM search_parcelsales" . $where .
|
||||
" ORDER BY " . $order . " LIMIT $query_start,101";
|
||||
$query = $db->prepare($sql);
|
||||
$result = $query->execute($sqldata);
|
||||
|
||||
$data = array();
|
||||
while ($row = $query->fetch(PDO::FETCH_ASSOC))
|
||||
{
|
||||
$data[] = array(
|
||||
"parcel_id" => $row["infoUUID"],
|
||||
"name" => $row["parcelname"],
|
||||
"auction" => "false",
|
||||
"for_sale" => "true",
|
||||
"sale_price" => $row["saleprice"],
|
||||
"landing_point" => $row["landingpoint"],
|
||||
"region_UUID" => $row["regionUUID"],
|
||||
"area" => $row["area"]);
|
||||
}
|
||||
|
||||
$response_xml = xmlrpc_encode(array(
|
||||
'success' => True,
|
||||
'errorMessage' => "",
|
||||
'data' => $data));
|
||||
|
||||
print $response_xml;
|
||||
}
|
||||
|
||||
#
|
||||
# Events Query
|
||||
#
|
||||
|
||||
xmlrpc_server_register_method($xmlrpc_server, "dir_events_query",
|
||||
"dir_events_query");
|
||||
|
||||
function dir_events_query($method_name, $params, $app_data)
|
||||
{
|
||||
global $db;
|
||||
|
||||
$req = $params[0];
|
||||
|
||||
$text = $req['text'];
|
||||
$flags = $req['flags'];
|
||||
$query_start = $req['query_start'];
|
||||
|
||||
if ($text == "%%%")
|
||||
{
|
||||
$response_xml = xmlrpc_encode(array(
|
||||
'success' => False,
|
||||
'errorMessage' => "Invalid search terms"
|
||||
));
|
||||
|
||||
print $response_xml;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$pieces = explode("|", $text);
|
||||
|
||||
$day = $pieces[0];
|
||||
$category = $pieces[1];
|
||||
if (count($pieces) < 3)
|
||||
$search_text = "";
|
||||
else
|
||||
$search_text = $pieces[2];
|
||||
|
||||
$terms = array();
|
||||
$sqldata = array();
|
||||
|
||||
//Event times are in UTC so we need to get the current time in UTC.
|
||||
$now = time();
|
||||
|
||||
if ($day == "u") //Searching for current or ongoing events?
|
||||
{
|
||||
//This condition will include upcoming and in-progress events
|
||||
$terms[] = "dateUTC+duration*60 >= " . $now;
|
||||
}
|
||||
else
|
||||
{
|
||||
//For events in a given day we need to determine the days start time
|
||||
$now -= idate("Z"); //Adjust for timezone
|
||||
$now -= ($now % 86400); //Adjust to start of day
|
||||
|
||||
//Is $day a number of days before or after current date?
|
||||
if ($day != 0)
|
||||
$now += $day * 86400;
|
||||
|
||||
$then = $now + 86400; //Time for end of day
|
||||
|
||||
//This condition will include any in-progress events
|
||||
$terms[] = "(dateUTC+duration*60 >= $now AND dateUTC < $then)";
|
||||
}
|
||||
|
||||
if ($category > 0)
|
||||
{
|
||||
$terms[] = "category = :category";
|
||||
|
||||
$sqldata['category'] = $category;
|
||||
}
|
||||
|
||||
$type = array();
|
||||
if ($flags & 16777216) //IncludePG (1 << 24)
|
||||
$type[] = "eventflags = 0";
|
||||
if ($flags & 33554432) //IncludeMature (1 << 25)
|
||||
$type[] = "eventflags = 1";
|
||||
if ($flags & 67108864) //IncludeAdult (1 << 26)
|
||||
$type[] = "eventflags = 2";
|
||||
|
||||
//Was there at least one PG, Mature, or Adult flag?
|
||||
if (count($type) > 0)
|
||||
$terms[] = join_terms(" OR ", $type, True);
|
||||
|
||||
if ($search_text != "")
|
||||
{
|
||||
$terms[] = "(name LIKE :text1 OR " .
|
||||
"description LIKE :text2)";
|
||||
|
||||
$search_text = "%$search_text%";
|
||||
$sqldata['text1'] = $search_text;
|
||||
$sqldata['text2'] = $search_text;
|
||||
}
|
||||
|
||||
if (count($terms) > 0)
|
||||
$where = " WHERE " . join_terms(" AND ", $terms, False);
|
||||
else
|
||||
$where = "";
|
||||
|
||||
//Prevent SQL injection by checking that $query_start is a number
|
||||
if (!is_int($query_start))
|
||||
$query_start = 0;
|
||||
|
||||
$sql = "SELECT owneruuid,name,eventid,dateUTC,eventflags,globalPos" .
|
||||
" FROM search_events". $where. " LIMIT $query_start,101";
|
||||
$query = $db->prepare($sql);
|
||||
$result = $query->execute($sqldata);
|
||||
|
||||
$data = array();
|
||||
while ($row = $query->fetch(PDO::FETCH_ASSOC))
|
||||
{
|
||||
$date = strftime("%m/%d %I:%M %p", $row["dateUTC"]);
|
||||
|
||||
//The landing point is only needed when this event query is
|
||||
//called to allow placement of event markers on the world map.
|
||||
$data[] = array(
|
||||
"owner_id" => $row["owneruuid"],
|
||||
"name" => $row["name"],
|
||||
"event_id" => $row["eventid"],
|
||||
"date" => $date,
|
||||
"unix_time" => $row["dateUTC"],
|
||||
"event_flags" => $row["eventflags"],
|
||||
"landing_point" => $row["globalPos"]);
|
||||
}
|
||||
|
||||
$response_xml = xmlrpc_encode(array(
|
||||
'success' => True,
|
||||
'errorMessage' => "",
|
||||
'data' => $data));
|
||||
|
||||
print $response_xml;
|
||||
}
|
||||
|
||||
#
|
||||
# Classifieds Query
|
||||
#
|
||||
|
||||
xmlrpc_server_register_method($xmlrpc_server, "dir_classified_query",
|
||||
"dir_classified_query");
|
||||
|
||||
function dir_classified_query ($method_name, $params, $app_data)
|
||||
{
|
||||
global $db;
|
||||
|
||||
$req = $params[0];
|
||||
|
||||
$text = $req['text'];
|
||||
$flags = $req['flags'];
|
||||
$category = $req['category'];
|
||||
$query_start = $req['query_start'];
|
||||
|
||||
if ($text == "%%%")
|
||||
{
|
||||
$response_xml = xmlrpc_encode(array(
|
||||
'success' => False,
|
||||
'errorMessage' => "Invalid search terms"
|
||||
));
|
||||
|
||||
print $response_xml;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$terms = array();
|
||||
$sqldata = array();
|
||||
|
||||
//Renew Weekly flag is bit 5 (32) in $flags.
|
||||
//Bit 0 (PG) and bit 1 (Mature) are deprecated.
|
||||
//Bit 2 is PG, bit 3 is Mature, bit 5 is Adult.
|
||||
$maturity = 0;
|
||||
if ($flags & 5) //Legacy or current PG bit?
|
||||
$maturity |= 5;
|
||||
if ($flags & 10) //Legacy or current Mature bit?
|
||||
$maturity |= 8;
|
||||
if ($flags & 64) //Adult bit (1 << 6)
|
||||
$maturity |= 64;
|
||||
|
||||
if ($maturity)
|
||||
$terms[] = "classifiedflags & $maturity";
|
||||
|
||||
//Only restrict results based on category if it is not 0 (Any Category)
|
||||
if ($category > 0)
|
||||
{
|
||||
$terms[] = "category = :category";
|
||||
|
||||
$sqldata['category'] = $category;
|
||||
}
|
||||
|
||||
if ($text != "")
|
||||
{
|
||||
$terms[] = "(name LIKE :text1" .
|
||||
" OR description LIKE :text2)";
|
||||
|
||||
$text = "%$text%";
|
||||
$sqldata['text1'] = $text;
|
||||
$sqldata['text2'] = $text;
|
||||
}
|
||||
|
||||
//Was there at least condition for the search?
|
||||
if (count($terms) > 0)
|
||||
$where = " WHERE " . join_terms(" AND ", $terms, False);
|
||||
else
|
||||
$where = "";
|
||||
|
||||
//Prevent SQL injection by checking that $query_start is a number
|
||||
if (!is_int($query_start))
|
||||
$query_start = 0;
|
||||
|
||||
$sql = "SELECT * FROM classifieds" . $where .
|
||||
" ORDER BY priceforlisting DESC" .
|
||||
" LIMIT $query_start,101";
|
||||
$query = $db->prepare($sql);
|
||||
|
||||
$result = $query->execute($sqldata);
|
||||
|
||||
$data = array();
|
||||
while ($row = $query->fetch(PDO::FETCH_ASSOC))
|
||||
{
|
||||
/* Test for legacy maturity bits and set current bits */
|
||||
$flags = $row["classifiedflags"];
|
||||
if ($flags & 1)
|
||||
$flags |= 4;
|
||||
if ($flags & 2)
|
||||
$flags |= 8;
|
||||
|
||||
$data[] = array(
|
||||
"classifiedid" => $row["classifieduuid"],
|
||||
"name" => $row["name"],
|
||||
"classifiedflags" => $flags,
|
||||
"creation_date" => $row["creationdate"],
|
||||
"expiration_date" => $row["expirationdate"],
|
||||
"priceforlisting" => $row["priceforlisting"]);
|
||||
}
|
||||
|
||||
$response_xml = xmlrpc_encode(array(
|
||||
'success' => True,
|
||||
'errorMessage' => "",
|
||||
'data' => $data));
|
||||
|
||||
print $response_xml;
|
||||
}
|
||||
|
||||
#
|
||||
# Events Info Query
|
||||
#
|
||||
|
||||
xmlrpc_server_register_method($xmlrpc_server, "event_info_query",
|
||||
"event_info_query");
|
||||
|
||||
function event_info_query($method_name, $params, $app_data)
|
||||
{
|
||||
global $db;
|
||||
|
||||
$req = $params[0];
|
||||
|
||||
$eventID = $req['eventID'];
|
||||
|
||||
$query = $db->prepare("SELECT * FROM search_events WHERE eventID = ?");
|
||||
$result = $query->execute( array($eventID) );
|
||||
|
||||
$data = array();
|
||||
while ($row = $query->fetch(PDO::FETCH_ASSOC))
|
||||
{
|
||||
$date = strftime("%G-%m-%d %H:%M:%S", $row["dateUTC"]);
|
||||
|
||||
$category = "*Unspecified*";
|
||||
if ($row['category'] == 18) $category = "Discussion";
|
||||
if ($row['category'] == 19) $category = "Sports";
|
||||
if ($row['category'] == 20) $category = "Live Music";
|
||||
if ($row['category'] == 22) $category = "Commercial";
|
||||
if ($row['category'] == 23) $category = "Nightlife/Entertainment";
|
||||
if ($row['category'] == 24) $category = "Games/Contests";
|
||||
if ($row['category'] == 25) $category = "Pageants";
|
||||
if ($row['category'] == 26) $category = "Education";
|
||||
if ($row['category'] == 27) $category = "Arts and Culture";
|
||||
if ($row['category'] == 28) $category = "Charity/Support Groups";
|
||||
if ($row['category'] == 29) $category = "Miscellaneous";
|
||||
if ($row['category'] == 30) $category = "Live DJ";
|
||||
|
||||
$data[] = array(
|
||||
"event_id" => $row["eventid"],
|
||||
"creator" => $row["creatoruuid"],
|
||||
"name" => $row["name"],
|
||||
"category" => $category,
|
||||
"description" => $row["description"],
|
||||
"date" => $date,
|
||||
"dateUTC" => $row["dateUTC"],
|
||||
"duration" => $row["duration"],
|
||||
"covercharge" => $row["covercharge"],
|
||||
"coveramount" => $row["coveramount"],
|
||||
"simname" => $row["simname"],
|
||||
"globalposition" => $row["globalPos"],
|
||||
"eventflags" => $row["eventflags"]);
|
||||
}
|
||||
|
||||
$response_xml = xmlrpc_encode(array(
|
||||
'success' => True,
|
||||
'errorMessage' => "",
|
||||
'data' => $data));
|
||||
|
||||
print $response_xml;
|
||||
}
|
||||
|
||||
#
|
||||
# Classifieds Info Query
|
||||
#
|
||||
|
||||
xmlrpc_server_register_method($xmlrpc_server, "classifieds_info_query",
|
||||
"classifieds_info_query");
|
||||
|
||||
function classifieds_info_query($method_name, $params, $app_data)
|
||||
{
|
||||
global $db;
|
||||
|
||||
$req = $params[0];
|
||||
|
||||
$classifiedID = $req['classifiedID'];
|
||||
|
||||
$query = $db->prepare("SELECT * FROM classifieds WHERE classifieduuid = ?");
|
||||
$result = $query->execute( array($classifiedID) );
|
||||
|
||||
$data = array();
|
||||
while ($row = $query->fetch(PDO::FETCH_ASSOC))
|
||||
{
|
||||
$data[] = array(
|
||||
"classifieduuid" => $row["classifieduuid"],
|
||||
"creatoruuid" => $row["creatoruuid"],
|
||||
"creationdate" => $row["creationdate"],
|
||||
"expirationdate" => $row["expirationdate"],
|
||||
"category" => $row["category"],
|
||||
"name" => $row["name"],
|
||||
"description" => $row["description"],
|
||||
"parceluuid" => $row["parceluuid"],
|
||||
"parentestate" => $row["parentestate"],
|
||||
"snapshotuuid" => $row["snapshotuuid"],
|
||||
"simname" => $row["simname"],
|
||||
"posglobal" => $row["posglobal"],
|
||||
"parcelname" => $row["parcelname"],
|
||||
"classifiedflags" => $row["classifiedflags"],
|
||||
"priceforlisting" => $row["priceforlisting"]);
|
||||
}
|
||||
|
||||
$response_xml = xmlrpc_encode(array(
|
||||
'success' => True,
|
||||
'errorMessage' => "",
|
||||
'data' => $data));
|
||||
|
||||
print $response_xml;
|
||||
}
|
||||
|
||||
#
|
||||
# Process the request
|
||||
#
|
||||
|
||||
$request_xml = file_get_contents("php://input");
|
||||
|
||||
xmlrpc_server_call_method($xmlrpc_server, $request_xml, '');
|
||||
xmlrpc_server_destroy($xmlrpc_server);
|
||||
|
||||
$db = NULL;
|
||||
?>
|
||||
72
helper/search/register.php
Normal file
72
helper/search/register.php
Normal file
@@ -0,0 +1,72 @@
|
||||
<?php
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// register.php //
|
||||
// This file contains the registration of a simulator to the database //
|
||||
// and checks if the simulator is new in the database or a reconnected one //
|
||||
// //
|
||||
// If the simulator is old, check if the nextcheck date > registration //
|
||||
// When the date is older, make a request to the Parser to grab new data //
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
include("databaseinfo.php");
|
||||
|
||||
$hostname = "";
|
||||
$port = "";
|
||||
$service = "";
|
||||
|
||||
if (isset($_GET['host'])) $hostname = $_GET['host'];
|
||||
if (isset($_GET['port'])) $port = $_GET['port'];
|
||||
if (isset($_GET['service'])) $service = $_GET['service'];
|
||||
|
||||
if ($hostname == "" || $port == "")
|
||||
{
|
||||
echo "Missing host name and/or port address\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
// Attempt to connect to the database
|
||||
try {
|
||||
$db = new PDO("mysql:host=$DB_HOST;dbname=$DB_NAME", $DB_USER, $DB_PASSWORD);
|
||||
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||
}
|
||||
catch(PDOException $e)
|
||||
{
|
||||
echo "Error connecting to database\n";
|
||||
file_put_contents('PDOErrors.txt', $e->getMessage() . "\n-----\n", FILE_APPEND);
|
||||
exit;
|
||||
}
|
||||
|
||||
if ($service == "online")
|
||||
{
|
||||
// Check if there is already a database row for this host
|
||||
$query = $db->prepare("SELECT register FROM search_hostsregister WHERE host = ? AND port = ?");
|
||||
$query->execute( array($hostname, $port) );
|
||||
|
||||
// Get the request time as a timestamp for later
|
||||
$timestamp = $_SERVER['REQUEST_TIME'];
|
||||
|
||||
// If a database row was returned check the nextcheck date
|
||||
if ($query->rowCount() > 0)
|
||||
{
|
||||
$query = $db->prepare("UPDATE search_hostsregister SET " .
|
||||
"register = ?, " .
|
||||
"nextcheck = 0, checked = 0, failcounter = 0 " .
|
||||
"WHERE host = ? AND port = ?");
|
||||
$query->execute( array($timestamp, $hostname, $port) );
|
||||
}
|
||||
else
|
||||
{
|
||||
// The SELECT did not return a result. Insert a new record.
|
||||
$query = $db->prepare("INSERT INTO search_hostsregister VALUES (?, ?, ?, 0, 0, 0)");
|
||||
$query->execute( array($hostname, $port, $timestamp) );
|
||||
}
|
||||
}
|
||||
|
||||
if ($service == "offline")
|
||||
{
|
||||
$query = $db->prepare("DELETE FROM search_hostsregister WHERE host = ? AND port = ?");
|
||||
$query->execute( array($hostname, $port) );
|
||||
}
|
||||
|
||||
$db = NULL;
|
||||
?>
|
||||
47
mkdist.bat
Normal file
47
mkdist.bat
Normal file
@@ -0,0 +1,47 @@
|
||||
@echo off
|
||||
SET VERSION_FILE=bin\.version
|
||||
|
||||
FOR /F "usebackq tokens=*" %%F IN (`"git rev-parse --short=8 HEAD"`) DO (
|
||||
SET GIT_REV=%%F
|
||||
)
|
||||
FOR /F "usebackq tokens=*" %%F IN (`"git rev-parse --symbolic-full-name --abbrev-ref HEAD"`) DO (
|
||||
SET GIT_BRANCH=%%F
|
||||
)
|
||||
FOR /F "usebackq tokens=*" %%F IN (`"git log -1 --format=%%cs"`) DO (
|
||||
SET LAST_COMMIT_DATE=%%F
|
||||
)
|
||||
|
||||
REM Extended version info:
|
||||
echo %GIT_BRANCH%@%GIT_REV% (%LAST_COMMIT_DATE%) > %VERSION_FILE%
|
||||
REM or just ommit extended version info:
|
||||
rem if exist %VERSION_FILE% del %VERSION_FILE%
|
||||
|
||||
SET TARGET_ZIP=opensim-%GIT_BRANCH%-%LAST_COMMIT_DATE%_%GIT_REV%.zip
|
||||
echo %TARGET_ZIP%
|
||||
set excludes=-x "*Tests*" "bin/Gloebit.*" "bin/OpenSimMutelist.Modules.*" "bin/MoneyServer.*" "OpenSim.Data.MySQL.MySQLMoneyDataWrapper.*" "OpenSim.Modules.Currency.dll.*" "OpenSim.ini.sample" "server_cert.p12" "SineWaveCert.pfx"
|
||||
zip -r -o "%TARGET_ZIP%" bin CONTRIBUTORS.txt LICENSE.txt README.md ThirdPartyLicenses helper/index.html helper/robots.txt helper/search extra/OpenSimSearch %excludes%
|
||||
|
||||
if not exist bin\OpenSimMutelist.Modules.dll goto skipmutelist
|
||||
SET TARGET_ZIP=opensimmutelist-%GIT_BRANCH%-%LAST_COMMIT_DATE%_%GIT_REV%.zip
|
||||
set excludes=-x "*Tests*"
|
||||
echo %TARGET_ZIP%
|
||||
zip -r -o "%TARGET_ZIP%" bin/OpenSimMutelist.Modules.* helper/mute extra/OpenSimMutelist %excludes%
|
||||
:skipmutelist
|
||||
|
||||
if not exist bin\Gloebit.dll goto skipgloebit
|
||||
SET TARGET_ZIP=gloebit-%GIT_BRANCH%-%LAST_COMMIT_DATE%_%GIT_REV%.zip
|
||||
set excludes=-x "*Tests*"
|
||||
echo %TARGET_ZIP%
|
||||
copy addon-modules\Gloebit\GloebitMoneyModule\Gloebit.ini.example bin\Gloebit.ini.example
|
||||
zip -r -o "%TARGET_ZIP%" bin/Gloebit.* %excludes%
|
||||
:skipgloebit
|
||||
|
||||
if not exist bin\MoneyServer.dll goto skipopensimcurrency
|
||||
SET TARGET_ZIP=opensimcurrency-%GIT_BRANCH%-%LAST_COMMIT_DATE%_%GIT_REV%.zip
|
||||
set excludes=-x "*Tests*"
|
||||
echo %TARGET_ZIP%
|
||||
zip -r -o "%TARGET_ZIP%" bin/MoneyServer.* bin/OpenSim.Data.MySQL.MySQLMoneyDataWrapper.* bin/OpenSim.Modules.Currency.* bin/OpenSim.ini.sample bin/server_cert.p12 bin/SineWaveCert.pfx %excludes%
|
||||
:skipopensimcurrency
|
||||
|
||||
|
||||
:end
|
||||
41
mkdist.sh
Executable file
41
mkdist.sh
Executable file
@@ -0,0 +1,41 @@
|
||||
#!/bin/sh
|
||||
GIT_REV=`git rev-parse --short=8 HEAD`
|
||||
GIT_BRANCH=`git rev-parse --symbolic-full-name --abbrev-ref HEAD`
|
||||
CUR_DATE=`date --rfc-3339='date'`
|
||||
LAST_COMMIT_DATE=`git log -1 --format=%cs`
|
||||
|
||||
# Extended version info:
|
||||
echo "${GIT_BRANCH}@${GIT_REV} (${LAST_COMMIT_DATE})" > bin/.version
|
||||
# or just ommit extended version info:
|
||||
#rm -f bin/.version
|
||||
|
||||
EXCLUDES="*Tests* *Gloebit* *OpenSimMutelist* *MoneyServer* *OpenSim.Data.MySQL.MySQLMoneyDataWrapper* *OpenSim.Modules.Currency* *OpenSim.ini.sample* *server_cert.p12* *SineWaveCert.pfx*"
|
||||
TARGETZIP=opensim-${GIT_BRANCH}-${LAST_COMMIT_DATE}_${GIT_REV}.zip
|
||||
echo "${TARGETZIP}"
|
||||
zip -r -o ${TARGETZIP} bin CONTRIBUTORS.txt LICENSE.txt README.md ThirdPartyLicenses helper/index.html helper/robots.txt helper/search extra/OpenSimSearch -x ${EXCLUDES}
|
||||
|
||||
#Make seperate zip for OpenSimMutelist addon:
|
||||
if [ -f bin/OpenSimMutelist.Modules.dll ]; then
|
||||
TARGETZIP=opensimmutelist-${GIT_BRANCH}-${LAST_COMMIT_DATE}_${GIT_REV}.zip
|
||||
EXCLUDES="*Tests*"
|
||||
echo "${TARGETZIP}"
|
||||
zip -r -o ${TARGETZIP} bin/OpenSimMutelist.Modules.* helper/mute extra/OpenSimMutelist -x ${EXCLUDES}
|
||||
fi
|
||||
|
||||
#Make seperate zip for Gloebit addon:
|
||||
if [ -f bin/Gloebit.dll ]; then
|
||||
TARGETZIP=gloebit-${GIT_BRANCH}-${LAST_COMMIT_DATE}_${GIT_REV}.zip
|
||||
EXCLUDES="*Tests*"
|
||||
echo "${TARGETZIP}"
|
||||
cp addon-modules/Gloebit/GloebitMoneyModule/Gloebit.ini.example bin/Gloebit.ini.example
|
||||
zip -r -o ${TARGETZIP} bin/Gloebit.* -x ${EXCLUDES}
|
||||
fi
|
||||
|
||||
#Make seperate zip for opensim.currency:
|
||||
if [ -f bin/MoneyServer.dll ]; then
|
||||
TARGETZIP=opensimcurrency-${GIT_BRANCH}-${LAST_COMMIT_DATE}_${GIT_REV}.zip
|
||||
EXCLUDES="*Tests*"
|
||||
echo "${TARGETZIP}"
|
||||
zip -r -o ${TARGETZIP} bin\MoneyServer.* bin\OpenSim.Data.MySQL.MySQLMoneyDataWrapper.* bin\OpenSim.Modules.Currency.* bin\OpenSim.ini.sample bin\server_cert.p12 bin\SineWaveCert.pfx -x ${EXCLUDES}
|
||||
fi
|
||||
|
||||
@@ -6,9 +6,9 @@ dotnet bin\prebuild.dll /target vs2022 /targetframework net8_0 /excludedir = "ob
|
||||
|
||||
@echo Creating compile.bat
|
||||
rem To compile in release mode
|
||||
@echo dotnet build --configuration Release OpenSim.sln > compile.bat
|
||||
@echo @dotnet build --configuration Release OpenSim.sln > compile.bat
|
||||
rem To compile in debug mode comment line (add rem to start) above and uncomment next (remove rem)
|
||||
rem @echo dotnet build --configuration Debug OpenSim.sln > compile.bat
|
||||
rem @echo @dotnet build --configuration Debug OpenSim.sln > compile.bat
|
||||
:done
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user