aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMelanie2010-11-05 13:31:45 +0000
committerMelanie2010-11-05 13:31:45 +0000
commit1c8d19d714cf8595680a88930287e4da222535ee (patch)
tree45c4445ad54f890113aa638d0d756f0f7f519def
parentAdd lsClearWindlightScene() to the lightshare module to remove WL settings (diff)
downloadopensim-SC_OLD-1c8d19d714cf8595680a88930287e4da222535ee.zip
opensim-SC_OLD-1c8d19d714cf8595680a88930287e4da222535ee.tar.gz
opensim-SC_OLD-1c8d19d714cf8595680a88930287e4da222535ee.tar.bz2
opensim-SC_OLD-1c8d19d714cf8595680a88930287e4da222535ee.tar.xz
Delete existing presences for a user ID when they log in again.
WARNING!!! This changes a default. The old default is to allow multiple presences, the new default disables this. As the feature currently has no users, this should not present any difficulty and will alleviate the presence issues somewhat.
-rw-r--r--OpenSim/Services/PresenceService/PresenceService.cs13
-rw-r--r--bin/Robust.ini.example3
2 files changed, 16 insertions, 0 deletions
diff --git a/OpenSim/Services/PresenceService/PresenceService.cs b/OpenSim/Services/PresenceService/PresenceService.cs
index 09c31c3..c8ac38e 100644
--- a/OpenSim/Services/PresenceService/PresenceService.cs
+++ b/OpenSim/Services/PresenceService/PresenceService.cs
@@ -45,10 +45,20 @@ namespace OpenSim.Services.PresenceService
45 LogManager.GetLogger( 45 LogManager.GetLogger(
46 MethodBase.GetCurrentMethod().DeclaringType); 46 MethodBase.GetCurrentMethod().DeclaringType);
47 47
48 protected bool m_allowDuplicatePresences = false;
49
48 public PresenceService(IConfigSource config) 50 public PresenceService(IConfigSource config)
49 : base(config) 51 : base(config)
50 { 52 {
51 m_log.Debug("[PRESENCE SERVICE]: Starting presence service"); 53 m_log.Debug("[PRESENCE SERVICE]: Starting presence service");
54
55 IConfig presenceConfig = config.Configs["PresenceService"];
56 if (presenceConfig != null)
57 {
58 m_allowDuplicatePresences =
59 presenceConfig.GetBoolean("AllowDuplicatePresences",
60 m_allowDuplicatePresences);
61 }
52 } 62 }
53 63
54 public bool LoginAgent(string userID, UUID sessionID, 64 public bool LoginAgent(string userID, UUID sessionID,
@@ -57,6 +67,9 @@ namespace OpenSim.Services.PresenceService
57 //PresenceData[] d = m_Database.Get("UserID", userID); 67 //PresenceData[] d = m_Database.Get("UserID", userID);
58 //m_Database.Get("UserID", userID); 68 //m_Database.Get("UserID", userID);
59 69
70 if (!m_allowDuplicatePresences)
71 m_Database.Delete("UserID", userID.ToString());
72
60 PresenceData data = new PresenceData(); 73 PresenceData data = new PresenceData();
61 74
62 data.UserID = userID; 75 data.UserID = userID;
diff --git a/bin/Robust.ini.example b/bin/Robust.ini.example
index 10edccd..bc87ac2 100644
--- a/bin/Robust.ini.example
+++ b/bin/Robust.ini.example
@@ -107,6 +107,9 @@ ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003
107[PresenceService] 107[PresenceService]
108 ; for the server connector 108 ; for the server connector
109 LocalServiceModule = "OpenSim.Services.PresenceService.dll:PresenceService" 109 LocalServiceModule = "OpenSim.Services.PresenceService.dll:PresenceService"
110 ; Set this to true to allow the use of advanced web services and multiple
111 ; bots using one account
112 AllowDuplicatePresences = false;
110 113
111[AvatarService] 114[AvatarService]
112 ; for the server connector 115 ; for the server connector