Core/Accounts: prevent existing account ban from being updated

This commit is contained in:
hondacrx
2018-04-18 18:03:39 -04:00
parent 4e4d596392
commit 9b927f8093
6 changed files with 28 additions and 6 deletions
+9
View File
@@ -331,6 +331,15 @@ namespace Game
return sha.ComputeHash(Encoding.UTF8.GetBytes(name + ":" + password)).ToHexString();
}
public bool IsBannedAccount(string name)
{
PreparedStatement stmt = DB.Login.GetPreparedStatement(LoginStatements.SEL_ACCOUNT_BANNED_BY_USERNAME);
stmt.AddValue(0, name);
SQLResult result = DB.Login.Query(stmt);
return !result.IsEmpty();
}
public bool IsPlayerAccount(AccountTypes gmlevel)
{
return gmlevel == AccountTypes.Player;