Example #1
0
 public void AddPlayer(string user, string pass)
 {
     try
     {
         client.Post($"{WebHelper.AppSettings["InternalWeb"]}?method=addplayer",
                     FormParser.ToBytes(new SafeStringToStringDirectionary
         {
             { "user", user },
             { "pass", pass },
         }
                                        ));
     }
     catch
     {
     }
 }
Example #2
0
 public string GetUserNameByID(int id)
 {
     try
     {
         var result = client.Post($"{WebHelper.AppSettings["InternalWeb"]}?method=getusernamebyid",
                                  FormParser.ToBytes(new SafeStringToStringDirectionary
         {
             { "id", id.ToString() },
         }
                                                     )).ConvertFromBytes();
         return(result);
     }
     catch
     {
         return("");
     }
 }
Example #3
0
 public int GetIDByUserName(string username)
 {
     try
     {
         var result = client.Post($"{WebHelper.AppSettings["InternalWeb"]}?method=getidbyusername",
                                  FormParser.ToBytes(new SafeStringToStringDirectionary
         {
             { "username", username },
         }
                                                     )).ConvertFromBytes().ConvertToInt();
         return(result);
     }
     catch
     {
         return(0);
     }
 }
Example #4
0
 public bool ExistsUsername(string name)
 {
     try
     {
         var result = client.Post($"{WebHelper.AppSettings["InternalWeb"]}?method=existsusername",
                                  FormParser.ToBytes(new SafeStringToStringDirectionary
         {
             { "name", name },
         }
                                                     )).ConvertFromBytes();
         return(result == "True");
     }
     catch
     {
         return(true);
     }
 }
Example #5
0
 public bool CheckUser(string username, string password, int inviteid)
 {
     try
     {
         var result = client.Post($"{WebHelper.AppSettings["InternalWeb"]}?method=checkuser",
                                  FormParser.ToBytes(new SafeStringToStringDirectionary
         {
             { "username", username },
             { "password", password },
             { "inviteid", inviteid.ToString() },
         }
                                                     )).ConvertFromBytes().ConvertToInt(0);
         return(result == 1);
     }
     catch
     {
         return(false);
     }
 }