more cleanup

0.6.5-rc1
Dr Scofield 2009-04-22 18:00:59 +00:00
parent d2bf957b13
commit d455d579d0
4 changed files with 65 additions and 72 deletions

View File

@ -96,8 +96,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Groups
scene.EventManager.OnNewClient += OnNewClient; scene.EventManager.OnNewClient += OnNewClient;
scene.EventManager.OnClientClosed += OnClientClosed; scene.EventManager.OnClientClosed += OnClientClosed;
scene.EventManager.OnIncomingInstantMessage += scene.EventManager.OnIncomingInstantMessage += OnGridInstantMessage;
OnGridInstantMessage;
} }
public void PostInitialise() public void PostInitialise()

View File

@ -52,7 +52,13 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
private string m_serviceURL = string.Empty; private string m_serviceURL = string.Empty;
public const GroupPowers m_DefaultEveryonePowers = GroupPowers.AllowSetHome | GroupPowers.Accountable | GroupPowers.JoinChat | GroupPowers.AllowVoiceChat | GroupPowers.ReceiveNotices | GroupPowers.StartProposal | GroupPowers.VoteOnProposal; public const GroupPowers m_DefaultEveryonePowers = GroupPowers.AllowSetHome |
GroupPowers.Accountable |
GroupPowers.JoinChat |
GroupPowers.AllowVoiceChat |
GroupPowers.ReceiveNotices |
GroupPowers.StartProposal |
GroupPowers.VoteOnProposal;
private bool m_disableKeepAlive = false; private bool m_disableKeepAlive = false;
@ -73,7 +79,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
/// <summary> /// <summary>
/// Create a Group, including Everyone and Owners Role, place FounderID in both groups, select Owner as selected role, and newly created group as agent's active role. /// Create a Group, including Everyone and Owners Role, place FounderID in both groups, select Owner as selected role, and newly created group as agent's active role.
/// </summary> /// </summary>
public UUID CreateGroup(string name, string charter, bool showInList, UUID insigniaID, int membershipFee, bool openEnrollment, bool allowPublish, bool maturePublish, UUID founderID) public UUID CreateGroup(string name, string charter, bool showInList, UUID insigniaID,
int membershipFee, bool openEnrollment, bool allowPublish,
bool maturePublish, UUID founderID)
{ {
UUID GroupID = UUID.Random(); UUID GroupID = UUID.Random();
UUID OwnerRoleID = UUID.Random(); UUID OwnerRoleID = UUID.Random();
@ -140,9 +148,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
| GroupPowers.VoteOnProposal; | GroupPowers.VoteOnProposal;
param["OwnersPowers"] = ((ulong)OwnerPowers).ToString(); param["OwnersPowers"] = ((ulong)OwnerPowers).ToString();
Hashtable respData = XmlRpcCall("groups.createGroup", param); Hashtable respData = XmlRpcCall("groups.createGroup", param);
if (respData.Contains("error")) if (respData.Contains("error"))
@ -155,7 +160,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
return UUID.Parse((string)respData["GroupID"]); return UUID.Parse((string)respData["GroupID"]);
} }
public void UpdateGroup(UUID groupID, string charter, bool showInList, UUID insigniaID, int membershipFee, bool openEnrollment, bool allowPublish, bool maturePublish) public void UpdateGroup(UUID groupID, string charter, bool showInList,
UUID insigniaID, int membershipFee, bool openEnrollment,
bool allowPublish, bool maturePublish)
{ {
Hashtable param = new Hashtable(); Hashtable param = new Hashtable();
param["GroupID"] = groupID.ToString(); param["GroupID"] = groupID.ToString();
@ -170,7 +177,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
XmlRpcCall("groups.updateGroup", param); XmlRpcCall("groups.updateGroup", param);
} }
public void AddGroupRole(UUID groupID, UUID roleID, string name, string description, string title, ulong powers) public void AddGroupRole(UUID groupID, UUID roleID, string name, string description,
string title, ulong powers)
{ {
Hashtable param = new Hashtable(); Hashtable param = new Hashtable();
param["GroupID"] = groupID.ToString(); param["GroupID"] = groupID.ToString();
@ -193,7 +201,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
} }
public void UpdateGroupRole(UUID groupID, UUID roleID, string name, string description, string title, ulong powers) public void UpdateGroupRole(UUID groupID, UUID roleID, string name, string description,
string title, ulong powers)
{ {
Hashtable param = new Hashtable(); Hashtable param = new Hashtable();
param["GroupID"] = groupID.ToString(); param["GroupID"] = groupID.ToString();
@ -533,8 +542,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
} }
return Roles; return Roles;
} }
public List<GroupRolesData> GetGroupRoles(UUID GroupID) public List<GroupRolesData> GetGroupRoles(UUID GroupID)
@ -565,7 +572,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
} }
return Roles; return Roles;
} }
private static GroupMembershipData HashTableToGroupMembershipData(Hashtable respData) private static GroupMembershipData HashTableToGroupMembershipData(Hashtable respData)
@ -633,7 +639,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
} }
return members; return members;
} }
public List<GroupRoleMembersData> GetGroupRoleMembers(UUID GroupID) public List<GroupRoleMembersData> GetGroupRoleMembers(UUID GroupID)
@ -800,10 +805,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
{ {
m_log.ErrorFormat("[GROUPDATA] {0}", line); m_log.ErrorFormat("[GROUPDATA] {0}", line);
} }
} }
} }
} }
public class GroupNoticeInfo public class GroupNoticeInfo

View File

@ -229,31 +229,28 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
// Force? open the group session dialog??? // Force? open the group session dialog???
IEventQueue eq = m_ActiveClients[msg.toAgentID].Scene.RequestModuleInterface<IEventQueue>(); IEventQueue eq = m_ActiveClients[msg.toAgentID].Scene.RequestModuleInterface<IEventQueue>();
eq.ChatterboxInvitation( eq.ChatterboxInvitation(
GroupID GroupID,
, GroupInfo.GroupName GroupInfo.GroupName,
, new UUID(msg.fromAgentID) new UUID(msg.fromAgentID),
, msg.message, new UUID(msg.toAgentID) msg.message, new UUID(msg.toAgentID),
, msg.fromAgentName msg.fromAgentName,
, msg.dialog msg.dialog,
, msg.timestamp msg.timestamp,
, msg.offline==1 msg.offline == 1,
, (int)msg.ParentEstateID (int)msg.ParentEstateID,
, msg.Position msg.Position,
, 1 1,
, new UUID(msg.imSessionID) new UUID(msg.imSessionID),
, msg.fromGroup msg.fromGroup,
, Utils.StringToBytes(GroupInfo.GroupName) Utils.StringToBytes(GroupInfo.GroupName));
);
eq.ChatterBoxSessionAgentListUpdates( eq.ChatterBoxSessionAgentListUpdates(
new UUID(GroupID) new UUID(GroupID),
, new UUID(msg.fromAgentID) new UUID(msg.fromAgentID),
, new UUID(msg.toAgentID) new UUID(msg.toAgentID),
, false //canVoiceChat false, //canVoiceChat
, false //isModerator false, //isModerator
, false //text mute false); //text mute
);
} }
} }
} }
@ -285,13 +282,12 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
IEventQueue queue = remoteClient.Scene.RequestModuleInterface<IEventQueue>(); IEventQueue queue = remoteClient.Scene.RequestModuleInterface<IEventQueue>();
queue.ChatterBoxSessionAgentListUpdates( queue.ChatterBoxSessionAgentListUpdates(
new UUID(GroupID) new UUID(GroupID),
, new UUID(im.fromAgentID) new UUID(im.fromAgentID),
, new UUID(im.toAgentID) new UUID(im.toAgentID),
, false //canVoiceChat false, //canVoiceChat
, false //isModerator false, //isModerator
, false //text mute false); //text mute
);
} }
} }
@ -373,12 +369,12 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
msg.ParentEstateID = im.ParentEstateID; msg.ParentEstateID = im.ParentEstateID;
msg.Position = im.Position; msg.Position = im.Position;
msg.RegionID = im.RegionID; msg.RegionID = im.RegionID;
msg.binaryBucket = new byte[1] { 0 }; msg.binaryBucket = new byte[1]{0};
foreach (GroupMembersData member in m_GroupsModule.GroupMembersRequest(null, groupID)) foreach (GroupMembersData member in m_GroupsModule.GroupMembersRequest(null, groupID))
{ {
msg.toAgentID = member.AgentID.Guid; msg.toAgentID = member.AgentID.Guid;
m_MsgTransferModule.SendInstantMessage(msg, delegate(bool success) { }); m_MsgTransferModule.SendInstantMessage(msg, delegate(bool success) {});
} }
} }
@ -402,14 +398,12 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
bodyMap.Add("success", OSD.FromBoolean(true)); bodyMap.Add("success", OSD.FromBoolean(true));
bodyMap.Add("session_info", sessionMap); bodyMap.Add("session_info", sessionMap);
IEventQueue queue = remoteClient.Scene.RequestModuleInterface<IEventQueue>(); IEventQueue queue = remoteClient.Scene.RequestModuleInterface<IEventQueue>();
if (queue != null) if (queue != null)
{ {
queue.Enqueue(EventQueueHelper.buildEvent("ChatterBoxSessionStartReply", bodyMap), remoteClient.AgentId); queue.Enqueue(EventQueueHelper.buildEvent("ChatterBoxSessionStartReply", bodyMap), remoteClient.AgentId);
} }
} }
@ -428,6 +422,5 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
m_log.WarnFormat("[GROUPS-MESSAGING] IM: binaryBucket({0})", OpenMetaverse.Utils.BytesToHexString(im.binaryBucket, "BinaryBucket")); m_log.WarnFormat("[GROUPS-MESSAGING] IM: binaryBucket({0})", OpenMetaverse.Utils.BytesToHexString(im.binaryBucket, "BinaryBucket"));
} }
} }
} }
} }

View File

@ -155,13 +155,11 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
return; return;
} }
m_sceneList.Add(scene); m_sceneList.Add(scene);
scene.EventManager.OnNewClient += OnNewClient; scene.EventManager.OnNewClient += OnNewClient;
scene.EventManager.OnClientClosed += OnClientClosed; scene.EventManager.OnClientClosed += OnClientClosed;
scene.EventManager.OnIncomingInstantMessage += OnGridInstantMessage; scene.EventManager.OnIncomingInstantMessage += OnGridInstantMessage;
} }
public void RemoveRegion(Scene scene) public void RemoveRegion(Scene scene)