diff options
author | Kevin Cozens | 2012-07-29 17:02:10 -0400 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-08-03 00:44:03 +0100 |
commit | 72075e68c7209afee10f365fc14b1fabffcc66a3 (patch) | |
tree | b2dc78780aa9a28d4d6ed2bd179c98c5e4f69e68 | |
parent | BulletSim: Debugging log statements added. Reduced size of updata buffer tryi... (diff) | |
download | opensim-SC-72075e68c7209afee10f365fc14b1fabffcc66a3.zip opensim-SC-72075e68c7209afee10f365fc14b1fabffcc66a3.tar.gz opensim-SC-72075e68c7209afee10f365fc14b1fabffcc66a3.tar.bz2 opensim-SC-72075e68c7209afee10f365fc14b1fabffcc66a3.tar.xz |
Save membership fee to the database when a group is created.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs index 61aaf04..d412cd1 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs | |||
@@ -54,12 +54,12 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
54 | 54 | ||
55 | private bool m_debugEnabled = false; | 55 | private bool m_debugEnabled = false; |
56 | 56 | ||
57 | public const GroupPowers m_DefaultEveryonePowers = GroupPowers.AllowSetHome | | 57 | public const GroupPowers m_DefaultEveryonePowers = GroupPowers.AllowSetHome | |
58 | GroupPowers.Accountable | | 58 | GroupPowers.Accountable | |
59 | GroupPowers.JoinChat | | 59 | GroupPowers.JoinChat | |
60 | GroupPowers.AllowVoiceChat | | 60 | GroupPowers.AllowVoiceChat | |
61 | GroupPowers.ReceiveNotices | | 61 | GroupPowers.ReceiveNotices | |
62 | GroupPowers.StartProposal | | 62 | GroupPowers.StartProposal | |
63 | GroupPowers.VoteOnProposal; | 63 | GroupPowers.VoteOnProposal; |
64 | 64 | ||
65 | private bool m_connectorEnabled = false; | 65 | private bool m_connectorEnabled = false; |
@@ -201,8 +201,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
201 | /// <summary> | 201 | /// <summary> |
202 | /// 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. | 202 | /// 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. |
203 | /// </summary> | 203 | /// </summary> |
204 | public UUID CreateGroup(UUID requestingAgentID, string name, string charter, bool showInList, UUID insigniaID, | 204 | public UUID CreateGroup(UUID requestingAgentID, string name, string charter, bool showInList, UUID insigniaID, |
205 | int membershipFee, bool openEnrollment, bool allowPublish, | 205 | int membershipFee, bool openEnrollment, bool allowPublish, |
206 | bool maturePublish, UUID founderID) | 206 | bool maturePublish, UUID founderID) |
207 | { | 207 | { |
208 | UUID GroupID = UUID.Random(); | 208 | UUID GroupID = UUID.Random(); |
@@ -214,7 +214,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
214 | param["Charter"] = charter; | 214 | param["Charter"] = charter; |
215 | param["ShowInList"] = showInList == true ? 1 : 0; | 215 | param["ShowInList"] = showInList == true ? 1 : 0; |
216 | param["InsigniaID"] = insigniaID.ToString(); | 216 | param["InsigniaID"] = insigniaID.ToString(); |
217 | param["MembershipFee"] = 0; | 217 | param["MembershipFee"] = membershipFee; |
218 | param["OpenEnrollment"] = openEnrollment == true ? 1 : 0; | 218 | param["OpenEnrollment"] = openEnrollment == true ? 1 : 0; |
219 | param["AllowPublish"] = allowPublish == true ? 1 : 0; | 219 | param["AllowPublish"] = allowPublish == true ? 1 : 0; |
220 | param["MaturePublish"] = maturePublish == true ? 1 : 0; | 220 | param["MaturePublish"] = maturePublish == true ? 1 : 0; |
@@ -285,8 +285,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
285 | return UUID.Parse((string)respData["GroupID"]); | 285 | return UUID.Parse((string)respData["GroupID"]); |
286 | } | 286 | } |
287 | 287 | ||
288 | public void UpdateGroup(UUID requestingAgentID, UUID groupID, string charter, bool showInList, | 288 | public void UpdateGroup(UUID requestingAgentID, UUID groupID, string charter, bool showInList, |
289 | UUID insigniaID, int membershipFee, bool openEnrollment, | 289 | UUID insigniaID, int membershipFee, bool openEnrollment, |
290 | bool allowPublish, bool maturePublish) | 290 | bool allowPublish, bool maturePublish) |
291 | { | 291 | { |
292 | Hashtable param = new Hashtable(); | 292 | Hashtable param = new Hashtable(); |
@@ -302,7 +302,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
302 | XmlRpcCall(requestingAgentID, "groups.updateGroup", param); | 302 | XmlRpcCall(requestingAgentID, "groups.updateGroup", param); |
303 | } | 303 | } |
304 | 304 | ||
305 | public void AddGroupRole(UUID requestingAgentID, UUID groupID, UUID roleID, string name, string description, | 305 | public void AddGroupRole(UUID requestingAgentID, UUID groupID, UUID roleID, string name, string description, |
306 | string title, ulong powers) | 306 | string title, ulong powers) |
307 | { | 307 | { |
308 | Hashtable param = new Hashtable(); | 308 | Hashtable param = new Hashtable(); |
@@ -325,7 +325,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
325 | XmlRpcCall(requestingAgentID, "groups.removeRoleFromGroup", param); | 325 | XmlRpcCall(requestingAgentID, "groups.removeRoleFromGroup", param); |
326 | } | 326 | } |
327 | 327 | ||
328 | public void UpdateGroupRole(UUID requestingAgentID, UUID groupID, UUID roleID, string name, string description, | 328 | public void UpdateGroupRole(UUID requestingAgentID, UUID groupID, UUID roleID, string name, string description, |
329 | string title, ulong powers) | 329 | string title, ulong powers) |
330 | { | 330 | { |
331 | Hashtable param = new Hashtable(); | 331 | Hashtable param = new Hashtable(); |
@@ -580,7 +580,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
580 | memberships.Add(HashTableToGroupMembershipData((Hashtable)membership)); | 580 | memberships.Add(HashTableToGroupMembershipData((Hashtable)membership)); |
581 | } | 581 | } |
582 | } | 582 | } |
583 | 583 | ||
584 | return memberships; | 584 | return memberships; |
585 | } | 585 | } |
586 | 586 | ||
@@ -800,9 +800,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
800 | 800 | ||
801 | public bool hasAgentDroppedGroupChatSession(UUID agentID, UUID groupID) | 801 | public bool hasAgentDroppedGroupChatSession(UUID agentID, UUID groupID) |
802 | { | 802 | { |
803 | // If we're tracking drops for this group, | 803 | // If we're tracking drops for this group, |
804 | // and we find them, well... then they've dropped | 804 | // and we find them, well... then they've dropped |
805 | return m_groupsAgentsDroppedFromChatSession.ContainsKey(groupID) | 805 | return m_groupsAgentsDroppedFromChatSession.ContainsKey(groupID) |
806 | && m_groupsAgentsDroppedFromChatSession[groupID].Contains(agentID); | 806 | && m_groupsAgentsDroppedFromChatSession[groupID].Contains(agentID); |
807 | } | 807 | } |
808 | 808 | ||
@@ -888,7 +888,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
888 | 888 | ||
889 | return group; | 889 | return group; |
890 | } | 890 | } |
891 | 891 | ||
892 | private static GroupMembershipData HashTableToGroupMembershipData(Hashtable respData) | 892 | private static GroupMembershipData HashTableToGroupMembershipData(Hashtable respData) |
893 | { | 893 | { |
894 | GroupMembershipData data = new GroupMembershipData(); | 894 | GroupMembershipData data = new GroupMembershipData(); |
@@ -921,7 +921,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
921 | data.MembershipFee = int.Parse((string)respData["MembershipFee"]); | 921 | data.MembershipFee = int.Parse((string)respData["MembershipFee"]); |
922 | data.OpenEnrollment = ((string)respData["OpenEnrollment"] == "1"); | 922 | data.OpenEnrollment = ((string)respData["OpenEnrollment"] == "1"); |
923 | data.ShowInList = ((string)respData["ShowInList"] == "1"); | 923 | data.ShowInList = ((string)respData["ShowInList"] == "1"); |
924 | 924 | ||
925 | return data; | 925 | return data; |
926 | } | 926 | } |
927 | 927 | ||
@@ -958,7 +958,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
958 | m_memoryCache.TryGetValue(CacheKey, out resp); | 958 | m_memoryCache.TryGetValue(CacheKey, out resp); |
959 | } | 959 | } |
960 | } | 960 | } |
961 | 961 | ||
962 | if (resp == null) | 962 | if (resp == null) |
963 | { | 963 | { |
964 | if (m_debugEnabled) | 964 | if (m_debugEnabled) |
@@ -967,7 +967,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
967 | string UserService; | 967 | string UserService; |
968 | UUID SessionID; | 968 | UUID SessionID; |
969 | GetClientGroupRequestID(requestingAgentID, out UserService, out SessionID); | 969 | GetClientGroupRequestID(requestingAgentID, out UserService, out SessionID); |
970 | 970 | ||
971 | param.Add("RequestingAgentID", requestingAgentID.ToString()); | 971 | param.Add("RequestingAgentID", requestingAgentID.ToString()); |
972 | param.Add("RequestingAgentUserService", UserService); | 972 | param.Add("RequestingAgentUserService", UserService); |
973 | param.Add("RequestingSessionID", SessionID.ToString()); | 973 | param.Add("RequestingSessionID", SessionID.ToString()); |
@@ -992,9 +992,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
992 | catch (Exception e) | 992 | catch (Exception e) |
993 | { | 993 | { |
994 | m_log.ErrorFormat( | 994 | m_log.ErrorFormat( |
995 | "[XMLRPC-GROUPS-CONNECTOR]: An error has occured while attempting to access the XmlRpcGroups server method {0} at {1}", | 995 | "[XMLRPC-GROUPS-CONNECTOR]: An error has occured while attempting to access the XmlRpcGroups server method {0} at {1}", |
996 | function, m_groupsServerURI); | 996 | function, m_groupsServerURI); |
997 | 997 | ||
998 | m_log.ErrorFormat("[XMLRPC-GROUPS-CONNECTOR]: {0}{1}", e.Message, e.StackTrace); | 998 | m_log.ErrorFormat("[XMLRPC-GROUPS-CONNECTOR]: {0}{1}", e.Message, e.StackTrace); |
999 | 999 | ||
1000 | foreach (string ResponseLine in req.RequestResponse.Split(new string[] { Environment.NewLine }, StringSplitOptions.None)) | 1000 | foreach (string ResponseLine in req.RequestResponse.Split(new string[] { Environment.NewLine }, StringSplitOptions.None)) |
@@ -1061,9 +1061,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
1061 | } | 1061 | } |
1062 | } | 1062 | } |
1063 | } | 1063 | } |
1064 | 1064 | ||
1065 | /// <summary> | 1065 | /// <summary> |
1066 | /// Group Request Tokens are an attempt to allow the groups service to authenticate | 1066 | /// Group Request Tokens are an attempt to allow the groups service to authenticate |
1067 | /// requests. | 1067 | /// requests. |
1068 | /// TODO: This broke after the big grid refactor, either find a better way, or discard this | 1068 | /// TODO: This broke after the big grid refactor, either find a better way, or discard this |
1069 | /// </summary> | 1069 | /// </summary> |
@@ -1103,7 +1103,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
1103 | } | 1103 | } |
1104 | */ | 1104 | */ |
1105 | } | 1105 | } |
1106 | 1106 | ||
1107 | } | 1107 | } |
1108 | } | 1108 | } |
1109 | 1109 | ||