1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
-
- using System;
- using System.Collections.Generic;
- using OpenSim.Framework;
- using OpenSim.Region.Framework.Interfaces;
- namespace OpenSim.Groups
- {
- public class ForeignImporter
- {
- IUserManagement m_UserManagement;
- public ForeignImporter(IUserManagement uman)
- {
- m_UserManagement = uman;
- }
- public GroupMembersData ConvertGroupMembersData(ExtendedGroupMembersData _m)
- {
- GroupMembersData m = new GroupMembersData();
- m.AcceptNotices = _m.AcceptNotices;
- m.AgentPowers = _m.AgentPowers;
- m.Contribution = _m.Contribution;
- m.IsOwner = _m.IsOwner;
- m.ListInProfile = _m.ListInProfile;
- m.OnlineStatus = _m.OnlineStatus;
- m.Title = _m.Title;
- string url = string.Empty, first = string.Empty, last = string.Empty, tmp = string.Empty;
- Util.ParseUniversalUserIdentifier(_m.AgentID, out m.AgentID, out url, out first, out last, out tmp);
- if (url != string.Empty)
- m_UserManagement.AddUser(m.AgentID, first, last, url);
- return m;
- }
- public GroupRoleMembersData ConvertGroupRoleMembersData(ExtendedGroupRoleMembersData _rm)
- {
- GroupRoleMembersData rm = new GroupRoleMembersData();
- rm.RoleID = _rm.RoleID;
- string url = string.Empty, first = string.Empty, last = string.Empty, tmp = string.Empty;
- Util.ParseUniversalUserIdentifier(_rm.MemberID, out rm.MemberID, out url, out first, out last, out tmp);
- if (url != string.Empty)
- m_UserManagement.AddUser(rm.MemberID, first, last, url);
- return rm;
- }
- }
- }
|