From d455d579d03523b98e9f0161716942889b7913c3 Mon Sep 17 00:00:00 2001
From: Dr Scofield
Date: Wed, 22 Apr 2009 18:00:59 +0000
Subject: more cleanup
---
.../Avatar/XmlRpcGroups/XmlRpcGroupData.cs | 61 +++++++++++----------
.../Avatar/XmlRpcGroups/XmlRpcGroupsMessaging.cs | 63 ++++++++++------------
.../Avatar/XmlRpcGroups/XmlRpcGroupsModule.cs | 2 -
3 files changed, 60 insertions(+), 66 deletions(-)
(limited to 'OpenSim/Region/OptionalModules')
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupData.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupData.cs
index ada6cfd..30839cc 100644
--- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupData.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupData.cs
@@ -52,7 +52,13 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
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;
@@ -73,7 +79,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
///
/// 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.
///
- 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 OwnerRoleID = UUID.Random();
@@ -140,9 +148,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
| GroupPowers.VoteOnProposal;
param["OwnersPowers"] = ((ulong)OwnerPowers).ToString();
-
-
-
Hashtable respData = XmlRpcCall("groups.createGroup", param);
if (respData.Contains("error"))
@@ -155,7 +160,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
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();
param["GroupID"] = groupID.ToString();
@@ -170,7 +177,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
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();
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();
param["GroupID"] = groupID.ToString();
@@ -479,11 +488,11 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
if (respData.Contains("error"))
{
- return null;
- }
+ return null;
+ }
return HashTableToGroupMembershipData(respData);
- }
+ }
public List GetAgentGroupMemberships(UUID AgentID)
@@ -533,8 +542,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
}
return Roles;
-
-
}
public List GetGroupRoles(UUID GroupID)
@@ -565,7 +572,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
}
return Roles;
-
}
private static GroupMembershipData HashTableToGroupMembershipData(Hashtable respData)
@@ -633,7 +639,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
}
return members;
-
}
public List GetGroupRoleMembers(UUID GroupID)
@@ -647,15 +652,15 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
if (!respData.Contains("error"))
{
- foreach (Hashtable membership in respData.Values)
- {
- GroupRoleMembersData data = new GroupRoleMembersData();
-
- data.MemberID = new UUID((string)membership["AgentID"]);
- data.RoleID = new UUID((string)membership["RoleID"]);
-
- members.Add(data);
- }
+ foreach (Hashtable membership in respData.Values)
+ {
+ GroupRoleMembersData data = new GroupRoleMembersData();
+
+ data.MemberID = new UUID((string)membership["AgentID"]);
+ data.RoleID = new UUID((string)membership["RoleID"]);
+
+ members.Add(data);
+ }
}
return members;
}
@@ -697,8 +702,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
if (!respData.Contains("error"))
{
- return null;
- }
+ return null;
+ }
GroupNoticeInfo data = new GroupNoticeInfo();
data.GroupID = UUID.Parse((string)respData["GroupID"]);
@@ -799,11 +804,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
foreach (string line in lines)
{
m_log.ErrorFormat("[GROUPDATA] {0}", line);
- }
-
+ }
}
}
-
}
public class GroupNoticeInfo
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsMessaging.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsMessaging.cs
index 34af325..b1b25aa 100644
--- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsMessaging.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsMessaging.cs
@@ -229,31 +229,28 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
// Force? open the group session dialog???
IEventQueue eq = m_ActiveClients[msg.toAgentID].Scene.RequestModuleInterface();
eq.ChatterboxInvitation(
- GroupID
- , GroupInfo.GroupName
- , new UUID(msg.fromAgentID)
- , msg.message, new UUID(msg.toAgentID)
- , msg.fromAgentName
- , msg.dialog
- , msg.timestamp
- , msg.offline==1
- , (int)msg.ParentEstateID
- , msg.Position
- , 1
- , new UUID(msg.imSessionID)
- , msg.fromGroup
- , Utils.StringToBytes(GroupInfo.GroupName)
- );
+ GroupID,
+ GroupInfo.GroupName,
+ new UUID(msg.fromAgentID),
+ msg.message, new UUID(msg.toAgentID),
+ msg.fromAgentName,
+ msg.dialog,
+ msg.timestamp,
+ msg.offline == 1,
+ (int)msg.ParentEstateID,
+ msg.Position,
+ 1,
+ new UUID(msg.imSessionID),
+ msg.fromGroup,
+ Utils.StringToBytes(GroupInfo.GroupName));
eq.ChatterBoxSessionAgentListUpdates(
- new UUID(GroupID)
- , new UUID(msg.fromAgentID)
- , new UUID(msg.toAgentID)
- , false //canVoiceChat
- , false //isModerator
- , false //text mute
- );
-
+ new UUID(GroupID),
+ new UUID(msg.fromAgentID),
+ new UUID(msg.toAgentID),
+ false, //canVoiceChat
+ false, //isModerator
+ false); //text mute
}
}
}
@@ -285,13 +282,12 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
IEventQueue queue = remoteClient.Scene.RequestModuleInterface();
queue.ChatterBoxSessionAgentListUpdates(
- new UUID(GroupID)
- , new UUID(im.fromAgentID)
- , new UUID(im.toAgentID)
- , false //canVoiceChat
- , false //isModerator
- , false //text mute
- );
+ new UUID(GroupID),
+ new UUID(im.fromAgentID),
+ new UUID(im.toAgentID),
+ false, //canVoiceChat
+ false, //isModerator
+ false); //text mute
}
}
@@ -373,12 +369,12 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
msg.ParentEstateID = im.ParentEstateID;
msg.Position = im.Position;
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))
{
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("session_info", sessionMap);
-
IEventQueue queue = remoteClient.Scene.RequestModuleInterface();
if (queue != null)
{
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"));
}
}
-
}
}
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsModule.cs
index 3d9477f..9ba78c5 100644
--- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsModule.cs
@@ -155,13 +155,11 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
return;
}
-
m_sceneList.Add(scene);
scene.EventManager.OnNewClient += OnNewClient;
scene.EventManager.OnClientClosed += OnClientClosed;
scene.EventManager.OnIncomingInstantMessage += OnGridInstantMessage;
-
}
public void RemoveRegion(Scene scene)
--
cgit v1.1