private string GetHasVoted(UUID agentID, GroupProposalInfo p)
 {
     OpenMetaverse.StructuredData.OSDMap map = GenericUtils.GetGeneric(p.GroupID, p.VoteID.ToString(), agentID.ToString(), data);
     if (map != null)
         return map["Vote"];
     return "";
 }
Example #2
0
        private byte[] StartGroupProposal(string request, UUID agentID)
        {
            OSDMap map = (OSDMap) OSDParser.DeserializeLLSDXml(request);

            int duration = map["duration"].AsInteger();
            UUID group = map["group-id"].AsUUID();
            double majority = map["majority"].AsReal();
            string text = map["proposal-text"].AsString();
            int quorum = map["quorum"].AsInteger();
            UUID session = map["session-id"].AsUUID();

            GroupProposalInfo info = new GroupProposalInfo
                                         {
                                             GroupID = group,
                                             Majority = (float) majority,
                                             Quorum = quorum,
                                             Session = session,
                                             Text = text,
                                             Duration = duration,
                                             BallotInitiator = agentID,
                                             Created = DateTime.Now,
                                             Ending = DateTime.Now.AddSeconds(duration),
                                             VoteID = UUID.Random()
                                         };

            m_groupData.AddGroupProposal(agentID, info);

            OSDMap resp = new OSDMap();
            resp["voted"] = OSD.FromBoolean(true);
            return OSDParser.SerializeLLSDXmlBytes(resp);
        }
        public void AddGroupProposal(UUID agentID, GroupProposalInfo info)
        {
            object remoteValue = DoRemote(agentID, info);
            if (remoteValue != null || m_doRemoteOnly)
                return;

            if (CheckGroupPermissions(agentID, info.GroupID, (ulong)GroupPowers.StartProposal))
                GenericUtils.AddGeneric(info.GroupID, "Proposal", info.VoteID.ToString(), info.ToOSD(), data);
        }
 public void AddGroupProposal(UUID agentID, GroupProposalInfo info)
 {
     GroupsConnector.AddGroupProposal(agentID, info);
 }
 public void AddGroupProposal(UUID agentID, GroupProposalInfo info)
 {
 }
 public void AddGroupProposal(UUID agentID, GroupProposalInfo info)
 {
     GenericUtils.AddGeneric(agentID, "Proposal", info.GroupID.ToString(), info.ToOSD(), data);
 }
Example #7
0
        private string StartGroupProposal(string request, UUID agentID)
        {
            OSDMap map = (OSDMap) OSDParser.DeserializeLLSDXml(request);

            int duration = map["duration"].AsInteger();
            UUID group = map["group-id"].AsUUID();
            double majority = map["majority"].AsReal();
            string text = map["proposal-text"].AsString();
            int quorum = map["quorum"].AsInteger();
            UUID session = map["session-id"].AsUUID();

            GroupProposalInfo info = new GroupProposalInfo
                                         {
                                             GroupID = group,
                                             Majority = (float) majority,
                                             Quorum = quorum,
                                             Session = session,
                                             Text = text,
                                             Duration = duration
                                         };

            m_groupData.AddGroupProposal(agentID, info);

            OSDMap resp = new OSDMap();
            resp["voted"] = OSD.FromBoolean(true);
            return OSDParser.SerializeLLSDXmlString(resp);
        }