aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Communications/Local
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Communications/Local')
-rw-r--r--OpenSim/Region/Communications/Local/CommunicationsLocal.cs4
-rw-r--r--OpenSim/Region/Communications/Local/LocalUserServices.cs25
2 files changed, 19 insertions, 10 deletions
diff --git a/OpenSim/Region/Communications/Local/CommunicationsLocal.cs b/OpenSim/Region/Communications/Local/CommunicationsLocal.cs
index 5b66816..a0bbf6d 100644
--- a/OpenSim/Region/Communications/Local/CommunicationsLocal.cs
+++ b/OpenSim/Region/Communications/Local/CommunicationsLocal.cs
@@ -40,10 +40,10 @@ namespace OpenSim.Region.Communications.Local
40 public LocalBackEndServices SandBoxServices = new LocalBackEndServices(); 40 public LocalBackEndServices SandBoxServices = new LocalBackEndServices();
41 public LocalUserServices UserServices; 41 public LocalUserServices UserServices;
42 42
43 public CommunicationsLocal(NetworkServersInfo serversInfo, BaseHttpServer httpServer, AssetCache assetCache, bool accountsAuthenticate ) 43 public CommunicationsLocal(NetworkServersInfo serversInfo, BaseHttpServer httpServer, AssetCache assetCache, bool accountsAuthenticate, string welcomeMessage )
44 : base(serversInfo, httpServer, assetCache) 44 : base(serversInfo, httpServer, assetCache)
45 { 45 {
46 UserServices = new LocalUserServices(this, serversInfo, accountsAuthenticate); 46 UserServices = new LocalUserServices(this, serversInfo, accountsAuthenticate, welcomeMessage);
47 UserServices.AddPlugin("OpenSim.Framework.Data.DB4o.dll"); 47 UserServices.AddPlugin("OpenSim.Framework.Data.DB4o.dll");
48 UserServer = UserServices; 48 UserServer = UserServices;
49 GridServer = SandBoxServices; 49 GridServer = SandBoxServices;
diff --git a/OpenSim/Region/Communications/Local/LocalUserServices.cs b/OpenSim/Region/Communications/Local/LocalUserServices.cs
index 223c157..63f8c21 100644
--- a/OpenSim/Region/Communications/Local/LocalUserServices.cs
+++ b/OpenSim/Region/Communications/Local/LocalUserServices.cs
@@ -16,14 +16,19 @@ namespace OpenSim.Region.Communications.Local
16 private uint defaultHomeX ; 16 private uint defaultHomeX ;
17 private uint defaultHomeY; 17 private uint defaultHomeY;
18 private bool authUsers = false; 18 private bool authUsers = false;
19 private string welcomeMessage = "Welcome to OpenSim";
19 20
20 public LocalUserServices(CommunicationsLocal parent, NetworkServersInfo serversInfo, bool authenticate) 21 public LocalUserServices(CommunicationsLocal parent, NetworkServersInfo serversInfo, bool authenticate, string welcomeMess)
21 { 22 {
22 m_Parent = parent; 23 m_Parent = parent;
23 this.serversInfo = serversInfo; 24 this.serversInfo = serversInfo;
24 defaultHomeX = this.serversInfo.DefaultHomeLocX; 25 defaultHomeX = this.serversInfo.DefaultHomeLocX;
25 defaultHomeY = this.serversInfo.DefaultHomeLocY; 26 defaultHomeY = this.serversInfo.DefaultHomeLocY;
26 this.authUsers = authenticate; 27 this.authUsers = authenticate;
28 if (welcomeMess != "")
29 {
30 this.welcomeMessage = welcomeMess;
31 }
27 } 32 }
28 33
29 public UserProfileData GetUserProfile(string firstName, string lastName) 34 public UserProfileData GetUserProfile(string firstName, string lastName)
@@ -47,7 +52,7 @@ namespace OpenSim.Region.Communications.Local
47 /// <returns></returns> 52 /// <returns></returns>
48 public override string GetMessage() 53 public override string GetMessage()
49 { 54 {
50 return "Welcome to OpenSim"; 55 return welcomeMessage;
51 } 56 }
52 57
53 public override UserProfileData GetTheUser(string firstname, string lastname) 58 public override UserProfileData GetTheUser(string firstname, string lastname)
@@ -59,13 +64,17 @@ namespace OpenSim.Region.Communications.Local
59 return profile; 64 return profile;
60 } 65 }
61 66
62 //no current user account so make one 67 if (!authUsers)
63 Console.WriteLine("No User account found so creating a new one "); 68 {
64 this.AddUserProfile(firstname, lastname, "test", defaultHomeX, defaultHomeY); 69 //no current user account so make one
65 70 Console.WriteLine("No User account found so creating a new one ");
66 profile = getUserProfile(firstname, lastname); 71 this.AddUserProfile(firstname, lastname, "test", defaultHomeX, defaultHomeY);
72
73 profile = getUserProfile(firstname, lastname);
67 74
68 return profile; 75 return profile;
76 }
77 return null;
69 } 78 }
70 79
71 public override bool AuthenticateUser(UserProfileData profile, string password) 80 public override bool AuthenticateUser(UserProfileData profile, string password)