aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/Communications/IUserService.cs7
-rw-r--r--OpenSim/Framework/Communications/LoginService.cs15
-rw-r--r--OpenSim/Framework/Communications/UserManagerBase.cs15
-rw-r--r--OpenSim/Framework/IRegionCommsListener.cs3
-rw-r--r--OpenSim/Framework/IUserData.cs7
-rw-r--r--OpenSim/Framework/RegionCommsListener.cs13
-rw-r--r--OpenSim/Framework/Servers/BaseOpenSimServer.cs1
7 files changed, 54 insertions, 7 deletions
diff --git a/OpenSim/Framework/Communications/IUserService.cs b/OpenSim/Framework/Communications/IUserService.cs
index 67a8c78..59ad188 100644
--- a/OpenSim/Framework/Communications/IUserService.cs
+++ b/OpenSim/Framework/Communications/IUserService.cs
@@ -113,6 +113,13 @@ namespace OpenSim.Framework.Communications
113 /// Get's the User Appearance 113 /// Get's the User Appearance
114 AvatarAppearance GetUserAppearance(LLUUID user); 114 AvatarAppearance GetUserAppearance(LLUUID user);
115 115
116 /// <summary>
117 /// Updates the current region the User is in
118 /// </summary>
119 /// <param name="avatarid">User Region the Avatar is IN</param>
120 /// <param name="retionuuid">User Region the Avatar is IN</param>
121 void UpdateUserCurrentRegion(LLUUID avatarid, LLUUID regionuuid, ulong regionhandle);
122
116 void UpdateUserAppearance(LLUUID user, AvatarAppearance appearance); 123 void UpdateUserAppearance(LLUUID user, AvatarAppearance appearance);
117 124
118 void AddAttachment(LLUUID user, LLUUID attach); 125 void AddAttachment(LLUUID user, LLUUID attach);
diff --git a/OpenSim/Framework/Communications/LoginService.cs b/OpenSim/Framework/Communications/LoginService.cs
index bd0fa53..08b071f 100644
--- a/OpenSim/Framework/Communications/LoginService.cs
+++ b/OpenSim/Framework/Communications/LoginService.cs
@@ -79,7 +79,15 @@ namespace OpenSim.Framework.Communications
79 /// <param name="response">The existing response</param> 79 /// <param name="response">The existing response</param>
80 /// <param name="theUser">The user profile</param> 80 /// <param name="theUser">The user profile</param>
81 public abstract void CustomiseResponse(LoginResponse response, UserProfileData theUser, string startLocationRequest); 81 public abstract void CustomiseResponse(LoginResponse response, UserProfileData theUser, string startLocationRequest);
82
83 /// <summary>
84 /// If the user is already logged in, try to notify the region that the user they've got is dead.
85 /// </summary>
86 /// <param name="theUser"></param>
87 public virtual void LogOffUser(UserProfileData theUser, string message)
88 {
82 89
90 }
83 /// <summary> 91 /// <summary>
84 /// Get the initial login inventory skeleton (in other words, the folder structure) for the given user. 92 /// Get the initial login inventory skeleton (in other words, the folder structure) for the given user.
85 /// </summary> 93 /// </summary>
@@ -196,9 +204,14 @@ namespace OpenSim.Framework.Communications
196 // because of some problem, for instance, the crashment of server or client, 204 // because of some problem, for instance, the crashment of server or client,
197 // the user cannot log in any longer. 205 // the user cannot log in any longer.
198 userProfile.CurrentAgent.AgentOnline = false; 206 userProfile.CurrentAgent.AgentOnline = false;
199 m_userManager.CommitAgent(ref userProfile);
200 207
208 m_userManager.CommitAgent(ref userProfile);
209
210 // try to tell the region that their user is dead.
211 LogOffUser(userProfile, "You were logged off because you logged in from another location");
212
201 // Reject the login 213 // Reject the login
214
202 215
203 m_log.InfoFormat( 216 m_log.InfoFormat(
204 "[LOGIN END]: Notifying user {0} {1} that they are already logged in", 217 "[LOGIN END]: Notifying user {0} {1} that they are already logged in",
diff --git a/OpenSim/Framework/Communications/UserManagerBase.cs b/OpenSim/Framework/Communications/UserManagerBase.cs
index 87e06f1..8985bb6 100644
--- a/OpenSim/Framework/Communications/UserManagerBase.cs
+++ b/OpenSim/Framework/Communications/UserManagerBase.cs
@@ -187,6 +187,21 @@ namespace OpenSim.Framework.Communications
187 return null; 187 return null;
188 } 188 }
189 189
190 public void UpdateUserCurrentRegion(LLUUID avatarid, LLUUID regionuuid, ulong regionhandle)
191 {
192 foreach (KeyValuePair<string, IUserData> plugin in _plugins)
193 {
194 try
195 {
196 plugin.Value.UpdateUserCurrentRegion(avatarid, regionuuid, regionhandle);
197 }
198 catch (Exception e)
199 {
200 m_log.Info("[USERSTORAGE]: Unable to updateuser location via " + plugin.Key + "(" + e.ToString() + ")");
201 }
202 }
203 }
204
190 /// <summary> 205 /// <summary>
191 /// Loads a user's friend list 206 /// Loads a user's friend list
192 /// </summary> 207 /// </summary>
diff --git a/OpenSim/Framework/IRegionCommsListener.cs b/OpenSim/Framework/IRegionCommsListener.cs
index 1476855..ce84a40 100644
--- a/OpenSim/Framework/IRegionCommsListener.cs
+++ b/OpenSim/Framework/IRegionCommsListener.cs
@@ -50,6 +50,8 @@ namespace OpenSim.Framework
50 50
51 public delegate bool ChildAgentUpdate(ulong regionHandle, ChildAgentDataUpdate cAgentData); 51 public delegate bool ChildAgentUpdate(ulong regionHandle, ChildAgentDataUpdate cAgentData);
52 52
53 public delegate void LogOffUser(ulong regionHandle, LLUUID agentID, LLUUID regionSecret, string message);
54
53 public interface IRegionCommsListener 55 public interface IRegionCommsListener
54 { 56 {
55 event ExpectUserDelegate OnExpectUser; 57 event ExpectUserDelegate OnExpectUser;
@@ -63,5 +65,6 @@ namespace OpenSim.Framework
63 event CloseAgentConnection OnCloseAgentConnection; 65 event CloseAgentConnection OnCloseAgentConnection;
64 event RegionUp OnRegionUp; 66 event RegionUp OnRegionUp;
65 event ChildAgentUpdate OnChildAgentUpdate; 67 event ChildAgentUpdate OnChildAgentUpdate;
68 event LogOffUser OnLogOffUser;
66 } 69 }
67} \ No newline at end of file 70} \ No newline at end of file
diff --git a/OpenSim/Framework/IUserData.cs b/OpenSim/Framework/IUserData.cs
index 0b25f7e..5952713 100644
--- a/OpenSim/Framework/IUserData.cs
+++ b/OpenSim/Framework/IUserData.cs
@@ -98,13 +98,8 @@ namespace OpenSim.Framework
98 /// <param name="user">UserProfile to update</param> 98 /// <param name="user">UserProfile to update</param>
99 bool UpdateUserProfile(UserProfileData user); 99 bool UpdateUserProfile(UserProfileData user);
100 100
101 /// <summary>
102 /// Updates the current region the User is in
103 /// </summary>
104 /// <param name="avatarid">User Region the Avatar is IN</param>
105 /// <param name="retionuuid">User Region the Avatar is IN</param>
106 void UpdateUserCurrentRegion(LLUUID avatarid, LLUUID regionuuid);
107 101
102 void UpdateUserCurrentRegion(LLUUID avatarid, LLUUID regionuuid, ulong regionhandle);
108 /// <summary> 103 /// <summary>
109 /// Adds a new agent to the database 104 /// Adds a new agent to the database
110 /// </summary> 105 /// </summary>
diff --git a/OpenSim/Framework/RegionCommsListener.cs b/OpenSim/Framework/RegionCommsListener.cs
index c4c5813..4045b44 100644
--- a/OpenSim/Framework/RegionCommsListener.cs
+++ b/OpenSim/Framework/RegionCommsListener.cs
@@ -45,6 +45,7 @@ namespace OpenSim.Framework
45 private UpdateNeighbours handlerNeighboursUpdate = null; // OnNeighboursUpdate; 45 private UpdateNeighbours handlerNeighboursUpdate = null; // OnNeighboursUpdate;
46 private PrimCrossing handlerPrimCrossingIntoRegion = null; // OnPrimCrossingIntoRegion; 46 private PrimCrossing handlerPrimCrossingIntoRegion = null; // OnPrimCrossingIntoRegion;
47 private RegionUp handlerRegionUp = null; // OnRegionUp; 47 private RegionUp handlerRegionUp = null; // OnRegionUp;
48 private LogOffUser handlerLogOffUser = null;
48 49
49 #region IRegionCommsListener Members 50 #region IRegionCommsListener Members
50 51
@@ -59,6 +60,7 @@ namespace OpenSim.Framework
59 public event CloseAgentConnection OnCloseAgentConnection; 60 public event CloseAgentConnection OnCloseAgentConnection;
60 public event RegionUp OnRegionUp; 61 public event RegionUp OnRegionUp;
61 public event ChildAgentUpdate OnChildAgentUpdate; 62 public event ChildAgentUpdate OnChildAgentUpdate;
63 public event LogOffUser OnLogOffUser;
62 64
63 #endregion 65 #endregion
64 66
@@ -79,6 +81,17 @@ namespace OpenSim.Framework
79 return false; 81 return false;
80 } 82 }
81 83
84 // From User Server
85 public virtual void TriggerLogOffUser(ulong regionHandle, LLUUID agentID, LLUUID RegionSecret, string message)
86 {
87 handlerLogOffUser = OnLogOffUser;
88 if (handlerLogOffUser != null)
89 {
90 handlerLogOffUser(regionHandle, agentID, RegionSecret, message);
91 }
92
93 }
94
82 95
83 public virtual bool TriggerExpectPrim(ulong regionHandle, LLUUID primID, string objData, int XMLMethod) 96 public virtual bool TriggerExpectPrim(ulong regionHandle, LLUUID primID, string objData, int XMLMethod)
84 { 97 {
diff --git a/OpenSim/Framework/Servers/BaseOpenSimServer.cs b/OpenSim/Framework/Servers/BaseOpenSimServer.cs
index fcbc5a1..60c6883 100644
--- a/OpenSim/Framework/Servers/BaseOpenSimServer.cs
+++ b/OpenSim/Framework/Servers/BaseOpenSimServer.cs
@@ -84,6 +84,7 @@ namespace OpenSim.Framework.Servers
84 84
85 Notice("show uptime - show server startup and uptime."); 85 Notice("show uptime - show server startup and uptime.");
86 Notice("shutdown - shutdown the server.\n"); 86 Notice("shutdown - shutdown the server.\n");
87
87 break; 88 break;
88 89
89 case "show": 90 case "show":