mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-10 10:18:21 +00:00
554a9a6806
* fix: more include changes * fix: remove dZoneManager from global include * fix: dDatabase * fix: dCommon * fix: object libs * fix: rebase * fix: bcrypt * wip: try simplified connector build * fix: update dockerfile * fix: mariadb C/C++ on apple * feat: Move scripts to CMAKE_MODULE_PATH * fix: dPropertyBehaviors * fix: macos? * fix: Dockerfile * fix: macos? * fix: macos? * fix: macos? * fix: macos? * fix: macos? * try: install_name_tool * fix not building on unix * fix include paths * Remove code changes Will fix in another PR. * format pass remove 2 more included directories. remove commented out code add status to messages * comments and format surround include directories with quotes remove commented out code remove debug messages * Update CMakeLists.txt --------- Co-authored-by: David Markowitz <EmosewaMC@gmail.com> Co-authored-by: David Markowitz <39972741+EmosewaMC@users.noreply.github.com>
39 lines
1.1 KiB
C++
39 lines
1.1 KiB
C++
#ifndef __IACCOUNTS__H__
|
|
#define __IACCOUNTS__H__
|
|
|
|
#include <cstdint>
|
|
#include <optional>
|
|
#include <string>
|
|
#include <string_view>
|
|
|
|
enum class eGameMasterLevel : uint8_t;
|
|
|
|
class IAccounts {
|
|
public:
|
|
struct Info {
|
|
std::string bcryptPassword;
|
|
uint32_t id{};
|
|
uint32_t playKeyId{};
|
|
bool banned{};
|
|
bool locked{};
|
|
eGameMasterLevel maxGmLevel{};
|
|
};
|
|
|
|
// Get the account info for the given username.
|
|
virtual std::optional<IAccounts::Info> GetAccountInfo(const std::string_view username) = 0;
|
|
|
|
// Update the account's unmute time.
|
|
virtual void UpdateAccountUnmuteTime(const uint32_t accountId, const uint64_t timeToUnmute) = 0;
|
|
|
|
// Update the account's ban status.
|
|
virtual void UpdateAccountBan(const uint32_t accountId, const bool banned) = 0;
|
|
|
|
// Update the account's password.
|
|
virtual void UpdateAccountPassword(const uint32_t accountId, const std::string_view bcryptpassword) = 0;
|
|
|
|
// Add a new account to the database.
|
|
virtual void InsertNewAccount(const std::string_view username, const std::string_view bcryptpassword) = 0;
|
|
};
|
|
|
|
#endif //!__IACCOUNTS__H__
|