Move git root from Client/ to src/ to track all source code: - Client: Game client source (moved to Client/Client/) - Server: Game server source - GameTools: Development tools - CryptoSource: Encryption utilities - database: Database scripts - Script: Game scripts - rylCoder_16.02.2008_src: Legacy coder tools - GMFont, Game: Additional resources 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
43 lines
987 B
C++
43 lines
987 B
C++
#ifndef _GAMA_RYL_MASTER_PASSWORD_H_
|
|
#define _GAMA_RYL_MASTER_PASSWORD_H_
|
|
|
|
#include <Thread/Lock.h>
|
|
#include <Pattern/Singleton.h>
|
|
|
|
#include <vector>
|
|
|
|
// forward decl.
|
|
struct sockaddr_in;
|
|
|
|
class CMasterPassword : public CStaticSingleton<CMasterPassword>
|
|
{
|
|
public:
|
|
|
|
enum
|
|
{
|
|
// edith 2008.03.17 ID,PASS ±æÀÌÁ¶Á¤
|
|
MAX_MASTERPASS = 36
|
|
};
|
|
|
|
CMasterPassword();
|
|
~CMasterPassword();
|
|
|
|
bool LoadMasterPassword(const char* szTextFileName = "./Script/Server/masterpass.txt");
|
|
bool CheckMasterPassword(const char* szUserID, const char* szPassword, const sockaddr_in& peerAddr);
|
|
|
|
private:
|
|
|
|
void Init();
|
|
void Process(const char* szCommand, const char* szValue);
|
|
|
|
typedef CCSLock PasswordLock;
|
|
typedef std::vector<unsigned long> AddressList;
|
|
|
|
PasswordLock m_Lock;
|
|
CACHE_PAD(PasswordLockPad, sizeof(PasswordLock));
|
|
|
|
AddressList m_AddressList;
|
|
char m_szMasterPassword[MAX_MASTERPASS];
|
|
};
|
|
|
|
#endif |