aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications/UserManagerBase.cs
diff options
context:
space:
mode:
authorMike Mazur2008-07-31 09:24:28 +0000
committerMike Mazur2008-07-31 09:24:28 +0000
commit2270b252656146d9d74b84665a7ace6c3139db30 (patch)
tree7a967ee50349cf4301ed801e0b8c85f5060ffe1d /OpenSim/Framework/Communications/UserManagerBase.cs
parentdropping intermediate GridInfoPlugin.addin.xml, as it's no longer (diff)
downloadopensim-SC_OLD-2270b252656146d9d74b84665a7ace6c3139db30.zip
opensim-SC_OLD-2270b252656146d9d74b84665a7ace6c3139db30.tar.gz
opensim-SC_OLD-2270b252656146d9d74b84665a7ace6c3139db30.tar.bz2
opensim-SC_OLD-2270b252656146d9d74b84665a7ace6c3139db30.tar.xz
Thanks, sempuki, for a patch that moves all Grid Server's plugins to
PluginLoader. Fix issue 1871.
Diffstat (limited to 'OpenSim/Framework/Communications/UserManagerBase.cs')
-rw-r--r--OpenSim/Framework/Communications/UserManagerBase.cs169
1 files changed, 75 insertions, 94 deletions
diff --git a/OpenSim/Framework/Communications/UserManagerBase.cs b/OpenSim/Framework/Communications/UserManagerBase.cs
index 1b73152..f8e77df 100644
--- a/OpenSim/Framework/Communications/UserManagerBase.cs
+++ b/OpenSim/Framework/Communications/UserManagerBase.cs
@@ -47,42 +47,23 @@ namespace OpenSim.Framework.Communications
47 = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 47 = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
48 48
49 public UserConfig _config; 49 public UserConfig _config;
50 private Dictionary<string, IUserData> _plugins = new Dictionary<string, IUserData>(); 50 private List<IUserData> _plugins = new List<IUserData>();
51 51
52 /// <summary> 52 /// <summary>
53 /// Adds a new user server plugin - user servers will be requested in the order they were loaded. 53 /// Adds a new user server plugin - user servers will be requested in the order they were loaded.
54 /// </summary> 54 /// </summary>
55 /// <param name="FileName">The filename to the user server plugin DLL</param> 55 /// <param name="provider">The filename to the user server plugin DLL</param>
56 public void AddPlugin(string FileName, string connect) 56 public void AddPlugin(string provider, string connect)
57 { 57 {
58 if (!String.IsNullOrEmpty(FileName)) 58 PluginLoader<IUserData> loader =
59 { 59 new PluginLoader<IUserData> (new UserDataInitialiser (connect));
60 m_log.Info("[USERSTORAGE]: Attempting to load " + FileName); 60
61 Assembly pluginAssembly = Assembly.LoadFrom(FileName); 61 // loader will try to load all providers (MySQL, MSSQL, etc)
62 62 // unless it is constrainted to the correct "Provider" entry in the addin.xml
63 m_log.Info("[USERSTORAGE]: Found " + pluginAssembly.GetTypes().Length + " interfaces."); 63 loader.Add ("/OpenSim/UserData", new PluginProviderFilter (provider));
64 foreach (Type pluginType in pluginAssembly.GetTypes()) 64 loader.Load();
65 { 65
66 if (!pluginType.IsAbstract) 66 _plugins = loader.Plugins;
67 {
68 Type typeInterface = pluginType.GetInterface("IUserData", true);
69
70 if (typeInterface != null)
71 {
72 IUserData plug =
73 (IUserData) Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
74 AddPlugin(plug, connect);
75 }
76 }
77 }
78 }
79 }
80
81 public void AddPlugin(IUserData plug, string connect)
82 {
83 plug.Initialise(connect);
84 _plugins.Add(plug.Name, plug);
85 m_log.Info("[USERSTORAGE]: Added IUserData Interface");
86 } 67 }
87 68
88 #region Get UserProfile 69 #region Get UserProfile
@@ -90,9 +71,9 @@ namespace OpenSim.Framework.Communications
90 // see IUserService 71 // see IUserService
91 public UserProfileData GetUserProfile(string fname, string lname) 72 public UserProfileData GetUserProfile(string fname, string lname)
92 { 73 {
93 foreach (KeyValuePair<string, IUserData> plugin in _plugins) 74 foreach (IUserData plugin in _plugins)
94 { 75 {
95 UserProfileData profile = plugin.Value.GetUserByName(fname, lname); 76 UserProfileData profile = plugin.GetUserByName(fname, lname);
96 77
97 if (profile != null) 78 if (profile != null)
98 { 79 {
@@ -105,9 +86,9 @@ namespace OpenSim.Framework.Communications
105 } 86 }
106 public UserAgentData GetAgentByUUID(LLUUID userId) 87 public UserAgentData GetAgentByUUID(LLUUID userId)
107 { 88 {
108 foreach (KeyValuePair<string, IUserData> plugin in _plugins) 89 foreach (IUserData plugin in _plugins)
109 { 90 {
110 UserAgentData agent = plugin.Value.GetAgentByUUID(userId); 91 UserAgentData agent = plugin.GetAgentByUUID(userId);
111 92
112 if (agent != null) 93 if (agent != null)
113 { 94 {
@@ -120,9 +101,9 @@ namespace OpenSim.Framework.Communications
120 // see IUserService 101 // see IUserService
121 public UserProfileData GetUserProfile(LLUUID uuid) 102 public UserProfileData GetUserProfile(LLUUID uuid)
122 { 103 {
123 foreach (KeyValuePair<string, IUserData> plugin in _plugins) 104 foreach (IUserData plugin in _plugins)
124 { 105 {
125 UserProfileData profile = plugin.Value.GetUserByUUID(uuid); 106 UserProfileData profile = plugin.GetUserByUUID(uuid);
126 107
127 if (null != profile) 108 if (null != profile)
128 { 109 {
@@ -137,15 +118,15 @@ namespace OpenSim.Framework.Communications
137 public List<AvatarPickerAvatar> GenerateAgentPickerRequestResponse(LLUUID queryID, string query) 118 public List<AvatarPickerAvatar> GenerateAgentPickerRequestResponse(LLUUID queryID, string query)
138 { 119 {
139 List<AvatarPickerAvatar> pickerlist = new List<AvatarPickerAvatar>(); 120 List<AvatarPickerAvatar> pickerlist = new List<AvatarPickerAvatar>();
140 foreach (KeyValuePair<string, IUserData> plugin in _plugins) 121 foreach (IUserData plugin in _plugins)
141 { 122 {
142 try 123 try
143 { 124 {
144 pickerlist = plugin.Value.GeneratePickerResults(queryID, query); 125 pickerlist = plugin.GeneratePickerResults(queryID, query);
145 } 126 }
146 catch (Exception) 127 catch (Exception)
147 { 128 {
148 m_log.Info("[USERSTORAGE]: Unable to generate AgentPickerData via " + plugin.Key + "(" + query + ")"); 129 m_log.Info("[USERSTORAGE]: Unable to generate AgentPickerData via " + plugin.Name + "(" + query + ")");
149 return new List<AvatarPickerAvatar>(); 130 return new List<AvatarPickerAvatar>();
150 } 131 }
151 } 132 }
@@ -159,17 +140,17 @@ namespace OpenSim.Framework.Communications
159 /// <returns></returns> 140 /// <returns></returns>
160 public bool UpdateUserProfile(UserProfileData data) 141 public bool UpdateUserProfile(UserProfileData data)
161 { 142 {
162 foreach (KeyValuePair<string, IUserData> plugin in _plugins) 143 foreach (IUserData plugin in _plugins)
163 { 144 {
164 try 145 try
165 { 146 {
166 plugin.Value.UpdateUserProfile(data); 147 plugin.UpdateUserProfile(data);
167 return true; 148 return true;
168 } 149 }
169 catch (Exception e) 150 catch (Exception e)
170 { 151 {
171 m_log.InfoFormat("[USERSTORAGE]: Unable to set user {0} {1} via {2}: {3}", data.FirstName, data.SurName, 152 m_log.InfoFormat("[USERSTORAGE]: Unable to set user {0} {1} via {2}: {3}", data.FirstName, data.SurName,
172 plugin.Key, e.ToString()); 153 plugin.Name, e.ToString());
173 } 154 }
174 } 155 }
175 return false; 156 return false;
@@ -186,15 +167,15 @@ namespace OpenSim.Framework.Communications
186 /// <returns>Agent profiles</returns> 167 /// <returns>Agent profiles</returns>
187 public UserAgentData GetUserAgent(LLUUID uuid) 168 public UserAgentData GetUserAgent(LLUUID uuid)
188 { 169 {
189 foreach (KeyValuePair<string, IUserData> plugin in _plugins) 170 foreach (IUserData plugin in _plugins)
190 { 171 {
191 try 172 try
192 { 173 {
193 return plugin.Value.GetAgentByUUID(uuid); 174 return plugin.GetAgentByUUID(uuid);
194 } 175 }
195 catch (Exception e) 176 catch (Exception e)
196 { 177 {
197 m_log.Info("[USERSTORAGE]: Unable to find user via " + plugin.Key + "(" + e.ToString() + ")"); 178 m_log.Info("[USERSTORAGE]: Unable to find user via " + plugin.Name + "(" + e.ToString() + ")");
198 } 179 }
199 } 180 }
200 181
@@ -208,15 +189,15 @@ namespace OpenSim.Framework.Communications
208 /// <returns>A user agent</returns> 189 /// <returns>A user agent</returns>
209 public UserAgentData GetUserAgent(string name) 190 public UserAgentData GetUserAgent(string name)
210 { 191 {
211 foreach (KeyValuePair<string, IUserData> plugin in _plugins) 192 foreach (IUserData plugin in _plugins)
212 { 193 {
213 try 194 try
214 { 195 {
215 return plugin.Value.GetAgentByName(name); 196 return plugin.GetAgentByName(name);
216 } 197 }
217 catch (Exception e) 198 catch (Exception e)
218 { 199 {
219 m_log.Info("[USERSTORAGE]: Unable to find user via " + plugin.Key + "(" + e.ToString() + ")"); 200 m_log.Info("[USERSTORAGE]: Unable to find user via " + plugin.Name + "(" + e.ToString() + ")");
220 } 201 }
221 } 202 }
222 203
@@ -231,15 +212,15 @@ namespace OpenSim.Framework.Communications
231 /// <returns>A user agent</returns> 212 /// <returns>A user agent</returns>
232 public UserAgentData GetUserAgent(string fname, string lname) 213 public UserAgentData GetUserAgent(string fname, string lname)
233 { 214 {
234 foreach (KeyValuePair<string, IUserData> plugin in _plugins) 215 foreach (IUserData plugin in _plugins)
235 { 216 {
236 try 217 try
237 { 218 {
238 return plugin.Value.GetAgentByName(fname, lname); 219 return plugin.GetAgentByName(fname, lname);
239 } 220 }
240 catch (Exception e) 221 catch (Exception e)
241 { 222 {
242 m_log.Info("[USERSTORAGE]: Unable to find user via " + plugin.Key + "(" + e.ToString() + ")"); 223 m_log.Info("[USERSTORAGE]: Unable to find user via " + plugin.Name + "(" + e.ToString() + ")");
243 } 224 }
244 } 225 }
245 226
@@ -248,15 +229,15 @@ namespace OpenSim.Framework.Communications
248 229
249 public void UpdateUserCurrentRegion(LLUUID avatarid, LLUUID regionuuid, ulong regionhandle) 230 public void UpdateUserCurrentRegion(LLUUID avatarid, LLUUID regionuuid, ulong regionhandle)
250 { 231 {
251 foreach (KeyValuePair<string, IUserData> plugin in _plugins) 232 foreach (IUserData plugin in _plugins)
252 { 233 {
253 try 234 try
254 { 235 {
255 plugin.Value.UpdateUserCurrentRegion(avatarid, regionuuid, regionhandle); 236 plugin.UpdateUserCurrentRegion(avatarid, regionuuid, regionhandle);
256 } 237 }
257 catch (Exception e) 238 catch (Exception e)
258 { 239 {
259 m_log.Info("[USERSTORAGE]: Unable to updateuser location via " + plugin.Key + "(" + e.ToString() + ")"); 240 m_log.Info("[USERSTORAGE]: Unable to updateuser location via " + plugin.Name + "(" + e.ToString() + ")");
260 } 241 }
261 } 242 }
262 } 243 }
@@ -268,15 +249,15 @@ namespace OpenSim.Framework.Communications
268 /// <returns>A List of FriendListItems that contains info about the user's friends</returns> 249 /// <returns>A List of FriendListItems that contains info about the user's friends</returns>
269 public List<FriendListItem> GetUserFriendList(LLUUID ownerID) 250 public List<FriendListItem> GetUserFriendList(LLUUID ownerID)
270 { 251 {
271 foreach (KeyValuePair<string, IUserData> plugin in _plugins) 252 foreach (IUserData plugin in _plugins)
272 { 253 {
273 try 254 try
274 { 255 {
275 return plugin.Value.GetUserFriendList(ownerID); 256 return plugin.GetUserFriendList(ownerID);
276 } 257 }
277 catch (Exception e) 258 catch (Exception e)
278 { 259 {
279 m_log.Info("[USERSTORAGE]: Unable to GetUserFriendList via " + plugin.Key + "(" + e.ToString() + ")"); 260 m_log.Info("[USERSTORAGE]: Unable to GetUserFriendList via " + plugin.Name + "(" + e.ToString() + ")");
280 } 261 }
281 } 262 }
282 263
@@ -285,60 +266,60 @@ namespace OpenSim.Framework.Communications
285 266
286 public void StoreWebLoginKey(LLUUID agentID, LLUUID webLoginKey) 267 public void StoreWebLoginKey(LLUUID agentID, LLUUID webLoginKey)
287 { 268 {
288 foreach (KeyValuePair<string, IUserData> plugin in _plugins) 269 foreach (IUserData plugin in _plugins)
289 { 270 {
290 try 271 try
291 { 272 {
292 plugin.Value.StoreWebLoginKey(agentID, webLoginKey); 273 plugin.StoreWebLoginKey(agentID, webLoginKey);
293 } 274 }
294 catch (Exception e) 275 catch (Exception e)
295 { 276 {
296 m_log.Info("[USERSTORAGE]: Unable to Store WebLoginKey via " + plugin.Key + "(" + e.ToString() + ")"); 277 m_log.Info("[USERSTORAGE]: Unable to Store WebLoginKey via " + plugin.Name + "(" + e.ToString() + ")");
297 } 278 }
298 } 279 }
299 } 280 }
300 281
301 public void AddNewUserFriend(LLUUID friendlistowner, LLUUID friend, uint perms) 282 public void AddNewUserFriend(LLUUID friendlistowner, LLUUID friend, uint perms)
302 { 283 {
303 foreach (KeyValuePair<string, IUserData> plugin in _plugins) 284 foreach (IUserData plugin in _plugins)
304 { 285 {
305 try 286 try
306 { 287 {
307 plugin.Value.AddNewUserFriend(friendlistowner,friend,perms); 288 plugin.AddNewUserFriend(friendlistowner,friend,perms);
308 } 289 }
309 catch (Exception e) 290 catch (Exception e)
310 { 291 {
311 m_log.Info("[USERSTORAGE]: Unable to AddNewUserFriend via " + plugin.Key + "(" + e.ToString() + ")"); 292 m_log.Info("[USERSTORAGE]: Unable to AddNewUserFriend via " + plugin.Name + "(" + e.ToString() + ")");
312 } 293 }
313 } 294 }
314 } 295 }
315 296
316 public void RemoveUserFriend(LLUUID friendlistowner, LLUUID friend) 297 public void RemoveUserFriend(LLUUID friendlistowner, LLUUID friend)
317 { 298 {
318 foreach (KeyValuePair<string, IUserData> plugin in _plugins) 299 foreach (IUserData plugin in _plugins)
319 { 300 {
320 try 301 try
321 { 302 {
322 plugin.Value.RemoveUserFriend(friendlistowner, friend); 303 plugin.RemoveUserFriend(friendlistowner, friend);
323 } 304 }
324 catch (Exception e) 305 catch (Exception e)
325 { 306 {
326 m_log.Info("[USERSTORAGE]: Unable to RemoveUserFriend via " + plugin.Key + "(" + e.ToString() + ")"); 307 m_log.Info("[USERSTORAGE]: Unable to RemoveUserFriend via " + plugin.Name + "(" + e.ToString() + ")");
327 } 308 }
328 } 309 }
329 } 310 }
330 311
331 public void UpdateUserFriendPerms(LLUUID friendlistowner, LLUUID friend, uint perms) 312 public void UpdateUserFriendPerms(LLUUID friendlistowner, LLUUID friend, uint perms)
332 { 313 {
333 foreach (KeyValuePair<string, IUserData> plugin in _plugins) 314 foreach (IUserData plugin in _plugins)
334 { 315 {
335 try 316 try
336 { 317 {
337 plugin.Value.UpdateUserFriendPerms(friendlistowner, friend, perms); 318 plugin.UpdateUserFriendPerms(friendlistowner, friend, perms);
338 } 319 }
339 catch (Exception e) 320 catch (Exception e)
340 { 321 {
341 m_log.Info("[USERSTORAGE]: Unable to UpdateUserFriendPerms via " + plugin.Key + "(" + e.ToString() + ")"); 322 m_log.Info("[USERSTORAGE]: Unable to UpdateUserFriendPerms via " + plugin.Name + "(" + e.ToString() + ")");
342 } 323 }
343 } 324 }
344 } 325 }
@@ -564,15 +545,15 @@ namespace OpenSim.Framework.Communications
564 user.HomeRegionX = regX; 545 user.HomeRegionX = regX;
565 user.HomeRegionY = regY; 546 user.HomeRegionY = regY;
566 547
567 foreach (KeyValuePair<string, IUserData> plugin in _plugins) 548 foreach (IUserData plugin in _plugins)
568 { 549 {
569 try 550 try
570 { 551 {
571 plugin.Value.AddNewUserProfile(user); 552 plugin.AddNewUserProfile(user);
572 } 553 }
573 catch (Exception e) 554 catch (Exception e)
574 { 555 {
575 m_log.Info("[USERSTORAGE]: Unable to add user via " + plugin.Key + "(" + e.ToString() + ")"); 556 m_log.Info("[USERSTORAGE]: Unable to add user via " + plugin.Name + "(" + e.ToString() + ")");
576 } 557 }
577 } 558 }
578 559
@@ -586,16 +567,16 @@ namespace OpenSim.Framework.Communications
586 m_log.Info("[USERSTORAGE]: Failed to find User by UUID " + UserProfile.ID.ToString()); 567 m_log.Info("[USERSTORAGE]: Failed to find User by UUID " + UserProfile.ID.ToString());
587 return false; 568 return false;
588 } 569 }
589 foreach (KeyValuePair<string, IUserData> plugin in _plugins) 570 foreach (IUserData plugin in _plugins)
590 { 571 {
591 try 572 try
592 { 573 {
593 plugin.Value.UpdateUserProfile(UserProfile); 574 plugin.UpdateUserProfile(UserProfile);
594 } 575 }
595 catch (Exception e) 576 catch (Exception e)
596 { 577 {
597 m_log.Info("[USERSTORAGE]: Unable to update user " + UserProfile.ID.ToString() 578 m_log.Info("[USERSTORAGE]: Unable to update user " + UserProfile.ID.ToString()
598 + " via " + plugin.Key + "(" + e.ToString() + ")"); 579 + " via " + plugin.Name + "(" + e.ToString() + ")");
599 return false; 580 return false;
600 } 581 }
601 } 582 }
@@ -612,16 +593,16 @@ namespace OpenSim.Framework.Communications
612 /// <param name="agentdata">The agent data to be added</param> 593 /// <param name="agentdata">The agent data to be added</param>
613 public bool AddUserAgent(UserAgentData agentdata) 594 public bool AddUserAgent(UserAgentData agentdata)
614 { 595 {
615 foreach (KeyValuePair<string, IUserData> plugin in _plugins) 596 foreach (IUserData plugin in _plugins)
616 { 597 {
617 try 598 try
618 { 599 {
619 plugin.Value.AddNewUserAgent(agentdata); 600 plugin.AddNewUserAgent(agentdata);
620 return true; 601 return true;
621 } 602 }
622 catch (Exception e) 603 catch (Exception e)
623 { 604 {
624 m_log.Info("[USERSTORAGE]: Unable to add agent via " + plugin.Key + "(" + e.ToString() + ")"); 605 m_log.Info("[USERSTORAGE]: Unable to add agent via " + plugin.Name + "(" + e.ToString() + ")");
625 } 606 }
626 } 607 }
627 return false; 608 return false;
@@ -631,15 +612,15 @@ namespace OpenSim.Framework.Communications
631 /// TODO: stubs for now to get us to a compiling state gently 612 /// TODO: stubs for now to get us to a compiling state gently
632 public AvatarAppearance GetUserAppearance(LLUUID user) 613 public AvatarAppearance GetUserAppearance(LLUUID user)
633 { 614 {
634 foreach (KeyValuePair<string, IUserData> plugin in _plugins) 615 foreach (IUserData plugin in _plugins)
635 { 616 {
636 try 617 try
637 { 618 {
638 return plugin.Value.GetUserAppearance(user); 619 return plugin.GetUserAppearance(user);
639 } 620 }
640 catch (Exception e) 621 catch (Exception e)
641 { 622 {
642 m_log.InfoFormat("[USERSTORAGE]: Unable to find user appearance {0} via {1} ({2})", user.ToString(), plugin.Key, e.ToString()); 623 m_log.InfoFormat("[USERSTORAGE]: Unable to find user appearance {0} via {1} ({2})", user.ToString(), plugin.Name, e.ToString());
643 } 624 }
644 } 625 }
645 return null; 626 return null;
@@ -647,60 +628,60 @@ namespace OpenSim.Framework.Communications
647 628
648 public void UpdateUserAppearance(LLUUID user, AvatarAppearance appearance) 629 public void UpdateUserAppearance(LLUUID user, AvatarAppearance appearance)
649 { 630 {
650 foreach (KeyValuePair<string, IUserData> plugin in _plugins) 631 foreach (IUserData plugin in _plugins)
651 { 632 {
652 try 633 try
653 { 634 {
654 plugin.Value.UpdateUserAppearance(user, appearance); 635 plugin.UpdateUserAppearance(user, appearance);
655 } 636 }
656 catch (Exception e) 637 catch (Exception e)
657 { 638 {
658 m_log.InfoFormat("[USERSTORAGE]: Unable to update user appearance {0} via {1} ({2})", user.ToString(), plugin.Key, e.ToString()); 639 m_log.InfoFormat("[USERSTORAGE]: Unable to update user appearance {0} via {1} ({2})", user.ToString(), plugin.Name, e.ToString());
659 } 640 }
660 } 641 }
661 } 642 }
662 643
663 public void AddAttachment(LLUUID user, LLUUID item) 644 public void AddAttachment(LLUUID user, LLUUID item)
664 { 645 {
665 foreach (KeyValuePair<string, IUserData> plugin in _plugins) 646 foreach (IUserData plugin in _plugins)
666 { 647 {
667 try 648 try
668 { 649 {
669 plugin.Value.AddAttachment(user, item); 650 plugin.AddAttachment(user, item);
670 } 651 }
671 catch (Exception e) 652 catch (Exception e)
672 { 653 {
673 m_log.InfoFormat("[USERSTORAGE]: Unable to attach {3} => {0} via {1} ({2})", user.ToString(), plugin.Key, e.ToString(), item.ToString()); 654 m_log.InfoFormat("[USERSTORAGE]: Unable to attach {3} => {0} via {1} ({2})", user.ToString(), plugin.Name, e.ToString(), item.ToString());
674 } 655 }
675 } 656 }
676 } 657 }
677 658
678 public void RemoveAttachment(LLUUID user, LLUUID item) 659 public void RemoveAttachment(LLUUID user, LLUUID item)
679 { 660 {
680 foreach (KeyValuePair<string, IUserData> plugin in _plugins) 661 foreach (IUserData plugin in _plugins)
681 { 662 {
682 try 663 try
683 { 664 {
684 plugin.Value.RemoveAttachment(user, item); 665 plugin.RemoveAttachment(user, item);
685 } 666 }
686 catch (Exception e) 667 catch (Exception e)
687 { 668 {
688 m_log.InfoFormat("[USERSTORAGE]: Unable to remove attachment {3} => {0} via {1} ({2})", user.ToString(), plugin.Key, e.ToString(), item.ToString()); 669 m_log.InfoFormat("[USERSTORAGE]: Unable to remove attachment {3} => {0} via {1} ({2})", user.ToString(), plugin.Name, e.ToString(), item.ToString());
689 } 670 }
690 } 671 }
691 } 672 }
692 673
693 public List<LLUUID> GetAttachments(LLUUID user) 674 public List<LLUUID> GetAttachments(LLUUID user)
694 { 675 {
695 foreach (KeyValuePair<string, IUserData> plugin in _plugins) 676 foreach (IUserData plugin in _plugins)
696 { 677 {
697 try 678 try
698 { 679 {
699 return plugin.Value.GetAttachments(user); 680 return plugin.GetAttachments(user);
700 } 681 }
701 catch (Exception e) 682 catch (Exception e)
702 { 683 {
703 m_log.InfoFormat("[USERSTORAGE]: Unable to get attachments for {0} via {1} ({2})", user.ToString(), plugin.Key, e.ToString()); 684 m_log.InfoFormat("[USERSTORAGE]: Unable to get attachments for {0} via {1} ({2})", user.ToString(), plugin.Name, e.ToString());
704 } 685 }
705 } 686 }
706 return new List<LLUUID>(); 687 return new List<LLUUID>();