コード例 #1
0
ファイル: Utilities.cs プロジェクト: nhede/WhiteCore-Dev
        public static bool IsSystemUser(OpenMetaverse.UUID userID)
        {
            var userId = userID.ToString();

            return(userId == Constants.GovernorUUID ||
                   userId == Constants.RealEstateOwnerUUID ||
                   userId == Constants.LibraryOwner
                   );
        }
コード例 #2
0
        public void RequestAsset(OpenMetaverse.UUID assetID, AssetRequestInfo args)
        {
            try
            {
                _readWhipServer.GetAssetAsync(assetID.ToString(),
                                              delegate(Asset asset, AssetServerError e)
                {
                    if (e == null)
                    {
                        //no error, pass asset to caller
                        _receiver.AssetReceived(WhipAssetToOpensim(asset), args);
                    }
                    else
                    {
                        string errorString = e.ToString();
                        if (!errorString.Contains("not found"))
                        {
                            //there is an error, log it, and then tell the caller we have no asset to give
                            _log.ErrorFormat(
                                "[WHIP.AssetClient]: Failure fetching asset {0}" + Environment.NewLine + errorString
                                + Environment.NewLine, assetID);
                        }

                        _receiver.AssetNotFound(assetID, args);
                    }
                }
                                              );
            }
            catch (AssetServerError e)
            {
                //there is an error, log it, and then tell the caller we have no asset to give
                string errorString = e.ToString();
                if (!errorString.Contains("not found"))
                {
                    _log.ErrorFormat(
                        "[WHIP.AssetClient]: Failure fetching asset {0}" + Environment.NewLine + errorString
                        + Environment.NewLine, assetID);
                }

                _receiver.AssetNotFound(assetID, args);
            }
        }
コード例 #3
0
 public AssetBase RequestAssetSync(OpenMetaverse.UUID assetID)
 {
     try
     {
         AssetBase asset = this.WhipAssetToOpensim(_readWhipServer.GetAsset(assetID.ToString()));
         return(asset);
     }
     catch (AssetServerError e)
     {
         string errorString = e.ToString();
         if (!errorString.Contains("not found"))
         {
             //there is an error, log it, and then tell the caller we have no asset to give
             _log.ErrorFormat(
                 "[WHIP.AssetClient]: Failure fetching asset {0}" + Environment.NewLine + errorString
                 + Environment.NewLine, assetID);
         }
         return(null);
     }
 }
コード例 #4
0
        override public string ToString()
        {
            var output = new StringBuilder("{");

            switch (Type)
            {
            case IdentityCategory.Agent:
                output.Append("AgentIdentity");
                break;

            case IdentityCategory.Object:
                output.Append("ObjectIdentity");
                break;

            case IdentityCategory.System:
                output.Append("SystemIdentity}");
                return(output.ToString());
            }
            output.Append(":");
            output.Append((String.IsNullOrWhiteSpace(SlName) ? AvatarID.ToString() : SlName));
            return(output.ToString());
        }
コード例 #5
0
 public string GetCapsPath(OpenMetaverse.UUID agentId)
 {
     return(agentId.ToString());
 }
コード例 #6
0
        public void onRemoveAvatar(OpenMetaverse.UUID uuid)
        {
            string msg = MGMJson.RemoveAvatar(uuid.ToString());

            mgmLink.send(msg);
        }