aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/Communications/LoginService.cs6
-rw-r--r--OpenSim/Framework/Communications/UserManagerBase.cs53
-rw-r--r--OpenSim/Framework/IUserData.cs5
3 files changed, 14 insertions, 50 deletions
diff --git a/OpenSim/Framework/Communications/LoginService.cs b/OpenSim/Framework/Communications/LoginService.cs
index 40064d3..73fba1e 100644
--- a/OpenSim/Framework/Communications/LoginService.cs
+++ b/OpenSim/Framework/Communications/LoginService.cs
@@ -220,6 +220,9 @@ namespace OpenSim.Framework.Communications
220 } 220 }
221 // Otherwise... 221 // Otherwise...
222 // Create a new agent session 222 // Create a new agent session
223
224 m_userManager.ResetAttachments(userProfile.ID);
225
223 CreateAgent(userProfile, request); 226 CreateAgent(userProfile, request);
224 227
225 try 228 try
@@ -390,6 +393,9 @@ namespace OpenSim.Framework.Communications
390 393
391 // Otherwise... 394 // Otherwise...
392 // Create a new agent session 395 // Create a new agent session
396
397 m_userManager.ResetAttachments(userProfile.ID);
398
393 CreateAgent(userProfile, request); 399 CreateAgent(userProfile, request);
394 400
395 try 401 try
diff --git a/OpenSim/Framework/Communications/UserManagerBase.cs b/OpenSim/Framework/Communications/UserManagerBase.cs
index feeb666..ef900ea 100644
--- a/OpenSim/Framework/Communications/UserManagerBase.cs
+++ b/OpenSim/Framework/Communications/UserManagerBase.cs
@@ -83,6 +83,13 @@ namespace OpenSim.Framework.Communications
83 83
84 return null; 84 return null;
85 } 85 }
86 public void ResetAttachments(LLUUID userID)
87 {
88 foreach (IUserDataPlugin plugin in _plugins)
89 {
90 plugin.ResetAttachments(userID);
91 }
92 }
86 public UserAgentData GetAgentByUUID(LLUUID userId) 93 public UserAgentData GetAgentByUUID(LLUUID userId)
87 { 94 {
88 foreach (IUserDataPlugin plugin in _plugins) 95 foreach (IUserDataPlugin plugin in _plugins)
@@ -639,51 +646,5 @@ namespace OpenSim.Framework.Communications
639 } 646 }
640 } 647 }
641 } 648 }
642
643 public void AddAttachment(LLUUID user, LLUUID item)
644 {
645 foreach (IUserDataPlugin plugin in _plugins)
646 {
647 try
648 {
649 plugin.AddAttachment(user, item);
650 }
651 catch (Exception e)
652 {
653 m_log.InfoFormat("[USERSTORAGE]: Unable to attach {3} => {0} via {1} ({2})", user.ToString(), plugin.Name, e.ToString(), item.ToString());
654 }
655 }
656 }
657
658 public void RemoveAttachment(LLUUID user, LLUUID item)
659 {
660 foreach (IUserDataPlugin plugin in _plugins)
661 {
662 try
663 {
664 plugin.RemoveAttachment(user, item);
665 }
666 catch (Exception e)
667 {
668 m_log.InfoFormat("[USERSTORAGE]: Unable to remove attachment {3} => {0} via {1} ({2})", user.ToString(), plugin.Name, e.ToString(), item.ToString());
669 }
670 }
671 }
672
673 public List<LLUUID> GetAttachments(LLUUID user)
674 {
675 foreach (IUserDataPlugin plugin in _plugins)
676 {
677 try
678 {
679 return plugin.GetAttachments(user);
680 }
681 catch (Exception e)
682 {
683 m_log.InfoFormat("[USERSTORAGE]: Unable to get attachments for {0} via {1} ({2})", user.ToString(), plugin.Name, e.ToString());
684 }
685 }
686 return new List<LLUUID>();
687 }
688 } 649 }
689} 650}
diff --git a/OpenSim/Framework/IUserData.cs b/OpenSim/Framework/IUserData.cs
index f74c0db..ffde002 100644
--- a/OpenSim/Framework/IUserData.cs
+++ b/OpenSim/Framework/IUserData.cs
@@ -165,10 +165,7 @@ namespace OpenSim.Framework
165 165
166 void UpdateUserAppearance(LLUUID user, AvatarAppearance appearance); 166 void UpdateUserAppearance(LLUUID user, AvatarAppearance appearance);
167 167
168 168 void ResetAttachments(LLUUID userID);
169 void AddAttachment(LLUUID user, LLUUID item);
170 void RemoveAttachment(LLUUID user, LLUUID item);
171 List<LLUUID> GetAttachments(LLUUID user);
172 } 169 }
173 170
174 public class UserDataInitialiser : PluginInitialiserBase 171 public class UserDataInitialiser : PluginInitialiserBase