Esempio n. 1
0
        public R ChangeName(string name)
        {
            var result = tsBaseClient.ChangeName(name);

            if (result.Ok)
            {
                return(R.OkR);
            }

            if (result.Error.Id == Ts3ErrorCode.parameter_invalid_size)
            {
                return("The new name is too long or invalid");
            }
            else
            {
                return(result.Error.ErrorFormat());
            }
        }
Esempio n. 2
0
 public R ChangeName(string name)
 {
     try
     {
         tsBaseClient.ChangeName(name);
         return(R.OkR);
     }
     catch (Ts3CommandException ex)
     {
         if (ex.ErrorStatus.Id == Ts3ErrorCode.parameter_invalid_size)
         {
             return("The new name is too long or invalid");
         }
         else
         {
             return(ex.ErrorStatus.ErrorFormat());
         }
     }
 }