diff options
author | Adam Frisby | 2008-04-21 07:09:17 +0000 |
---|---|---|
committer | Adam Frisby | 2008-04-21 07:09:17 +0000 |
commit | fef3b3689492dea63693c964bcdbec9f5137eb5e (patch) | |
tree | 7791eef001d85d3e1de863a68f26ff9434d062ca /OpenSim/Grid/UserServer | |
parent | * Terrain Module code has been reformatted to comply with guidelines. (diff) | |
download | opensim-SC_OLD-fef3b3689492dea63693c964bcdbec9f5137eb5e.zip opensim-SC_OLD-fef3b3689492dea63693c964bcdbec9f5137eb5e.tar.gz opensim-SC_OLD-fef3b3689492dea63693c964bcdbec9f5137eb5e.tar.bz2 opensim-SC_OLD-fef3b3689492dea63693c964bcdbec9f5137eb5e.tar.xz |
* Optimised using statements and namespace references across entire project (this took a while to run).
Diffstat (limited to 'OpenSim/Grid/UserServer')
-rw-r--r-- | OpenSim/Grid/UserServer/Main.cs | 10 | ||||
-rw-r--r-- | OpenSim/Grid/UserServer/MessageServersConnector.cs | 15 | ||||
-rw-r--r-- | OpenSim/Grid/UserServer/UserLoginService.cs | 11 | ||||
-rw-r--r-- | OpenSim/Grid/UserServer/UserManager.cs | 17 |
4 files changed, 26 insertions, 27 deletions
diff --git a/OpenSim/Grid/UserServer/Main.cs b/OpenSim/Grid/UserServer/Main.cs index 0f0104e..0534e3b 100644 --- a/OpenSim/Grid/UserServer/Main.cs +++ b/OpenSim/Grid/UserServer/Main.cs | |||
@@ -28,7 +28,11 @@ | |||
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using System.IO; | 30 | using System.IO; |
31 | using System.Net; | ||
32 | using System.Reflection; | ||
31 | using libsecondlife; | 33 | using libsecondlife; |
34 | using log4net; | ||
35 | using log4net.Config; | ||
32 | using OpenSim.Framework; | 36 | using OpenSim.Framework; |
33 | using OpenSim.Framework.Communications.Cache; | 37 | using OpenSim.Framework.Communications.Cache; |
34 | using OpenSim.Framework.Console; | 38 | using OpenSim.Framework.Console; |
@@ -41,7 +45,7 @@ namespace OpenSim.Grid.UserServer | |||
41 | /// </summary> | 45 | /// </summary> |
42 | public class OpenUser_Main : BaseOpenSimServer, conscmd_callback | 46 | public class OpenUser_Main : BaseOpenSimServer, conscmd_callback |
43 | { | 47 | { |
44 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | 48 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
45 | 49 | ||
46 | private UserConfig Cfg; | 50 | private UserConfig Cfg; |
47 | 51 | ||
@@ -54,7 +58,7 @@ namespace OpenSim.Grid.UserServer | |||
54 | [STAThread] | 58 | [STAThread] |
55 | public static void Main(string[] args) | 59 | public static void Main(string[] args) |
56 | { | 60 | { |
57 | log4net.Config.XmlConfigurator.Configure(); | 61 | XmlConfigurator.Configure(); |
58 | 62 | ||
59 | m_log.Info("Launching UserServer..."); | 63 | m_log.Info("Launching UserServer..."); |
60 | 64 | ||
@@ -191,7 +195,7 @@ namespace OpenSim.Grid.UserServer | |||
191 | } | 195 | } |
192 | 196 | ||
193 | } | 197 | } |
194 | catch (System.Net.WebException e) | 198 | catch (WebException e) |
195 | { | 199 | { |
196 | m_log.ErrorFormat( | 200 | m_log.ErrorFormat( |
197 | "[USERS]: Could not contact the inventory service at {0} to create an inventory for {1}", | 201 | "[USERS]: Could not contact the inventory service at {0} to create an inventory for {1}", |
diff --git a/OpenSim/Grid/UserServer/MessageServersConnector.cs b/OpenSim/Grid/UserServer/MessageServersConnector.cs index 6355c4d..22505cb 100644 --- a/OpenSim/Grid/UserServer/MessageServersConnector.cs +++ b/OpenSim/Grid/UserServer/MessageServersConnector.cs | |||
@@ -25,23 +25,20 @@ | |||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | */ | 26 | */ |
27 | 27 | ||
28 | using System; | ||
29 | using System.Collections; | 28 | using System.Collections; |
30 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
31 | using System.Text; | 30 | using System.Net; |
32 | using System.Threading; | 31 | using System.Reflection; |
33 | using libsecondlife; | 32 | using libsecondlife; |
33 | using log4net; | ||
34 | using Nwc.XmlRpc; | 34 | using Nwc.XmlRpc; |
35 | using OpenSim.Framework; | ||
36 | using OpenSim.Framework.Communications.Cache; | ||
37 | using OpenSim.Framework.Console; | ||
38 | using OpenSim.Framework.Servers; | 35 | using OpenSim.Framework.Servers; |
39 | 36 | ||
40 | namespace OpenSim.Grid.UserServer | 37 | namespace OpenSim.Grid.UserServer |
41 | { | 38 | { |
42 | public class MessageServersConnector | 39 | public class MessageServersConnector |
43 | { | 40 | { |
44 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | 41 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
45 | 42 | ||
46 | public Dictionary<string, MessageServerInfo> MessageServers; | 43 | public Dictionary<string, MessageServerInfo> MessageServers; |
47 | 44 | ||
@@ -214,7 +211,7 @@ namespace OpenSim.Grid.UserServer | |||
214 | { | 211 | { |
215 | XmlRpcResponse GridResp = GridReq.Send(serv.URI, 6000); | 212 | XmlRpcResponse GridResp = GridReq.Send(serv.URI, 6000); |
216 | } | 213 | } |
217 | catch (System.Net.WebException) | 214 | catch (WebException) |
218 | { | 215 | { |
219 | m_log.Warn("[MSGCONNECTOR]: Unable to notify Message Server about log out. Other users might still think this user is online"); | 216 | m_log.Warn("[MSGCONNECTOR]: Unable to notify Message Server about log out. Other users might still think this user is online"); |
220 | } | 217 | } |
@@ -249,7 +246,7 @@ namespace OpenSim.Grid.UserServer | |||
249 | XmlRpcResponse GridResp = GridReq.Send(serv.URI, 6000); | 246 | XmlRpcResponse GridResp = GridReq.Send(serv.URI, 6000); |
250 | m_log.Info("[LOGIN]: Notified : " + serv.URI + " about user login"); | 247 | m_log.Info("[LOGIN]: Notified : " + serv.URI + " about user login"); |
251 | } | 248 | } |
252 | catch (System.Net.WebException) | 249 | catch (WebException) |
253 | { | 250 | { |
254 | m_log.Warn("[MSGCONNECTOR]: Unable to notify Message Server about login. Presence might be borked for this user"); | 251 | m_log.Warn("[MSGCONNECTOR]: Unable to notify Message Server about login. Presence might be borked for this user"); |
255 | } | 252 | } |
diff --git a/OpenSim/Grid/UserServer/UserLoginService.cs b/OpenSim/Grid/UserServer/UserLoginService.cs index d7a3b1a..f294dcf 100644 --- a/OpenSim/Grid/UserServer/UserLoginService.cs +++ b/OpenSim/Grid/UserServer/UserLoginService.cs | |||
@@ -28,18 +28,15 @@ | |||
28 | using System; | 28 | using System; |
29 | using System.Collections; | 29 | using System.Collections; |
30 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
31 | using System.Threading; | 31 | using System.Reflection; |
32 | using libsecondlife; | 32 | using libsecondlife; |
33 | using log4net; | ||
33 | using Nwc.XmlRpc; | 34 | using Nwc.XmlRpc; |
34 | 35 | using OpenSim.Data; | |
35 | using OpenSim.Framework; | 36 | using OpenSim.Framework; |
36 | using OpenSim.Framework.Communications.Cache; | 37 | using OpenSim.Framework.Communications.Cache; |
37 | using OpenSim.Framework.Console; | ||
38 | using OpenSim.Data; | ||
39 | using OpenSim.Framework.Servers; | 38 | using OpenSim.Framework.Servers; |
40 | using OpenSim.Framework.Statistics; | ||
41 | using OpenSim.Framework.UserManagement; | 39 | using OpenSim.Framework.UserManagement; |
42 | using InventoryFolder=OpenSim.Framework.InventoryFolder; | ||
43 | 40 | ||
44 | namespace OpenSim.Grid.UserServer | 41 | namespace OpenSim.Grid.UserServer |
45 | { | 42 | { |
@@ -48,7 +45,7 @@ namespace OpenSim.Grid.UserServer | |||
48 | 45 | ||
49 | public class UserLoginService : LoginService | 46 | public class UserLoginService : LoginService |
50 | { | 47 | { |
51 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | 48 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
52 | 49 | ||
53 | public event UserLoggedInAtLocation OnUserLoggedInAtLocation; | 50 | public event UserLoggedInAtLocation OnUserLoggedInAtLocation; |
54 | 51 | ||
diff --git a/OpenSim/Grid/UserServer/UserManager.cs b/OpenSim/Grid/UserServer/UserManager.cs index 2a53d7b..aa2c959 100644 --- a/OpenSim/Grid/UserServer/UserManager.cs +++ b/OpenSim/Grid/UserServer/UserManager.cs | |||
@@ -28,11 +28,12 @@ | |||
28 | using System; | 28 | using System; |
29 | using System.Collections; | 29 | using System.Collections; |
30 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
31 | using System.Reflection; | ||
31 | using System.Text.RegularExpressions; | 32 | using System.Text.RegularExpressions; |
32 | using libsecondlife; | 33 | using libsecondlife; |
34 | using log4net; | ||
33 | using Nwc.XmlRpc; | 35 | using Nwc.XmlRpc; |
34 | using OpenSim.Framework; | 36 | using OpenSim.Framework; |
35 | using OpenSim.Framework.Statistics; | ||
36 | using OpenSim.Framework.UserManagement; | 37 | using OpenSim.Framework.UserManagement; |
37 | 38 | ||
38 | namespace OpenSim.Grid.UserServer | 39 | namespace OpenSim.Grid.UserServer |
@@ -41,7 +42,7 @@ namespace OpenSim.Grid.UserServer | |||
41 | 42 | ||
42 | public class UserManager : UserManagerBase | 43 | public class UserManager : UserManagerBase |
43 | { | 44 | { |
44 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | 45 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
45 | 46 | ||
46 | public event logOffUser OnLogOffUser; | 47 | public event logOffUser OnLogOffUser; |
47 | private logOffUser handlerLogOffUser = null; | 48 | private logOffUser handlerLogOffUser = null; |
@@ -389,7 +390,7 @@ namespace OpenSim.Grid.UserServer | |||
389 | { | 390 | { |
390 | userProfile.HomeLocationX = (float)Convert.ToDecimal((string)requestData["home_pos_x"]); | 391 | userProfile.HomeLocationX = (float)Convert.ToDecimal((string)requestData["home_pos_x"]); |
391 | } | 392 | } |
392 | catch (System.InvalidCastException) | 393 | catch (InvalidCastException) |
393 | { | 394 | { |
394 | m_log.Error("[PROFILE]:Failed to set home postion x"); | 395 | m_log.Error("[PROFILE]:Failed to set home postion x"); |
395 | } | 396 | } |
@@ -401,7 +402,7 @@ namespace OpenSim.Grid.UserServer | |||
401 | { | 402 | { |
402 | userProfile.HomeLocationY = (float)Convert.ToDecimal((string)requestData["home_pos_y"]); | 403 | userProfile.HomeLocationY = (float)Convert.ToDecimal((string)requestData["home_pos_y"]); |
403 | } | 404 | } |
404 | catch (System.InvalidCastException) | 405 | catch (InvalidCastException) |
405 | { | 406 | { |
406 | m_log.Error("[PROFILE]:Failed to set home postion y"); | 407 | m_log.Error("[PROFILE]:Failed to set home postion y"); |
407 | } | 408 | } |
@@ -412,7 +413,7 @@ namespace OpenSim.Grid.UserServer | |||
412 | { | 413 | { |
413 | userProfile.HomeLocationZ = (float)Convert.ToDecimal((string)requestData["home_pos_z"]); | 414 | userProfile.HomeLocationZ = (float)Convert.ToDecimal((string)requestData["home_pos_z"]); |
414 | } | 415 | } |
415 | catch (System.InvalidCastException) | 416 | catch (InvalidCastException) |
416 | { | 417 | { |
417 | m_log.Error("[PROFILE]:Failed to set home postion z"); | 418 | m_log.Error("[PROFILE]:Failed to set home postion z"); |
418 | } | 419 | } |
@@ -423,7 +424,7 @@ namespace OpenSim.Grid.UserServer | |||
423 | { | 424 | { |
424 | userProfile.HomeLookAtX = (float)Convert.ToDecimal((string)requestData["home_look_x"]); | 425 | userProfile.HomeLookAtX = (float)Convert.ToDecimal((string)requestData["home_look_x"]); |
425 | } | 426 | } |
426 | catch (System.InvalidCastException) | 427 | catch (InvalidCastException) |
427 | { | 428 | { |
428 | m_log.Error("[PROFILE]:Failed to set home lookat x"); | 429 | m_log.Error("[PROFILE]:Failed to set home lookat x"); |
429 | } | 430 | } |
@@ -434,7 +435,7 @@ namespace OpenSim.Grid.UserServer | |||
434 | { | 435 | { |
435 | userProfile.HomeLookAtY = (float)Convert.ToDecimal((string)requestData["home_look_y"]); | 436 | userProfile.HomeLookAtY = (float)Convert.ToDecimal((string)requestData["home_look_y"]); |
436 | } | 437 | } |
437 | catch (System.InvalidCastException) | 438 | catch (InvalidCastException) |
438 | { | 439 | { |
439 | m_log.Error("[PROFILE]:Failed to set home lookat y"); | 440 | m_log.Error("[PROFILE]:Failed to set home lookat y"); |
440 | } | 441 | } |
@@ -445,7 +446,7 @@ namespace OpenSim.Grid.UserServer | |||
445 | { | 446 | { |
446 | userProfile.HomeLookAtZ = (float)Convert.ToDecimal((string)requestData["home_look_z"]); | 447 | userProfile.HomeLookAtZ = (float)Convert.ToDecimal((string)requestData["home_look_z"]); |
447 | } | 448 | } |
448 | catch (System.InvalidCastException) | 449 | catch (InvalidCastException) |
449 | { | 450 | { |
450 | m_log.Error("[PROFILE]:Failed to set home lookat z"); | 451 | m_log.Error("[PROFILE]:Failed to set home lookat z"); |
451 | } | 452 | } |