Merge branch 'presence-refactor' of melanie@opensimulator.org:/var/git/opensim into presence-refactor
commit
12432b1751
|
@ -71,10 +71,12 @@ namespace OpenSim.Services.Friends
|
|||
//
|
||||
// We tried, but this doesn't exist. We can't proceed.
|
||||
//
|
||||
if (dllName.Equals(String.Empty))
|
||||
if (String.Empty.Equals(dllName))
|
||||
throw new Exception("No StorageProvider configured");
|
||||
|
||||
string realm = friendsConfig.GetString("Realm", "Friends");
|
||||
string realm = "Friends";
|
||||
if (friendsConfig != null)
|
||||
realm = friendsConfig.GetString("Realm", realm);
|
||||
|
||||
m_Database = LoadPlugin<IFriendsData>(dllName, new Object[] { connString, realm });
|
||||
if (m_Database == null)
|
||||
|
|
|
@ -306,6 +306,7 @@ namespace OpenSim.Services.HypergridService
|
|||
return false;
|
||||
|
||||
string addressee = parts[0];
|
||||
m_log.DebugFormat("[GATEKEEPER SERVICE]: Verifying {0} against {1}", addressee, m_ExternalName);
|
||||
return (addressee == m_ExternalName);
|
||||
}
|
||||
|
||||
|
|
|
@ -35,6 +35,7 @@ using OpenSim.Framework;
|
|||
using OpenSim.Framework.Capabilities;
|
||||
using OpenSim.Services.Interfaces;
|
||||
using GridRegion = OpenSim.Services.Interfaces.GridRegion;
|
||||
using FriendInfo = OpenSim.Services.Interfaces.FriendInfo;
|
||||
|
||||
using log4net;
|
||||
using OpenMetaverse;
|
||||
|
@ -215,7 +216,7 @@ namespace OpenSim.Services.LLLoginService
|
|||
}
|
||||
|
||||
public LLLoginResponse(UserAccount account, AgentCircuitData aCircuit, PresenceInfo pinfo,
|
||||
GridRegion destination, List<InventoryFolderBase> invSkel, ILibraryService libService,
|
||||
GridRegion destination, List<InventoryFolderBase> invSkel, FriendInfo[] friendsList, ILibraryService libService,
|
||||
string where, string startlocation, Vector3 position, Vector3 lookAt, string message,
|
||||
GridRegion home, IPEndPoint clientIP)
|
||||
: this()
|
||||
|
@ -230,8 +231,7 @@ namespace OpenSim.Services.LLLoginService
|
|||
SecureSessionID = aCircuit.SecureSessionID;
|
||||
Message = message;
|
||||
// While we don't have friends...
|
||||
//BuddList = ConvertFriendListItem(m_userManager.GetUserFriendList(agentID));
|
||||
BuddList = new LLLoginResponse.BuddyList();
|
||||
BuddList = ConvertFriendListItem(friendsList);
|
||||
StartLocation = where;
|
||||
|
||||
FillOutHomeData(pinfo, home);
|
||||
|
@ -607,15 +607,15 @@ namespace OpenSim.Services.LLLoginService
|
|||
}
|
||||
|
||||
|
||||
private static LLLoginResponse.BuddyList ConvertFriendListItem(List<FriendListItem> LFL)
|
||||
private static LLLoginResponse.BuddyList ConvertFriendListItem(FriendInfo[] friendsList)
|
||||
{
|
||||
LLLoginResponse.BuddyList buddylistreturn = new LLLoginResponse.BuddyList();
|
||||
foreach (FriendListItem fl in LFL)
|
||||
foreach (FriendInfo finfo in friendsList)
|
||||
{
|
||||
LLLoginResponse.BuddyList.BuddyInfo buddyitem = new LLLoginResponse.BuddyList.BuddyInfo(fl.Friend);
|
||||
buddyitem.BuddyID = fl.Friend;
|
||||
buddyitem.BuddyRightsHave = (int)fl.FriendListOwnerPerms;
|
||||
buddyitem.BuddyRightsGiven = (int)fl.FriendPerms;
|
||||
LLLoginResponse.BuddyList.BuddyInfo buddyitem = new LLLoginResponse.BuddyList.BuddyInfo(finfo.Friend);
|
||||
buddyitem.BuddyID = finfo.Friend;
|
||||
buddyitem.BuddyRightsHave = (int)finfo.TheirFlags;
|
||||
buddyitem.BuddyRightsGiven = (int)finfo.MyFlags;
|
||||
buddylistreturn.AddNewBuddy(buddyitem);
|
||||
}
|
||||
return buddylistreturn;
|
||||
|
@ -945,16 +945,16 @@ namespace OpenSim.Services.LLLoginService
|
|||
{
|
||||
public int BuddyRightsHave = 1;
|
||||
public int BuddyRightsGiven = 1;
|
||||
public UUID BuddyID;
|
||||
public string BuddyID;
|
||||
|
||||
public BuddyInfo(string buddyID)
|
||||
{
|
||||
BuddyID = new UUID(buddyID);
|
||||
BuddyID = buddyID;
|
||||
}
|
||||
|
||||
public BuddyInfo(UUID buddyID)
|
||||
{
|
||||
BuddyID = buddyID;
|
||||
BuddyID = buddyID.ToString();
|
||||
}
|
||||
|
||||
public Hashtable ToHashTable()
|
||||
|
@ -962,7 +962,7 @@ namespace OpenSim.Services.LLLoginService
|
|||
Hashtable hTable = new Hashtable();
|
||||
hTable["buddy_rights_has"] = BuddyRightsHave;
|
||||
hTable["buddy_rights_given"] = BuddyRightsGiven;
|
||||
hTable["buddy_id"] = BuddyID.ToString();
|
||||
hTable["buddy_id"] = BuddyID;
|
||||
return hTable;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,6 +14,7 @@ using OpenSim.Framework.Console;
|
|||
using OpenSim.Server.Base;
|
||||
using OpenSim.Services.Interfaces;
|
||||
using GridRegion = OpenSim.Services.Interfaces.GridRegion;
|
||||
using FriendInfo = OpenSim.Services.Interfaces.FriendInfo;
|
||||
using OpenSim.Services.Connectors.Hypergrid;
|
||||
|
||||
namespace OpenSim.Services.LLLoginService
|
||||
|
@ -31,6 +32,7 @@ namespace OpenSim.Services.LLLoginService
|
|||
private ISimulationService m_LocalSimulationService;
|
||||
private ISimulationService m_RemoteSimulationService;
|
||||
private ILibraryService m_LibraryService;
|
||||
private IFriendsService m_FriendsService;
|
||||
private IAvatarService m_AvatarService;
|
||||
private IUserAgentService m_UserAgentService;
|
||||
|
||||
|
@ -57,6 +59,7 @@ namespace OpenSim.Services.LLLoginService
|
|||
string gridService = m_LoginServerConfig.GetString("GridService", String.Empty);
|
||||
string presenceService = m_LoginServerConfig.GetString("PresenceService", String.Empty);
|
||||
string libService = m_LoginServerConfig.GetString("LibraryService", String.Empty);
|
||||
string friendsService = m_LoginServerConfig.GetString("FriendsService", String.Empty);
|
||||
string avatarService = m_LoginServerConfig.GetString("AvatarService", String.Empty);
|
||||
string simulationService = m_LoginServerConfig.GetString("SimulationService", String.Empty);
|
||||
|
||||
|
@ -79,6 +82,8 @@ namespace OpenSim.Services.LLLoginService
|
|||
m_PresenceService = ServerUtils.LoadPlugin<IPresenceService>(presenceService, args);
|
||||
if (avatarService != string.Empty)
|
||||
m_AvatarService = ServerUtils.LoadPlugin<IAvatarService>(avatarService, args);
|
||||
if (friendsService != string.Empty)
|
||||
m_FriendsService = ServerUtils.LoadPlugin<IFriendsService>(friendsService, args);
|
||||
if (simulationService != string.Empty)
|
||||
m_RemoteSimulationService = ServerUtils.LoadPlugin<ISimulationService>(simulationService, args);
|
||||
if (agentService != string.Empty)
|
||||
|
@ -228,12 +233,18 @@ namespace OpenSim.Services.LLLoginService
|
|||
return LLFailedLoginResponse.AuthorizationProblem;
|
||||
|
||||
}
|
||||
// TODO: Get Friends list...
|
||||
// Get Friends list
|
||||
FriendInfo[] friendsList = new FriendInfo[0];
|
||||
if (m_FriendsService != null)
|
||||
{
|
||||
friendsList = m_FriendsService.GetFriends(account.PrincipalID);
|
||||
m_log.DebugFormat("[LLOGIN SERVICE]: Retrieved {0} friends", friendsList.Length);
|
||||
}
|
||||
|
||||
//
|
||||
// Finally, fill out the response and return it
|
||||
//
|
||||
LLLoginResponse response = new LLLoginResponse(account, aCircuit, presence, destination, inventorySkel, m_LibraryService,
|
||||
LLLoginResponse response = new LLLoginResponse(account, aCircuit, presence, destination, inventorySkel, friendsList, m_LibraryService,
|
||||
where, startLocation, position, lookAt, m_WelcomeMessage, home, clientIP);
|
||||
|
||||
return response;
|
||||
|
@ -587,7 +598,7 @@ namespace OpenSim.Services.LLLoginService
|
|||
|
||||
private bool LaunchAgentIndirectly(GridRegion gatekeeper, GridRegion destination, AgentCircuitData aCircuit, out string reason)
|
||||
{
|
||||
m_log.Debug("XXX Launching agent at {0}" + destination.RegionName);
|
||||
m_log.Debug("[LLOGIN SERVICE] Launching agent at " + destination.RegionName);
|
||||
return m_UserAgentService.LoginAgentToGrid(aCircuit, gatekeeper, destination, out reason);
|
||||
}
|
||||
|
||||
|
|
|
@ -59,6 +59,9 @@
|
|||
GridService = "OpenSim.Services.GridService.dll:GridService"
|
||||
InventoryService = "OpenSim.Services.InventoryService.dll:InventoryService"
|
||||
|
||||
[Friends]
|
||||
Connector = "OpenSim.Services.FriendsService.dll"
|
||||
|
||||
[LoginService]
|
||||
LocalServiceModule = "OpenSim.Services.LLLoginService.dll:LLLoginService"
|
||||
UserAccountService = "OpenSim.Services.UserAccountService.dll:UserAccountService"
|
||||
|
@ -67,6 +70,7 @@
|
|||
PresenceService = "OpenSim.Services.PresenceService.dll:PresenceService"
|
||||
GridService = "OpenSim.Services.GridService.dll:GridService"
|
||||
AvatarService = "OpenSim.Services.AvatarService.dll:AvatarService"
|
||||
FriendsService = "OpenSim.Services.FriendsService.dll:FriendsService"
|
||||
|
||||
WelcomeMessage = "Welcome, Avatar!"
|
||||
|
||||
|
|
|
@ -77,6 +77,8 @@
|
|||
GridService = "OpenSim.Services.GridService.dll:GridService"
|
||||
InventoryService = "OpenSim.Services.InventoryService.dll:InventoryService"
|
||||
|
||||
[Friends]
|
||||
Connector = "OpenSim.Services.FriendsService.dll"
|
||||
|
||||
[LoginService]
|
||||
LocalServiceModule = "OpenSim.Services.LLLoginService.dll:LLLoginService"
|
||||
|
@ -87,6 +89,7 @@
|
|||
PresenceService = "OpenSim.Services.PresenceService.dll:PresenceService"
|
||||
GridService = "OpenSim.Services.GridService.dll:GridService"
|
||||
AvatarService = "OpenSim.Services.AvatarService.dll:AvatarService"
|
||||
FriendsService = "OpenSim.Services.FriendsService.dll:FriendsService"
|
||||
|
||||
[GatekeeperService]
|
||||
LocalServiceModule = "OpenSim.Services.HypergridService.dll:GatekeeperService"
|
||||
|
@ -96,7 +99,8 @@
|
|||
PresenceService = "OpenSim.Services.PresenceService.dll:PresenceService"
|
||||
GridService = "OpenSim.Services.GridService.dll:GridService"
|
||||
AuthenticationService = "OpenSim.Services.Connectors.dll:AuthenticationServicesConnector"
|
||||
; how does the outside world reach me? This acts as public key too.
|
||||
SimulationService ="OpenSim.Services.Connectors.dll:SimulationServiceConnector"
|
||||
WelcomeMessage = "Welcome, Avatar!"
|
||||
|
||||
[UserAgentService]
|
||||
LocalServiceModule = "OpenSim.Services.HypergridService.dll:UserAgentService"
|
||||
|
|
Loading…
Reference in New Issue