mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2025-11-16 23:10:09 +00:00
added a sanity check for entering invalid characters
This commit is contained in:
@@ -191,6 +191,12 @@ std::unique_ptr<Database::Account> Database::findAccount(std::string login) {
|
||||
std::unique_ptr<Account>(new Account(find.front()));
|
||||
}
|
||||
|
||||
bool Database::validateCharacter(int characterID, int userID) {
|
||||
return db.select(&DbPlayer::PlayerID,
|
||||
where((c(&DbPlayer::PlayerID) == characterID) && (c(&DbPlayer::AccountID) == userID)))
|
||||
.size() > 0;
|
||||
}
|
||||
|
||||
bool Database::isNameFree(sP_CL2LS_REQ_CHECK_CHAR_NAME* nameCheck) {
|
||||
std::lock_guard<std::mutex> lock(dbCrit);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user