public void AddPlayer(string user, string pass) { try { client.Post($"{WebHelper.AppSettings["InternalWeb"]}?method=addplayer", FormParser.ToBytes(new SafeStringToStringDirectionary { { "user", user }, { "pass", pass }, } )); } catch { } }
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(""); } }
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); } }
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); } }
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); } }