aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications/UserManagerBase.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/Communications/UserManagerBase.cs')
-rw-r--r--OpenSim/Framework/Communications/UserManagerBase.cs26
1 files changed, 26 insertions, 0 deletions
diff --git a/OpenSim/Framework/Communications/UserManagerBase.cs b/OpenSim/Framework/Communications/UserManagerBase.cs
index 7e1047f..4967cd9 100644
--- a/OpenSim/Framework/Communications/UserManagerBase.cs
+++ b/OpenSim/Framework/Communications/UserManagerBase.cs
@@ -34,6 +34,7 @@ using libsecondlife;
34using libsecondlife.StructuredData; 34using libsecondlife.StructuredData;
35using Nwc.XmlRpc; 35using Nwc.XmlRpc;
36using OpenSim.Framework.Console; 36using OpenSim.Framework.Console;
37using OpenSim.Framework.Statistics;
37 38
38namespace OpenSim.Framework.UserManagement 39namespace OpenSim.Framework.UserManagement
39{ 40{
@@ -44,8 +45,19 @@ namespace OpenSim.Framework.UserManagement
44 { 45 {
45 public UserConfig _config; 46 public UserConfig _config;
46 private Dictionary<string, IUserData> _plugins = new Dictionary<string, IUserData>(); 47 private Dictionary<string, IUserData> _plugins = new Dictionary<string, IUserData>();
48 protected UserStatsReporter _stats;
47 49
48 /// <summary> 50 /// <summary>
51 /// Constructor.
52 /// </summary>
53 /// <param name="statsCollector">Can be null if stats collection is not required.
54 /// </param>
55 public UserManagerBase(UserStatsReporter statsCollector)
56 {
57 _stats = statsCollector;
58 }
59
60 /// <summary>
49 /// Adds a new user server plugin - user servers will be requested in the order they were loaded. 61 /// Adds a new user server plugin - user servers will be requested in the order they were loaded.
50 /// </summary> 62 /// </summary>
51 /// <param name="FileName">The filename to the user server plugin DLL</param> 63 /// <param name="FileName">The filename to the user server plugin DLL</param>
@@ -411,8 +423,21 @@ namespace OpenSim.Framework.UserManagement
411 423
412 profile.currentAgent = agent; 424 profile.currentAgent = agent;
413 } 425 }
426
427 /// <summary>
428 /// Process a user logoff from OpenSim.
429 /// </summary>
430 /// <param name="userid"></param>
431 /// <param name="regionid"></param>
432 /// <param name="regionhandle"></param>
433 /// <param name="posx"></param>
434 /// <param name="posy"></param>
435 /// <param name="posz"></param>
414 public void LogOffUser(LLUUID userid, LLUUID regionid, ulong regionhandle, float posx, float posy, float posz) 436 public void LogOffUser(LLUUID userid, LLUUID regionid, ulong regionhandle, float posx, float posy, float posz)
415 { 437 {
438 if (_stats != null)
439 _stats.AddLogout();
440
416 UserProfileData userProfile; 441 UserProfileData userProfile;
417 UserAgentData userAgent; 442 UserAgentData userAgent;
418 LLVector3 currentPos = new LLVector3(posx, posy, posz); 443 LLVector3 currentPos = new LLVector3(posx, posy, posz);
@@ -450,6 +475,7 @@ namespace OpenSim.Framework.UserManagement
450 MainLog.Instance.Warn("LOGOUT", "Unknown User logged out"); 475 MainLog.Instance.Warn("LOGOUT", "Unknown User logged out");
451 } 476 }
452 } 477 }
478
453 public void CreateAgent(UserProfileData profile, LLSD request) 479 public void CreateAgent(UserProfileData profile, LLSD request)
454 { 480 {
455 UserAgentData agent = new UserAgentData(); 481 UserAgentData agent = new UserAgentData();