public static void Ban(string accountName) { Locker.EnterReadLock(); try { AuthDatabaseProvider.Update("accounts", "Banned", "True", "Username", accountName); } finally { Locker.ExitReadLock(); } }
public static bool RemovePoints(Account account) { Locker.EnterReadLock(); try { AuthDatabaseProvider.Update("accounts", "PointCount", "0", "Id", account.Id.ToString()); return(true); } catch { return(false); } finally { Locker.ExitReadLock(); } }
public static void CreateAccountInformation(int accountid, int startbankkamas) { Locker.EnterReadLock(); try { AuthDatabaseProvider.Insert("AccountsInformations", new List <string>() { "Id", "BankKamas" }, new List <string>() { accountid.ToString(), startbankkamas.ToString() }); } finally { Locker.ExitReadLock(); } }
public static bool CheckAndApplyNickname(AuthClient client, string nickname) { Locker.EnterReadLock(); try { if (AuthDatabaseProvider.SelectData("Accounts", "Nickname", nickname, "Nickname") != string.Empty) { return(false); } else { AuthDatabaseProvider.Update("Accounts", "Nickname", nickname, "Id", client.Account.Id.ToString()); client.Account.Nickname = nickname; return(true); } } finally { Locker.ExitReadLock(); } }