Merge branch 'master' of ssh://opensimulator.org/var/git/opensim

prebuild-update
Diva Canto 2010-07-02 06:36:08 -07:00
commit 79c1eb1e39
13 changed files with 58 additions and 75 deletions

View File

@ -95,6 +95,7 @@ what it is today.
* Mic Bowman * Mic Bowman
* Michelle Argus * Michelle Argus
* Michael Cortez (The Flotsam Project, http://osflotsam.org/) * Michael Cortez (The Flotsam Project, http://osflotsam.org/)
* Micheil Merlin
* Mike Osias (IBM) * Mike Osias (IBM)
* Mike Pitman (IBM) * Mike Pitman (IBM)
* mikkopa/_someone - RealXtend * mikkopa/_someone - RealXtend

View File

@ -814,7 +814,7 @@ namespace OpenSim.Framework.Capabilities
if (mm != null) if (mm != null)
{ {
if (!mm.UploadCovered(client)) if (!mm.UploadCovered(client, mm.UploadCharge))
{ {
if (client != null) if (client != null)
client.SendAgentAlertMessage("Unable to upload asset. Insufficient funds.", false); client.SendAgentAlertMessage("Unable to upload asset. Insufficient funds.", false);

View File

@ -35,35 +35,15 @@ namespace OpenSim.Framework
bool ObjectGiveMoney(UUID objectID, UUID fromID, UUID toID, bool ObjectGiveMoney(UUID objectID, UUID fromID, UUID toID,
int amount); int amount);
int GetBalance(IClientAPI client); int GetBalance(UUID agentID);
void ApplyUploadCharge(UUID agentID); bool UploadCovered(IClientAPI client, int amount);
bool UploadCovered(IClientAPI client);
void ApplyGroupCreationCharge(UUID agentID);
bool GroupCreationCovered(IClientAPI client);
bool AmountCovered(IClientAPI client, int amount); bool AmountCovered(IClientAPI client, int amount);
void ApplyCharge(UUID agentID, int amount, string text); void ApplyCharge(UUID agentID, int amount, string text);
void ApplyUploadCharge(UUID agentID, int amount, string text);
EconomyData GetEconomyData(); int UploadCharge { get; }
int GroupCreationCharge { get; }
event ObjectPaid OnObjectPaid; event ObjectPaid OnObjectPaid;
} }
public struct EconomyData
{
public int ObjectCapacity;
public int ObjectCount;
public int PriceEnergyUnit;
public int PriceGroupCreate;
public int PriceObjectClaim;
public float PriceObjectRent;
public float PriceObjectScaleFactor;
public int PriceParcelClaim;
public float PriceParcelClaimFactor;
public int PriceParcelRent;
public int PricePublicObjectDecay;
public int PricePublicObjectDelete;
public int PriceRentLight;
public int PriceUpload;
public int TeleportMinPrice;
}
} }

View File

@ -243,7 +243,7 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
if (mm != null) if (mm != null)
{ {
if (!mm.UploadCovered(remoteClient)) if (!mm.UploadCovered(remoteClient, mm.UploadCharge))
{ {
remoteClient.SendAgentAlertMessage("Unable to upload asset. Insufficient funds.", false); remoteClient.SendAgentAlertMessage("Unable to upload asset. Insufficient funds.", false);
return; return;

View File

@ -73,7 +73,7 @@ namespace OpenSim.Region.Framework.Scenes
IMoneyModule money=RequestModuleInterface<IMoneyModule>(); IMoneyModule money=RequestModuleInterface<IMoneyModule>();
if (money != null) if (money != null)
{ {
money.ApplyUploadCharge(agentID); money.ApplyUploadCharge(agentID, money.UploadCharge, "Asset upload");
} }
AddInventoryItem(agentID, item); AddInventoryItem(agentID, item);

View File

@ -722,11 +722,11 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
if (money != null) if (money != null)
{ {
// do the transaction, that is if the agent has got sufficient funds // do the transaction, that is if the agent has got sufficient funds
if (!money.GroupCreationCovered(remoteClient)) { if (!money.AmountCovered(remoteClient, money.GroupCreationCharge)) {
remoteClient.SendCreateGroupReply(UUID.Zero, false, "You have got issuficient funds to create a group."); remoteClient.SendCreateGroupReply(UUID.Zero, false, "You have got issuficient funds to create a group.");
return UUID.Zero; return UUID.Zero;
} }
money.ApplyGroupCreationCharge(GetRequestingAgentID(remoteClient)); money.ApplyCharge(GetRequestingAgentID(remoteClient), money.GroupCreationCharge, "Group Creation");
} }
UUID groupID = m_groupData.CreateGroup(GetRequestingAgentID(remoteClient), name, charter, showInList, insigniaID, membershipFee, openEnrollment, allowPublish, maturePublish, GetRequestingAgentID(remoteClient)); UUID groupID = m_groupData.CreateGroup(GetRequestingAgentID(remoteClient), name, charter, showInList, insigniaID, membershipFee, openEnrollment, allowPublish, maturePublish, GetRequestingAgentID(remoteClient));

View File

@ -108,6 +108,16 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
public event ObjectPaid OnObjectPaid; public event ObjectPaid OnObjectPaid;
public int UploadCharge
{
get { return 0; }
}
public int GroupCreationCharge
{
get { return 0; }
}
/// <summary> /// <summary>
/// Startup /// Startup
/// </summary> /// </summary>
@ -188,17 +198,12 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
// Please do not refactor these to be just one method // Please do not refactor these to be just one method
// Existing implementations need the distinction // Existing implementations need the distinction
// //
public void ApplyUploadCharge(UUID agentID)
{
}
public void ApplyGroupCreationCharge(UUID agentID)
{
}
public void ApplyCharge(UUID agentID, int amount, string text) public void ApplyCharge(UUID agentID, int amount, string text)
{ {
} }
public void ApplyUploadCharge(UUID agentID, int amount, string text)
{
}
public bool ObjectGiveMoney(UUID objectID, UUID fromID, UUID toID, int amount) public bool ObjectGiveMoney(UUID objectID, UUID fromID, UUID toID, int amount)
{ {
@ -268,27 +273,6 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
} }
public EconomyData GetEconomyData()
{
EconomyData edata = new EconomyData();
edata.ObjectCapacity = ObjectCapacity;
edata.ObjectCount = ObjectCount;
edata.PriceEnergyUnit = PriceEnergyUnit;
edata.PriceGroupCreate = PriceGroupCreate;
edata.PriceObjectClaim = PriceObjectClaim;
edata.PriceObjectRent = PriceObjectRent;
edata.PriceObjectScaleFactor = PriceObjectScaleFactor;
edata.PriceParcelClaim = PriceParcelClaim;
edata.PriceParcelClaimFactor = PriceParcelClaimFactor;
edata.PriceParcelRent = PriceParcelRent;
edata.PricePublicObjectDecay = PricePublicObjectDecay;
edata.PricePublicObjectDelete = PricePublicObjectDelete;
edata.PriceRentLight = PriceRentLight;
edata.PriceUpload = PriceUpload;
edata.TeleportMinPrice = TeleportMinPrice;
return edata;
}
private void GetClientFunds(IClientAPI client) private void GetClientFunds(IClientAPI client)
{ {
CheckExistAndRefreshFunds(client.AgentId); CheckExistAndRefreshFunds(client.AgentId);
@ -790,7 +774,7 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
//m_log.Info("[FRIEND]: " + avatar.Name + " status:" + (!avatar.IsChildAgent).ToString()); //m_log.Info("[FRIEND]: " + avatar.Name + " status:" + (!avatar.IsChildAgent).ToString());
} }
public int GetBalance(IClientAPI client) public int GetBalance(UUID agentID)
{ {
return 0; return 0;
} }
@ -798,16 +782,10 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
// Please do not refactor these to be just one method // Please do not refactor these to be just one method
// Existing implementations need the distinction // Existing implementations need the distinction
// //
public bool UploadCovered(IClientAPI client) public bool UploadCovered(IClientAPI client, int amount)
{ {
return AmountCovered(client, PriceUpload); return true;
} }
public bool GroupCreationCovered(IClientAPI client)
{
return AmountCovered(client, PriceGroupCreate);
}
public bool AmountCovered(IClientAPI client, int amount) public bool AmountCovered(IClientAPI client, int amount)
{ {
return true; return true;

View File

@ -4950,7 +4950,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
case ',': case ',':
if (parens == 0) if (parens == 0)
{ {
result.Add(src.Substring(start,length).Trim()); result.Add(new LSL_String(src.Substring(start,length).Trim()));
start += length+1; start += length+1;
length = 0; length = 0;
} }

View File

@ -663,13 +663,13 @@ namespace OpenSim.Region.ScriptEngine.Shared
Object[] ret; Object[] ret;
if (start < 0) if (start < 0)
start=m_data.Length-start; start=m_data.Length+start;
if (start < 0) if (start < 0)
start=0; start=0;
if (end < 0) if (end < 0)
end=m_data.Length-end; end=m_data.Length+end;
if (end < 0) if (end < 0)
end=0; end=0;

View File

@ -770,8 +770,10 @@ namespace OpenSim.Region.ScriptEngine.XEngine
item.Name, startParam, postOnRez, item.Name, startParam, postOnRez,
stateSource, m_MaxScriptQueue); stateSource, m_MaxScriptQueue);
m_log.DebugFormat("[XEngine] Loaded script {0}.{1}, script UUID {2}, prim UUID {3} @ {4}", m_log.DebugFormat(
part.ParentGroup.RootPart.Name, item.Name, assetID, part.UUID, part.ParentGroup.RootPart.AbsolutePosition.ToString()); "[XEngine] Loaded script {0}.{1}, script UUID {2}, prim UUID {3} @ {4}.{5}",
part.ParentGroup.RootPart.Name, item.Name, assetID, part.UUID,
part.ParentGroup.RootPart.AbsolutePosition, part.ParentGroup.Scene.RegionInfo.RegionName);
if (presence != null) if (presence != null)
{ {

View File

@ -170,6 +170,9 @@ namespace OpenSim.Services.LLLoginService
private string firstname; private string firstname;
private string lastname; private string lastname;
// Web map
private string mapTileURL;
// Error Flags // Error Flags
private string errorReason; private string errorReason;
private string errorMessage; private string errorMessage;
@ -218,7 +221,7 @@ namespace OpenSim.Services.LLLoginService
public LLLoginResponse(UserAccount account, AgentCircuitData aCircuit, GridUserInfo pinfo, public LLLoginResponse(UserAccount account, AgentCircuitData aCircuit, GridUserInfo pinfo,
GridRegion destination, List<InventoryFolderBase> invSkel, FriendInfo[] friendsList, ILibraryService libService, GridRegion destination, List<InventoryFolderBase> invSkel, FriendInfo[] friendsList, ILibraryService libService,
string where, string startlocation, Vector3 position, Vector3 lookAt, List<InventoryItemBase> gestures, string message, string where, string startlocation, Vector3 position, Vector3 lookAt, List<InventoryItemBase> gestures, string message,
GridRegion home, IPEndPoint clientIP) GridRegion home, IPEndPoint clientIP, string mapTileURL)
: this() : this()
{ {
FillOutInventoryData(invSkel, libService); FillOutInventoryData(invSkel, libService);
@ -234,6 +237,7 @@ namespace OpenSim.Services.LLLoginService
Message = message; Message = message;
BuddList = ConvertFriendListItem(friendsList); BuddList = ConvertFriendListItem(friendsList);
StartLocation = where; StartLocation = where;
MapTileURL = mapTileURL;
FillOutHomeData(pinfo, home); FillOutHomeData(pinfo, home);
LookAt = String.Format("[r{0},r{1},r{2}]", lookAt.X, lookAt.Y, lookAt.Z); LookAt = String.Format("[r{0},r{1},r{2}]", lookAt.X, lookAt.Y, lookAt.Z);
@ -405,6 +409,7 @@ namespace OpenSim.Services.LLLoginService
InitialOutfitHash["folder_name"] = "Nightclub Female"; InitialOutfitHash["folder_name"] = "Nightclub Female";
InitialOutfitHash["gender"] = "female"; InitialOutfitHash["gender"] = "female";
initialOutfit.Add(InitialOutfitHash); initialOutfit.Add(InitialOutfitHash);
mapTileURL = String.Empty;
} }
@ -468,6 +473,9 @@ namespace OpenSim.Services.LLLoginService
responseData["region_x"] = (Int32)(RegionX); responseData["region_x"] = (Int32)(RegionX);
responseData["region_y"] = (Int32)(RegionY); responseData["region_y"] = (Int32)(RegionY);
if (mapTileURL != String.Empty)
responseData["map-server-url"] = mapTileURL;
if (m_buddyList != null) if (m_buddyList != null)
{ {
responseData["buddy-list"] = m_buddyList.ToArray(); responseData["buddy-list"] = m_buddyList.ToArray();
@ -564,6 +572,9 @@ namespace OpenSim.Services.LLLoginService
map["region_x"] = OSD.FromInteger(RegionX); map["region_x"] = OSD.FromInteger(RegionX);
map["region_y"] = OSD.FromInteger(RegionY); map["region_y"] = OSD.FromInteger(RegionY);
if (mapTileURL != String.Empty)
map["map-server-url"] = OSD.FromString(mapTileURL);
if (m_buddyList != null) if (m_buddyList != null)
{ {
map["buddy-list"] = ArrayListToOSDArray(m_buddyList.ToArray()); map["buddy-list"] = ArrayListToOSDArray(m_buddyList.ToArray());
@ -915,6 +926,12 @@ namespace OpenSim.Services.LLLoginService
set { home = value; } set { home = value; }
} }
public string MapTileURL
{
get { return mapTileURL; }
set { mapTileURL = value; }
}
public string Message public string Message
{ {
get { return welcomeMessage; } get { return welcomeMessage; }

View File

@ -73,6 +73,7 @@ namespace OpenSim.Services.LLLoginService
protected int m_MinLoginLevel; protected int m_MinLoginLevel;
protected string m_GatekeeperURL; protected string m_GatekeeperURL;
protected bool m_AllowRemoteSetLoginLevel; protected bool m_AllowRemoteSetLoginLevel;
protected string m_MapTileURL;
IConfig m_LoginServerConfig; IConfig m_LoginServerConfig;
@ -100,6 +101,7 @@ namespace OpenSim.Services.LLLoginService
m_AllowRemoteSetLoginLevel = m_LoginServerConfig.GetBoolean("AllowRemoteSetLoginLevel", false); m_AllowRemoteSetLoginLevel = m_LoginServerConfig.GetBoolean("AllowRemoteSetLoginLevel", false);
m_MinLoginLevel = m_LoginServerConfig.GetInt("MinLoginLevel", 0); m_MinLoginLevel = m_LoginServerConfig.GetInt("MinLoginLevel", 0);
m_GatekeeperURL = m_LoginServerConfig.GetString("GatekeeperURI", string.Empty); m_GatekeeperURL = m_LoginServerConfig.GetString("GatekeeperURI", string.Empty);
m_MapTileURL = m_LoginServerConfig.GetString("MapTileURL", string.Empty);
// These are required; the others aren't // These are required; the others aren't
if (accountService == string.Empty || authService == string.Empty) if (accountService == string.Empty || authService == string.Empty)
@ -356,7 +358,7 @@ namespace OpenSim.Services.LLLoginService
// Finally, fill out the response and return it // Finally, fill out the response and return it
// //
LLLoginResponse response = new LLLoginResponse(account, aCircuit, guinfo, destination, inventorySkel, friendsList, m_LibraryService, LLLoginResponse response = new LLLoginResponse(account, aCircuit, guinfo, destination, inventorySkel, friendsList, m_LibraryService,
where, startLocation, position, lookAt, gestures, m_WelcomeMessage, home, clientIP); where, startLocation, position, lookAt, gestures, m_WelcomeMessage, home, clientIP, m_MapTileURL);
m_log.DebugFormat("[LLOGIN SERVICE]: All clear. Sending login response to client."); m_log.DebugFormat("[LLOGIN SERVICE]: All clear. Sending login response to client.");
return response; return response;

View File

@ -134,6 +134,9 @@ ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003
WelcomeMessage = "Welcome, Avatar!" WelcomeMessage = "Welcome, Avatar!"
AllowRemoteSetLoginLevel = "false" AllowRemoteSetLoginLevel = "false"
; For snowglobe's web map
; MapTileURL = "";
[GridInfoService] [GridInfoService]
; These settings are used to return information on a get_grid_info call. ; These settings are used to return information on a get_grid_info call.