diff options
Start of trying to make Region/Scene more modular.
Added preliminary IRegionModule interface.
Also have a work in progress way of Modules registering optional API methods (kind of like Apache optional functions). But there must be a cleaner/nicer way in c# of doing these than the current way.
Added three work in progress modules: ChatModule (simple handles in world chat, but by moving this to a module, we could support other types of chat modules, ie like a irc - opensim bridge module. ) , AvatarProfilesModule and XferModule.
Moved most of the code from Scene.ModifyTerrain() into the BasicTerrain library, as the start of trying to make that more modular.
Stopped Child agents showing up as part of the "show users" command.
Diffstat (limited to 'OpenSim/Region/Environment/Modules/AvatarProfilesModule.cs')
-rw-r--r-- | OpenSim/Region/Environment/Modules/AvatarProfilesModule.cs | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/OpenSim/Region/Environment/Modules/AvatarProfilesModule.cs b/OpenSim/Region/Environment/Modules/AvatarProfilesModule.cs new file mode 100644 index 0000000..1427c58 --- /dev/null +++ b/OpenSim/Region/Environment/Modules/AvatarProfilesModule.cs | |||
@@ -0,0 +1,61 @@ | |||
1 | using System; | ||
2 | using System.Collections.Generic; | ||
3 | using System.Text; | ||
4 | using libsecondlife; | ||
5 | using OpenSim.Framework.Interfaces; | ||
6 | using OpenSim.Region.Environment.Scenes; | ||
7 | using OpenSim.Region.Environment.Interfaces; | ||
8 | |||
9 | namespace OpenSim.Region.Environment.Modules | ||
10 | { | ||
11 | public class AvatarProfilesModule :IRegionModule | ||
12 | { | ||
13 | |||
14 | private Scene m_scene; | ||
15 | |||
16 | public AvatarProfilesModule() | ||
17 | { | ||
18 | |||
19 | } | ||
20 | |||
21 | public void Initialise(Scene scene) | ||
22 | { | ||
23 | m_scene = scene; | ||
24 | m_scene.EventManager.OnNewClient += NewClient; | ||
25 | } | ||
26 | |||
27 | public void PostInitialise() | ||
28 | { | ||
29 | |||
30 | } | ||
31 | |||
32 | public void CloseDown() | ||
33 | { | ||
34 | |||
35 | } | ||
36 | |||
37 | public string GetName() | ||
38 | { | ||
39 | return "AvatarProfilesModule"; | ||
40 | } | ||
41 | |||
42 | public void NewClient(IClientAPI client) | ||
43 | { | ||
44 | client.OnRequestAvatarProperties += RequestAvatarProperty; | ||
45 | } | ||
46 | |||
47 | /// <summary> | ||
48 | /// | ||
49 | /// </summary> | ||
50 | /// <param name="remoteClient"></param> | ||
51 | /// <param name="avatarID"></param> | ||
52 | public void RequestAvatarProperty(IClientAPI remoteClient, LLUUID avatarID) | ||
53 | { | ||
54 | string about = "OpenSim crash test dummy"; | ||
55 | string bornOn = "Before now"; | ||
56 | string flAbout = "First life? What is one of those? OpenSim is my life!"; | ||
57 | LLUUID partner = new LLUUID("11111111-1111-0000-0000-000100bba000"); | ||
58 | remoteClient.SendAvatarProperties(avatarID, about, bornOn, "", flAbout, 0, LLUUID.Zero, LLUUID.Zero, "", partner); | ||
59 | } | ||
60 | } | ||
61 | } | ||