diff options
author | Teravus Ovares | 2008-05-31 12:18:29 +0000 |
---|---|---|
committer | Teravus Ovares | 2008-05-31 12:18:29 +0000 |
commit | febe78d06249cd4d36a86e97610dd45ab518a757 (patch) | |
tree | 7b9733fc14045f09e874440b923cfe443b781b6a /OpenSim/Framework/Communications/LoginService.cs | |
parent | Mantis#1425. Thank you kindly, Melanie for a patch that: (diff) | |
download | opensim-SC-febe78d06249cd4d36a86e97610dd45ab518a757.zip opensim-SC-febe78d06249cd4d36a86e97610dd45ab518a757.tar.gz opensim-SC-febe78d06249cd4d36a86e97610dd45ab518a757.tar.bz2 opensim-SC-febe78d06249cd4d36a86e97610dd45ab518a757.tar.xz |
* Implements UserServer logoff in a few situations
* User tries to log-in but is already logged in. Userserver will send message to simulator user was in to log the user out there.
* From the UserServer, admin types 'logoff-user firstname lastname message'.
* Some regions may not get the message because they're not updated yet.
Diffstat (limited to 'OpenSim/Framework/Communications/LoginService.cs')
-rw-r--r-- | OpenSim/Framework/Communications/LoginService.cs | 15 |
1 files changed, 14 insertions, 1 deletions
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", |