diff options
author | lbsa71 | 2007-10-30 09:05:31 +0000 |
---|---|---|
committer | lbsa71 | 2007-10-30 09:05:31 +0000 |
commit | 67e12b95ea7b68f4904a7484d77ecfd787d16d0c (patch) | |
tree | 20b00d24c8a7617017960432ec044852e3ad5fa9 /OpenSim/Grid/UserServer/Main.cs | |
parent | * Deleted .user file (diff) | |
download | opensim-SC-67e12b95ea7b68f4904a7484d77ecfd787d16d0c.zip opensim-SC-67e12b95ea7b68f4904a7484d77ecfd787d16d0c.tar.gz opensim-SC-67e12b95ea7b68f4904a7484d77ecfd787d16d0c.tar.bz2 opensim-SC-67e12b95ea7b68f4904a7484d77ecfd787d16d0c.tar.xz |
* Optimized usings
* Shortened type references
* Removed redundant 'this' qualifier
Diffstat (limited to 'OpenSim/Grid/UserServer/Main.cs')
-rw-r--r-- | OpenSim/Grid/UserServer/Main.cs | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/OpenSim/Grid/UserServer/Main.cs b/OpenSim/Grid/UserServer/Main.cs index 492f67f..779a72b 100644 --- a/OpenSim/Grid/UserServer/Main.cs +++ b/OpenSim/Grid/UserServer/Main.cs | |||
@@ -27,28 +27,23 @@ | |||
27 | */ | 27 | */ |
28 | 28 | ||
29 | using System; | 29 | using System; |
30 | using System.Collections.Generic; | ||
31 | using System.IO; | 30 | using System.IO; |
32 | using System.Reflection; | 31 | using OpenSim.Framework; |
33 | using libsecondlife; | ||
34 | using OpenSim.Framework.Console; | 32 | using OpenSim.Framework.Console; |
35 | using OpenSim.Framework.Interfaces; | ||
36 | using OpenSim.Framework.Servers; | 33 | using OpenSim.Framework.Servers; |
37 | using OpenSim.Framework; | ||
38 | using OpenSim.Framework; | ||
39 | 34 | ||
40 | namespace OpenSim.Grid.UserServer | 35 | namespace OpenSim.Grid.UserServer |
41 | { | 36 | { |
42 | /// <summary> | 37 | /// <summary> |
43 | /// </summary> | 38 | /// </summary> |
44 | public class OpenUser_Main : conscmd_callback | 39 | public class OpenUser_Main : conscmd_callback |
45 | { | 40 | { |
46 | private UserConfig Cfg; | 41 | private UserConfig Cfg; |
47 | 42 | ||
48 | public UserManager m_userManager; | 43 | public UserManager m_userManager; |
49 | public UserLoginService m_loginService; | 44 | public UserLoginService m_loginService; |
50 | 45 | ||
51 | LogBase m_console; | 46 | private LogBase m_console; |
52 | 47 | ||
53 | [STAThread] | 48 | [STAThread] |
54 | public static void Main(string[] args) | 49 | public static void Main(string[] args) |
@@ -67,7 +62,8 @@ namespace OpenSim.Grid.UserServer | |||
67 | { | 62 | { |
68 | Directory.CreateDirectory(Util.logDir()); | 63 | Directory.CreateDirectory(Util.logDir()); |
69 | } | 64 | } |
70 | m_console = new LogBase((Path.Combine(Util.logDir(), "opengrid-userserver-console.log")), "OpenUser", this, true); | 65 | m_console = |
66 | new LogBase((Path.Combine(Util.logDir(), "opengrid-userserver-console.log")), "OpenUser", this, true); | ||
71 | MainLog.Instance = m_console; | 67 | MainLog.Instance = m_console; |
72 | } | 68 | } |
73 | 69 | ||
@@ -83,7 +79,7 @@ namespace OpenSim.Grid.UserServer | |||
83 | 79 | ||
84 | public void Startup() | 80 | public void Startup() |
85 | { | 81 | { |
86 | this.Cfg = new UserConfig("USER SERVER", (Path.Combine(Util.configDir(), "UserServer_Config.xml"))); | 82 | Cfg = new UserConfig("USER SERVER", (Path.Combine(Util.configDir(), "UserServer_Config.xml"))); |
87 | 83 | ||
88 | MainLog.Instance.Verbose("Main.cs:Startup() - Establishing data connection"); | 84 | MainLog.Instance.Verbose("Main.cs:Startup() - Establishing data connection"); |
89 | m_userManager = new UserManager(); | 85 | m_userManager = new UserManager(); |
@@ -93,15 +89,16 @@ namespace OpenSim.Grid.UserServer | |||
93 | m_loginService = new UserLoginService(m_userManager, Cfg, Cfg.DefaultStartupMsg); | 89 | m_loginService = new UserLoginService(m_userManager, Cfg, Cfg.DefaultStartupMsg); |
94 | 90 | ||
95 | MainLog.Instance.Verbose("Main.cs:Startup() - Starting HTTP process"); | 91 | MainLog.Instance.Verbose("Main.cs:Startup() - Starting HTTP process"); |
96 | BaseHttpServer httpServer = new BaseHttpServer((int)Cfg.HttpPort); | 92 | BaseHttpServer httpServer = new BaseHttpServer((int) Cfg.HttpPort); |
97 | 93 | ||
98 | httpServer.AddXmlRPCHandler("login_to_simulator", m_loginService.XmlRpcLoginMethod); | 94 | httpServer.AddXmlRPCHandler("login_to_simulator", m_loginService.XmlRpcLoginMethod); |
99 | 95 | ||
100 | httpServer.AddXmlRPCHandler("get_user_by_name", m_userManager.XmlRPCGetUserMethodName); | 96 | httpServer.AddXmlRPCHandler("get_user_by_name", m_userManager.XmlRPCGetUserMethodName); |
101 | httpServer.AddXmlRPCHandler("get_user_by_uuid", m_userManager.XmlRPCGetUserMethodUUID); | 97 | httpServer.AddXmlRPCHandler("get_user_by_uuid", m_userManager.XmlRPCGetUserMethodUUID); |
102 | 98 | ||
103 | httpServer.AddStreamHandler( new RestStreamHandler("DELETE", "/usersessions/", m_userManager.RestDeleteUserSessionMethod )); | 99 | httpServer.AddStreamHandler( |
104 | 100 | new RestStreamHandler("DELETE", "/usersessions/", m_userManager.RestDeleteUserSessionMethod)); | |
101 | |||
105 | httpServer.Start(); | 102 | httpServer.Start(); |
106 | m_console.Status("SERVER", "Userserver 0.4 - Startup complete"); | 103 | m_console.Status("SERVER", "Userserver 0.4 - Startup complete"); |
107 | } | 104 | } |
@@ -126,7 +123,7 @@ namespace OpenSim.Grid.UserServer | |||
126 | 123 | ||
127 | tempMD5Passwd = Util.Md5Hash(Util.Md5Hash(tempMD5Passwd) + ":" + ""); | 124 | tempMD5Passwd = Util.Md5Hash(Util.Md5Hash(tempMD5Passwd) + ":" + ""); |
128 | 125 | ||
129 | m_userManager.AddUserProfile(tempfirstname, templastname, tempMD5Passwd, regX, regY); | 126 | m_userManager.AddUserProfile(tempfirstname, templastname, tempMD5Passwd, regX, regY); |
130 | break; | 127 | break; |
131 | } | 128 | } |
132 | } | 129 | } |
@@ -178,4 +175,4 @@ namespace OpenSim.Grid.UserServer | |||
178 | { | 175 | { |
179 | } | 176 | } |
180 | } | 177 | } |
181 | } | 178 | } \ No newline at end of file |