diff options
The Welcome message /message of the day shown in the client during login, can now be set from the .INI file for standalone mode (change the standalone_welcome = "Welcome to OpenSim" line).
Diffstat (limited to 'OpenSim/Region/Communications/Local/LocalUserServices.cs')
-rw-r--r-- | OpenSim/Region/Communications/Local/LocalUserServices.cs | 25 |
1 files changed, 17 insertions, 8 deletions
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) |