Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ++ b/src/server/authserver/Server/AuthSocket.h
- @@ -23,6 +23,59 @@
- #include "BigNumber.h"
- #include "RealmSocket.h"
- #include <ace/Singleton.h>
- #include <ace/Null_Mutex.h>
- #include <set>
- #include <string>
- #include <time.h> // time
- typedef struct IP
- {
- std::string Ip;
- time_t AddTime;
- } sIP;
- class LauncherChecker
- {
- friend class ACE_Singleton<LauncherChecker, ACE_Null_Mutex>;
- public:
- typedef std::set<sIP*> IpSet;
- LauncherChecker() : m_IpList() {};
- ~LauncherChecker() {};
- static LauncherChecker* instance() { return ACE_Singleton<LauncherChecker, ACE_Null_Mutex>::instance(); }
- void AddIp(sIP *Ip) { m_IpList.insert(Ip); }
- void DeleteIp(const std::string &Ip)
- {
- for(IpSet::iterator itr = m_IpList.begin(); itr != m_IpList.end(); ++itr)
- {
- if(Ip == (*itr)->Ip)
- {
- delete *itr;
- m_IpList.erase(itr);
- break;
- }
- }
- }
- bool CheckIp(const std::string &Ip) const
- {
- for(IpSet::const_iterator itr = m_IpList.begin(); itr != m_IpList.end(); ++itr)
- if(Ip == (*itr)->Ip)
- return true;
- return false;
- }
- IpSet GetIpList() const { return m_IpList; }
- private:
- IpSet m_IpList;
- };
- #define sLauncherChecker LauncherChecker::instance()
- enum RealmFlags
- {
- REALM_FLAG_NONE = 0x00,
- @@ -54,6 +107,7 @@ public:
- bool _HandleReconnectChallenge();
- bool _HandleReconnectProof();
- bool _HandleRealmList();
- bool _HandleLauncherValidation();
- //data transfer handle for patch
- bool _HandleXferResume();
Add Comment
Please, Sign In to add comment