aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules/AvatarProfilesModule.cs
diff options
context:
space:
mode:
authorMW2007-08-28 14:21:17 +0000
committerMW2007-08-28 14:21:17 +0000
commit8e3b2392d129d727bfd00a2d9faa08d9e5be92de (patch)
tree7e6b89ee495af1d5ea76c58fc0796a3bb38ecc5d /OpenSim/Region/Environment/Modules/AvatarProfilesModule.cs
parentEnsure that UserProfileData doesn't pass down null values. (diff)
downloadopensim-SC_OLD-8e3b2392d129d727bfd00a2d9faa08d9e5be92de.zip
opensim-SC_OLD-8e3b2392d129d727bfd00a2d9faa08d9e5be92de.tar.gz
opensim-SC_OLD-8e3b2392d129d727bfd00a2d9faa08d9e5be92de.tar.bz2
opensim-SC_OLD-8e3b2392d129d727bfd00a2d9faa08d9e5be92de.tar.xz
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.cs61
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 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4using libsecondlife;
5using OpenSim.Framework.Interfaces;
6using OpenSim.Region.Environment.Scenes;
7using OpenSim.Region.Environment.Interfaces;
8
9namespace 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}