mirror of
https://github.com/EQEmu/Server.git
synced 2026-04-08 05:52:26 +00:00
* Beginning of cleanup * More cleanup * More cleanup * Enc cleanup * client manager cleanup * client cleanup * More cleanup * More cleanup * Cleanup * More cleanup, account context, account management * Remove positional fmt bindings * Use LoginAccountContext * Update loginserver_webserver.cpp * Remove comments * Port CreateLoginServerAccount to repositories * More cleanup * More cleanup * More cleanup * More cleanup * Remove a ton of functions * More cleanup * More cleanup * More cleanup * Cleanup SendClientAuthToWorld * Consolidate world server logic * Update login_accounts_repository.h * Update login_accounts_repository.h * Move api tokens to repositories * Cleanup options * Move everything else to repositories * Update account_management.cpp * uint64 account * Update login_schema.sql * Fix * Update world_server.cpp * auto
29 lines
628 B
C++
29 lines
628 B
C++
#ifndef EQEMU_LOGIN_SERVER_ADMINS_REPOSITORY_H
|
|
#define EQEMU_LOGIN_SERVER_ADMINS_REPOSITORY_H
|
|
|
|
#include "../database.h"
|
|
#include "../strings.h"
|
|
#include "base/base_login_server_admins_repository.h"
|
|
|
|
class LoginServerAdminsRepository : public BaseLoginServerAdminsRepository {
|
|
public:
|
|
static LoginServerAdmins GetByName(Database &db, std::string account_name)
|
|
{
|
|
auto admins = GetWhere(
|
|
db,
|
|
fmt::format(
|
|
"account_name = '{}' LIMIT 1",
|
|
Strings::Escape(account_name)
|
|
)
|
|
);
|
|
|
|
if (admins.size() == 1) {
|
|
return admins.front();
|
|
}
|
|
|
|
return NewEntity();
|
|
}
|
|
};
|
|
|
|
#endif //EQEMU_LOGIN_SERVER_ADMINS_REPOSITORY_H
|