Restructure repository to include all source folders
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>
This commit is contained in:
306
Server/RylServerProject/RylServerLibrary/Community/BanList.cpp
Normal file
306
Server/RylServerProject/RylServerLibrary/Community/BanList.cpp
Normal file
@@ -0,0 +1,306 @@
|
||||
#include "stdafx.h"
|
||||
#include "BanList.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
inline bool operator < (unsigned long dwCID, const BanInfo& rhs) { return dwCID < rhs.m_dwCID; }
|
||||
inline bool operator < (const BanInfo& lhs, unsigned long dwCID) { return lhs.m_dwCID < dwCID; }
|
||||
inline bool operator < (const BanInfo& lhs, const BanInfo& rhs) { return lhs.m_dwCID < rhs.m_dwCID; }
|
||||
|
||||
|
||||
CXRefBans& CXRefBans::GetInstance()
|
||||
{
|
||||
static CXRefBans xRefBans;
|
||||
return xRefBans;
|
||||
}
|
||||
|
||||
CBanList::CBanList(unsigned long dwOwnerCID, CXRefBans* lpXRefTable)
|
||||
: m_dwOwnerCID(dwOwnerCID), m_lpXRefTable(lpXRefTable)
|
||||
{
|
||||
}
|
||||
|
||||
CBanList::~CBanList()
|
||||
{
|
||||
Clear();
|
||||
}
|
||||
|
||||
void CBanList::Clear()
|
||||
{
|
||||
if(NULL != m_lpXRefTable)
|
||||
{
|
||||
for(BanList::iterator itr = m_banList.begin();
|
||||
itr != m_banList.end(); ++itr)
|
||||
{
|
||||
m_lpXRefTable->Remove(itr->m_XRefItr);
|
||||
}
|
||||
}
|
||||
m_banList.clear();
|
||||
}
|
||||
|
||||
bool CBanList::Add(unsigned long dwBanCID, const char* szCharacterName, unsigned long dwGID, unsigned short wClass, char cLevel, unsigned long dwServerID)
|
||||
{
|
||||
if(m_banList.size() < MAX_BAN_NUM)
|
||||
{
|
||||
BanList::iterator lbound = std::lower_bound(m_banList.begin(), m_banList.end(), dwBanCID);
|
||||
|
||||
Rebind rebind;
|
||||
|
||||
rebind.m_banInfo.m_dwCID = dwBanCID;
|
||||
rebind.m_banInfo.m_dwGID = dwGID;
|
||||
rebind.m_banInfo.m_wClass = wClass;
|
||||
rebind.m_banInfo.m_cLevel = cLevel;
|
||||
rebind.m_banInfo.m_dwServerID = dwServerID;
|
||||
strncpy(rebind.m_banInfo.m_szName, szCharacterName, BanInfo::MAX_NAME);
|
||||
|
||||
if(NULL != m_lpXRefTable)
|
||||
{
|
||||
rebind.m_XRefItr = m_lpXRefTable->Add(m_dwOwnerCID, dwBanCID);
|
||||
}
|
||||
|
||||
if(lbound == m_banList.end() || dwBanCID != lbound->m_banInfo.m_dwCID)
|
||||
{
|
||||
// CID<49><44> <20>ٸ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ѵ<EFBFBD>.
|
||||
m_banList.insert(lbound, rebind);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
// CID<49><44> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ѵ<EFBFBD>.
|
||||
*lbound = rebind;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
bool CBanList::Remove(unsigned long dwBanCID)
|
||||
{
|
||||
BanList::iterator finditr = std::lower_bound(m_banList.begin(), m_banList.end(), dwBanCID);
|
||||
|
||||
if(finditr != m_banList.end() && dwBanCID == finditr->m_banInfo.m_dwCID)
|
||||
{
|
||||
if(NULL != m_lpXRefTable)
|
||||
{
|
||||
m_lpXRefTable->Remove(finditr->m_XRefItr);
|
||||
}
|
||||
|
||||
m_banList.erase(finditr);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
void CBanList::GetCIDList(unsigned long* dwCID_In)
|
||||
{
|
||||
BanList::iterator first = m_banList.begin();
|
||||
BanList::iterator last = m_banList.end();
|
||||
|
||||
for(unsigned char cIndex = 0; first != last; ++first)
|
||||
{
|
||||
dwCID_In[cIndex] = (*first).GetCID();
|
||||
}
|
||||
}
|
||||
|
||||
CBanList::Rebind* CBanList::GetBan(unsigned long dwBanCID)
|
||||
{
|
||||
BanList::iterator finditr = std::lower_bound(m_banList.begin(), m_banList.end(), dwBanCID);
|
||||
|
||||
if(finditr != m_banList.end() && dwBanCID == finditr->m_banInfo.m_dwCID)
|
||||
{
|
||||
return &(*finditr);
|
||||
};
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
CBanList::Rebind* CBanList::GetBan(const char* szFriendName)
|
||||
{
|
||||
BanList::iterator first = m_banList.begin();
|
||||
BanList::iterator last = m_banList.end();
|
||||
|
||||
for(;first != last; ++first)
|
||||
{
|
||||
if(0 == strncmp(first->GetCharacterName(), szFriendName, FriendInfo::MAX_NAME))
|
||||
{
|
||||
return &(*first);
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
bool CBanList::IsBan(unsigned long dwBanCID, const char* szCharacterName)
|
||||
{
|
||||
BanList::iterator finditr = std::lower_bound(m_banList.begin(), m_banList.end(), dwBanCID);
|
||||
|
||||
if(finditr != m_banList.end() && dwBanCID == finditr->GetCID() &&
|
||||
0 == strncmp(szCharacterName, finditr->GetCharacterName(), BanInfo::MAX_NAME))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
// <20≯<EFBFBD><CCB8><EFBFBD><EFBFBD><EFBFBD> <20>ź<EFBFBD><C5BA><EFBFBD><EFBFBD><EFBFBD> CID<49><44> <20><><EFBFBD><EFBFBD><EFBFBD>Ѵ<EFBFBD>. 0<≯<EFBFBD> BanList<73><74> <20><EFBFBD> <20≯<EFBFBD><CCB8><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʴ´<CAB4>.
|
||||
unsigned long CBanList::GetBanCID(const char* szCharacterName)
|
||||
{
|
||||
BanList::iterator first = m_banList.begin();
|
||||
BanList::iterator last = m_banList.end();
|
||||
|
||||
for(;first != last; ++first)
|
||||
{
|
||||
if(0 == strncmp(first->GetCharacterName(), szCharacterName, BanInfo::MAX_NAME))
|
||||
{
|
||||
return first->GetCID();
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
const char* CBanList::GetBanName(unsigned long dwCID)
|
||||
{
|
||||
BanList::iterator finditr = std::lower_bound(m_banList.begin(), m_banList.end(), dwCID);
|
||||
|
||||
if(finditr != m_banList.end() && dwCID == finditr->GetCID())
|
||||
{
|
||||
return finditr->GetCharacterName();
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
bool CBanList::SerializeOut(char* szBuffer_Out, unsigned long& dwBufferSize_InOut) const
|
||||
{
|
||||
char* szBufferPos = szBuffer_Out;
|
||||
char* szBufferPastEnd = szBuffer_Out + dwBufferSize_InOut;
|
||||
|
||||
BanList::const_iterator first = m_banList.begin();
|
||||
BanList::const_iterator last = m_banList.end();
|
||||
|
||||
for(;szBufferPos + sizeof(BanInfo) <= szBufferPastEnd && first != last;
|
||||
szBufferPos += sizeof(BanInfo), ++first)
|
||||
{
|
||||
memcpy(szBufferPos, &first->m_banInfo, sizeof(BanInfo));
|
||||
}
|
||||
|
||||
dwBufferSize_InOut = static_cast<unsigned long>(szBufferPos - szBuffer_Out);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool CBanList::SerializeIn(const char* szBuffer_In, unsigned long dwBufferSize_In)
|
||||
{
|
||||
const char* szBufferPos = szBuffer_In;
|
||||
const char* szBufferPastEnd = szBuffer_In + dwBufferSize_In;
|
||||
|
||||
Rebind rebind;
|
||||
|
||||
for(;szBufferPos + sizeof(BanInfo) <= szBufferPastEnd;
|
||||
szBufferPos += sizeof(BanInfo))
|
||||
{
|
||||
unsigned long dwBanCID = reinterpret_cast<const BanInfo*>(szBufferPos)->m_dwCID;
|
||||
|
||||
BanList::iterator lbound = std::lower_bound(m_banList.begin(), m_banList.end(), dwBanCID);
|
||||
if(lbound == m_banList.end() || dwBanCID != lbound->m_banInfo.m_dwCID)
|
||||
{
|
||||
if(NULL != m_lpXRefTable)
|
||||
{
|
||||
rebind.m_XRefItr = m_lpXRefTable->Add(m_dwOwnerCID, dwBanCID);
|
||||
}
|
||||
|
||||
memcpy(&rebind.m_banInfo, szBufferPos, sizeof(BanInfo));
|
||||
m_banList.insert(lbound, rebind);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CBanList::SerializeOut(char* szBuffer_Out, char* szInfoBuffer_Out, unsigned long& dwBufferSize_InOut, unsigned long& dwInfoBufferSize_InOut) const
|
||||
{
|
||||
char* szBufferPos = szBuffer_Out;
|
||||
char* szBufferPastEnd = szBuffer_Out + dwBufferSize_InOut;
|
||||
char* szInfoBufferPos = szInfoBuffer_Out;
|
||||
char* szInfoBufferPastEnd = szInfoBuffer_Out + dwInfoBufferSize_InOut;
|
||||
|
||||
BanList::const_iterator first = m_banList.begin();
|
||||
BanList::const_iterator last = m_banList.end();
|
||||
|
||||
for(;szBufferPos + sizeof(DBBan) <= szBufferPastEnd && first != last;
|
||||
szBufferPos += sizeof(DBBan), ++first)
|
||||
{
|
||||
DBBan sDBBan;
|
||||
memset(&sDBBan, 0, sizeof(DBBan));
|
||||
sDBBan.m_dwCID = first->m_banInfo.m_dwCID;
|
||||
memcpy(sDBBan.m_szName, first->m_banInfo.m_szName, DBBan::MAX_NAME);
|
||||
memcpy(szBufferPos, &sDBBan, sizeof(DBFriend));
|
||||
}
|
||||
|
||||
dwBufferSize_InOut = static_cast<unsigned long>(szBufferPos - szBuffer_Out);
|
||||
|
||||
first = m_banList.begin();
|
||||
last = m_banList.end();
|
||||
|
||||
for(;szInfoBufferPos + sizeof(DBBanInfo) <= szInfoBufferPastEnd && first != last;
|
||||
szInfoBufferPos += sizeof(DBBanInfo), ++first)
|
||||
{
|
||||
DBBanInfo sDBBanInfo;
|
||||
memset(&sDBBanInfo, 0, sizeof(DBBanInfo));
|
||||
sDBBanInfo.m_cLevel = first->m_banInfo.m_cLevel;
|
||||
sDBBanInfo.m_dwGID = first->m_banInfo.m_dwGID;
|
||||
sDBBanInfo.m_wClass = first->m_banInfo.m_wClass;
|
||||
memcpy(szInfoBufferPos, &sDBBanInfo, sizeof(DBBanInfo));
|
||||
}
|
||||
|
||||
dwInfoBufferSize_InOut = static_cast<unsigned long>(szInfoBufferPos - szInfoBuffer_Out);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CBanList::SerializeIn(const char* szBuffer_In, const char* szInfo_In, unsigned long dwBufferSize_In, unsigned long dwInfoBufferSize_In)
|
||||
{
|
||||
const char* szBufferPos = szBuffer_In;
|
||||
const char* szBufferPastEnd = szBuffer_In + dwBufferSize_In;
|
||||
const char* szBufferInfoPos = szInfo_In;
|
||||
const char* szBufferInfoPastEnd = szInfo_In + dwInfoBufferSize_In;
|
||||
|
||||
Rebind rebind;
|
||||
|
||||
for(;szBufferPos + sizeof(DBBan) <= szBufferPastEnd; szBufferPos += sizeof(DBBan), szBufferInfoPos += sizeof(DBBanInfo))
|
||||
{
|
||||
BanInfo banInfo;
|
||||
|
||||
memcpy(&banInfo, szBufferPos, 4);
|
||||
|
||||
memset(banInfo.m_szName, 0, DBFriend::MAX_NAME);
|
||||
memcpy(banInfo.m_szName, szBufferPos+4, DBFriend::MAX_NAME);
|
||||
|
||||
memcpy(&banInfo.m_dwGID, szBufferInfoPos, 7);
|
||||
|
||||
unsigned long dwBanCID = reinterpret_cast<const BanInfo*>(szBufferPos)->m_dwCID;
|
||||
|
||||
BanList::iterator lbound = std::lower_bound(m_banList.begin(), m_banList.end(), dwBanCID);
|
||||
|
||||
if(lbound == m_banList.end() || dwBanCID != lbound->m_banInfo.m_dwCID)
|
||||
{
|
||||
memcpy(&rebind.m_banInfo, &banInfo, sizeof(BanInfo));
|
||||
m_banList.insert(lbound, rebind);
|
||||
|
||||
if(NULL != m_lpXRefTable)
|
||||
{
|
||||
rebind.m_XRefItr = m_lpXRefTable->Add(m_dwOwnerCID, dwBanCID);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
139
Server/RylServerProject/RylServerLibrary/Community/BanList.h
Normal file
139
Server/RylServerProject/RylServerLibrary/Community/BanList.h
Normal file
@@ -0,0 +1,139 @@
|
||||
#ifndef _BAN_LIST_H_
|
||||
#define _BAN_LIST_H_
|
||||
|
||||
#include <Network/Packet/PacketStruct/FriendPacket.h>
|
||||
|
||||
#include <list>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <algorithm>
|
||||
#include <map>
|
||||
|
||||
class CXRefBans
|
||||
{
|
||||
public:
|
||||
|
||||
static CXRefBans& GetInstance();
|
||||
|
||||
typedef std::multimap<unsigned long, unsigned long> XRefTable;
|
||||
|
||||
CXRefBans() { }
|
||||
~CXRefBans() { }
|
||||
|
||||
// FnProcess<73><73> bool operator() (CXRefFriends::XRefTable::value_type&) <20>Լ<EFBFBD><D4BC><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ü(Ŭ<><C5AC><EFBFBD><EFBFBD>)<29>̴<EFBFBD>.
|
||||
template<typename FnProcess>
|
||||
void Process(unsigned long dwFriendID, FnProcess fnProcess)
|
||||
{
|
||||
// dwFriendID<49><44> ģ<><C4A3><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> CID<49><44> <20><><EFBFBD>ؼ<EFBFBD> <20>۾<EFBFBD><DBBE>Ѵ<EFBFBD>.
|
||||
std::pair<XRefTable::iterator, XRefTable::iterator> result =
|
||||
m_XRefTable.equal_range(dwFriendID);
|
||||
|
||||
std::for_each(result.first, result.second, fnProcess);
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
XRefTable::iterator Add(unsigned long dwOwnerID, unsigned long dwFriendID)
|
||||
{ return m_XRefTable.insert(std::make_pair(dwFriendID, dwOwnerID)); }
|
||||
|
||||
void Remove(XRefTable::iterator erasePos) { m_XRefTable.erase(erasePos); }
|
||||
|
||||
XRefTable m_XRefTable;
|
||||
|
||||
// Add, Remove Method<6F><64> <20><><EFBFBD>߱<EFBFBD> <20><><EFBFBD>ؼ<EFBFBD> friend<6E><64> <20><><EFBFBD><EFBFBD>.
|
||||
friend class CBanList;
|
||||
};
|
||||
|
||||
class CBanList
|
||||
{
|
||||
public:
|
||||
|
||||
class Rebind
|
||||
{
|
||||
private:
|
||||
|
||||
CXRefBans::XRefTable::iterator m_XRefItr;
|
||||
BanInfo m_banInfo;
|
||||
|
||||
Rebind() : m_XRefItr() {}
|
||||
Rebind(const CXRefBans::XRefTable::iterator& XRefItr, const BanInfo& banInfo)
|
||||
: m_XRefItr(XRefItr), m_banInfo(banInfo) { }
|
||||
|
||||
public:
|
||||
|
||||
inline unsigned long GetCID() { return m_banInfo.m_dwCID; }
|
||||
inline const char* GetCharacterName() { return m_banInfo.m_szName; }
|
||||
|
||||
inline bool IsBan(const char* szName) { return 0 == strncmp(szName, m_banInfo.m_szName, FriendInfo::MAX_NAME); }
|
||||
|
||||
inline void UpdateLevel(char cLevel) { m_banInfo.m_cLevel = cLevel; }
|
||||
inline void UpdateGID(unsigned long dwGID) { m_banInfo.m_dwGID = dwGID; }
|
||||
inline void UpdateServerID(unsigned long dwServerID) { m_banInfo.m_dwServerID = dwServerID; }
|
||||
inline void UpdateClass(unsigned short wClass) { m_banInfo.m_wClass = wClass; }
|
||||
|
||||
inline char GetLevel() { return m_banInfo.m_cLevel; }
|
||||
inline unsigned long GetGID() { return m_banInfo.m_dwGID; }
|
||||
inline unsigned short GetClass() { return m_banInfo.m_wClass; }
|
||||
inline unsigned long GetServerID() { return m_banInfo.m_dwServerID; }
|
||||
|
||||
inline void InitializeBanInfo(unsigned long dwServerID, unsigned long dwGID, unsigned short wClass, char cLevel)
|
||||
{
|
||||
m_banInfo.m_dwServerID = dwServerID;
|
||||
m_banInfo.m_dwGID = (m_banInfo.m_dwGID!=dwGID) ? dwGID : m_banInfo.m_dwGID;
|
||||
m_banInfo.m_cLevel = (m_banInfo.m_cLevel!=cLevel) ? cLevel : m_banInfo.m_cLevel;
|
||||
m_banInfo.m_wClass = (m_banInfo.m_wClass!=wClass) ? wClass : m_banInfo.m_wClass;
|
||||
}
|
||||
|
||||
friend class CBanList;
|
||||
|
||||
friend inline static bool operator < (unsigned long dwCID, const Rebind& rhs) { return dwCID < rhs.m_banInfo.m_dwCID; }
|
||||
friend inline static bool operator < (const Rebind& lhs, unsigned long dwCID) { return lhs.m_banInfo.m_dwCID < dwCID; }
|
||||
friend inline static bool operator < (const Rebind& lhs, const Rebind& rhs) { return lhs.m_banInfo.m_dwCID < rhs.m_banInfo.m_dwCID; }
|
||||
};
|
||||
|
||||
enum { MAX_BAN_NUM = 100 };
|
||||
|
||||
CBanList(unsigned long dwOwnerCID, CXRefBans* lpXRefTable = NULL);
|
||||
~CBanList();
|
||||
|
||||
void Clear();
|
||||
|
||||
bool Add(unsigned long dwBanCID, const char* szCharacterName, unsigned long dwGID, unsigned short wClass, char cLevel, unsigned long dwServerID);
|
||||
bool Remove(unsigned long dwBanCID);
|
||||
bool IsBan(unsigned long dwBanCID, const char* szCharacterName);
|
||||
|
||||
// <20≯<EFBFBD><CCB8><EFBFBD><EFBFBD><EFBFBD> <20>ź<EFBFBD><C5BA><EFBFBD><EFBFBD><EFBFBD> CID<49><44> <20><><EFBFBD><EFBFBD><EFBFBD>Ѵ<EFBFBD>. 0<≯<EFBFBD> BanList<73><74> <20><EFBFBD> <20≯<EFBFBD><CCB8><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʴ´<CAB4>.
|
||||
unsigned long GetBanCID(const char* szCharacterName);
|
||||
const char* GetBanName(unsigned long dwCID);
|
||||
|
||||
CBanList::Rebind* GetBan(const char* szFriendName);
|
||||
CBanList::Rebind* GetBan(unsigned long dwBanCID);
|
||||
|
||||
void GetCIDList(unsigned long* dwCID_In);
|
||||
|
||||
bool SerializeIn(const char* szBuffer_In, unsigned long dwBufferSize_In);
|
||||
bool SerializeOut(char* szBuffer_Out, unsigned long& dwBufferSize_InOut) const;
|
||||
|
||||
bool SerializeOut(char* szBuffer_Out, char* szInfoBuffer_Out, unsigned long& dwBufferSize_InOut, unsigned long& dwInfoBufferSize_InOut) const;
|
||||
bool SerializeIn(const char* szBuffer_In, const char* szInfo_In, unsigned long dwBufferSize_In, unsigned long dwInfoBufferSize_In);
|
||||
|
||||
unsigned long GetBanNum() const { return static_cast<unsigned long>(m_banList.size()); }
|
||||
|
||||
// FnProcess<73><73> bool operator() (const BanInfo&) <20>Լ<EFBFBD><D4BC><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ü(Ŭ<><C5AC><EFBFBD><EFBFBD>)<29>̴<EFBFBD>.
|
||||
template<typename FnProcess>
|
||||
void Process(FnProcess fnProcess)
|
||||
{
|
||||
std::for_each(m_banList.begin(), m_banList.end(), fnProcess);
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
struct Flags;
|
||||
typedef std::vector<Rebind> BanList;
|
||||
|
||||
BanList m_banList;
|
||||
CXRefBans* m_lpXRefTable;
|
||||
unsigned long m_dwOwnerCID;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,295 @@
|
||||
#include "stdafx.h"
|
||||
#include "FriendList.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
CXRefFriends& CXRefFriends::GetInstance()
|
||||
{
|
||||
static CXRefFriends xRefFriends;
|
||||
return xRefFriends;
|
||||
}
|
||||
|
||||
class CFindFriendCID
|
||||
{
|
||||
public:
|
||||
explicit CFindFriendCID(unsigned long dwFriendCID) : m_dwFriendCID(dwFriendCID) { }
|
||||
bool operator() (const CFriendList::Rebind& rebind) const { return (m_dwFriendCID == rebind.m_friendInfo.m_dwCID); }
|
||||
private:
|
||||
unsigned long m_dwFriendCID;
|
||||
};
|
||||
|
||||
|
||||
CFriendList::CFriendList(unsigned long dwOwnerCID, CXRefFriends* lpXRefTable)
|
||||
: m_dwOwnerCID(dwOwnerCID), m_lpXRefTable(lpXRefTable)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
CFriendList::~CFriendList()
|
||||
{
|
||||
Clear();
|
||||
}
|
||||
|
||||
|
||||
|
||||
void CFriendList::Clear()
|
||||
{
|
||||
if(NULL != m_lpXRefTable)
|
||||
{
|
||||
for(FriendList::iterator itr = m_friendList.begin();
|
||||
itr != m_friendList.end(); ++itr)
|
||||
{
|
||||
m_lpXRefTable->Remove(itr->m_XRefItr);
|
||||
}
|
||||
}
|
||||
|
||||
m_friendList.clear();
|
||||
}
|
||||
|
||||
|
||||
bool CFriendList::Add(unsigned long dwFriendCID, const char* szCharacterName, unsigned long dwGID, unsigned short wClass, char cLevel, unsigned long dwServerID)
|
||||
{
|
||||
if(m_friendList.size() < MAX_FRIENDS_NUM)
|
||||
{
|
||||
FriendList::iterator lbound = std::lower_bound(m_friendList.begin(), m_friendList.end(), dwFriendCID);
|
||||
|
||||
Rebind rebind;
|
||||
|
||||
if(NULL != m_lpXRefTable)
|
||||
{
|
||||
rebind.m_XRefItr = m_lpXRefTable->Add(m_dwOwnerCID, dwFriendCID);
|
||||
}
|
||||
|
||||
rebind.m_friendInfo.m_dwCID = dwFriendCID;
|
||||
rebind.m_friendInfo.m_dwGID = dwGID;
|
||||
rebind.m_friendInfo.m_wClass = wClass;
|
||||
rebind.m_friendInfo.m_cLevel = cLevel;
|
||||
rebind.m_friendInfo.m_dwServerID = dwServerID;
|
||||
|
||||
strncpy(rebind.m_friendInfo.m_szName, szCharacterName, FriendInfo::MAX_NAME);
|
||||
rebind.m_friendInfo.SetLoginStatus(true);
|
||||
|
||||
if(lbound == m_friendList.end() || dwFriendCID != lbound->m_friendInfo.m_dwCID)
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD>쿡<EFBFBD><ECBFA1> <20><><EFBFBD><EFBFBD>.
|
||||
m_friendList.insert(lbound, rebind);
|
||||
}
|
||||
else
|
||||
{
|
||||
// CID<49><44> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.(<28≯<EFBFBD><CCB8><EFBFBD> <20>ٸ<EFBFBD> <20><><EFBFBD><EFBFBD> <20>ִ<EFBFBD>..)
|
||||
*lbound = rebind;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
bool CFriendList::Remove(unsigned long dwFriendCID)
|
||||
{
|
||||
FriendList::iterator finditr = std::lower_bound(m_friendList.begin(), m_friendList.end(), dwFriendCID);
|
||||
|
||||
if(finditr != m_friendList.end() && dwFriendCID == finditr->m_friendInfo.m_dwCID)
|
||||
{
|
||||
if(NULL != m_lpXRefTable)
|
||||
{
|
||||
m_lpXRefTable->Remove(finditr->m_XRefItr);
|
||||
}
|
||||
|
||||
m_friendList.erase(finditr);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
CFriendList::Rebind* CFriendList::GetFriend(unsigned long dwFriendCID)
|
||||
{
|
||||
FriendList::iterator finditr = std::lower_bound(m_friendList.begin(), m_friendList.end(), dwFriendCID);
|
||||
|
||||
if(finditr != m_friendList.end() && dwFriendCID == finditr->m_friendInfo.m_dwCID)
|
||||
{
|
||||
return &(*finditr);
|
||||
};
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void CFriendList::GetCIDList(unsigned long* dwCID_In)
|
||||
{
|
||||
FriendList::iterator first = m_friendList.begin();
|
||||
FriendList::iterator last = m_friendList.end();
|
||||
|
||||
for(unsigned char cIndex = 0; first != last; ++first)
|
||||
{
|
||||
dwCID_In[cIndex] = (*first).GetCID();
|
||||
}
|
||||
}
|
||||
|
||||
CFriendList::Rebind* CFriendList::GetFriend(const char* szFriendName)
|
||||
{
|
||||
FriendList::iterator first = m_friendList.begin();
|
||||
FriendList::iterator last = m_friendList.end();
|
||||
|
||||
for(;first != last; ++first)
|
||||
{
|
||||
if(0 == strncmp(first->GetCharacterName(), szFriendName, FriendInfo::MAX_NAME))
|
||||
{
|
||||
return &(*first);
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
bool CFriendList::SerializeOut(char* szBuffer_Out, unsigned long& dwBufferSize_InOut) const
|
||||
{
|
||||
char* szBufferPos = szBuffer_Out;
|
||||
char* szBufferPastEnd = szBuffer_Out + dwBufferSize_InOut;
|
||||
|
||||
FriendList::const_iterator first = m_friendList.begin();
|
||||
FriendList::const_iterator last = m_friendList.end();
|
||||
|
||||
for(;szBufferPos + sizeof(FriendInfo) <= szBufferPastEnd && first != last;
|
||||
szBufferPos += sizeof(FriendInfo), ++first)
|
||||
{
|
||||
memcpy(szBufferPos, &first->m_friendInfo, sizeof(FriendInfo));
|
||||
}
|
||||
|
||||
dwBufferSize_InOut = static_cast<unsigned long>(szBufferPos - szBuffer_Out);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool CFriendList::SerializeIn(const char* szBuffer_In, unsigned long dwBufferSize_In)
|
||||
{
|
||||
const char* szBufferPos = szBuffer_In;
|
||||
const char* szBufferPastEnd = szBuffer_In + dwBufferSize_In;
|
||||
|
||||
Rebind rebind;
|
||||
|
||||
for(;szBufferPos + sizeof(FriendInfo) <= szBufferPastEnd;
|
||||
szBufferPos += sizeof(FriendInfo))
|
||||
{
|
||||
const FriendInfo* lpFriendInfo = reinterpret_cast<const FriendInfo*>(szBufferPos);
|
||||
|
||||
unsigned long dwFriendCID = lpFriendInfo->m_dwCID;
|
||||
|
||||
FriendList::iterator lbound = std::lower_bound(m_friendList.begin(), m_friendList.end(), dwFriendCID);
|
||||
if(lbound == m_friendList.end() || dwFriendCID != lbound->m_friendInfo.m_dwCID)
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD>Ͱ<EFBFBD> <20><><EFBFBD><EFBFBD>. <20>űԷ<C5B1> <20>߰<EFBFBD><DFB0>Ѵ<EFBFBD>.
|
||||
memcpy(&rebind.m_friendInfo, szBufferPos, sizeof(FriendInfo));
|
||||
|
||||
if(NULL != m_lpXRefTable)
|
||||
{
|
||||
rebind.m_XRefItr = m_lpXRefTable->Add(m_dwOwnerCID, dwFriendCID);
|
||||
}
|
||||
|
||||
m_friendList.insert(lbound, rebind);
|
||||
}
|
||||
else if(0 == strncmp(lbound->m_friendInfo.m_szName, lpFriendInfo->m_szName, FriendInfo::MAX_NAME))
|
||||
{
|
||||
// <20>̹<EFBFBD> CID/Name<6D><65> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ͱ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD> <20>÷<EFBFBD><C3B7><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD>Ѵ<EFBFBD>.
|
||||
lbound->m_friendInfo.m_dwStatusFlag = lpFriendInfo->m_dwStatusFlag;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CFriendList::SerializeOut(char* szBuffer_Out, char* szInfoBuffer_Out, unsigned long& dwBufferSize_InOut, unsigned long& dwInfoBufferSize_InOut) const
|
||||
{
|
||||
char* szBufferPos = szBuffer_Out;
|
||||
char* szBufferPastEnd = szBuffer_Out + dwBufferSize_InOut;
|
||||
char* szInfoBufferPos = szInfoBuffer_Out;
|
||||
char* szInfoBufferPastEnd = szInfoBuffer_Out + dwInfoBufferSize_InOut;
|
||||
|
||||
FriendList::const_iterator first = m_friendList.begin();
|
||||
FriendList::const_iterator last = m_friendList.end();
|
||||
|
||||
for(;szBufferPos + sizeof(DBFriend) <= szBufferPastEnd && first != last;
|
||||
szBufferPos += sizeof(DBFriend), ++first)
|
||||
{
|
||||
DBFriend sDBFriend;
|
||||
memset(&sDBFriend, 0, sizeof(DBFriend));
|
||||
sDBFriend.m_dwCID = first->m_friendInfo.m_dwCID;
|
||||
sDBFriend.m_dwStatusFlag = first->m_friendInfo.m_dwServerID;
|
||||
memcpy(sDBFriend.m_szName, first->m_friendInfo.m_szName, DBFriend::MAX_NAME);
|
||||
|
||||
memcpy(szBufferPos, &sDBFriend, sizeof(DBFriend));
|
||||
}
|
||||
|
||||
dwBufferSize_InOut = static_cast<unsigned long>(szBufferPos - szBuffer_Out);
|
||||
|
||||
first = m_friendList.begin();
|
||||
last = m_friendList.end();
|
||||
|
||||
for(;szInfoBufferPos + sizeof(DBFriendInfo) <= szInfoBufferPastEnd && first != last;
|
||||
szInfoBufferPos += sizeof(DBFriendInfo), ++first)
|
||||
{
|
||||
DBFriendInfo sDBFriendInfo;
|
||||
memset(&sDBFriendInfo, 0, sizeof(DBFriendInfo));
|
||||
sDBFriendInfo.m_cLevel = first->m_friendInfo.m_cLevel;
|
||||
sDBFriendInfo.m_dwGID = first->m_friendInfo.m_dwGID;
|
||||
sDBFriendInfo.m_wClass = first->m_friendInfo.m_wClass;
|
||||
memcpy(szInfoBufferPos, &sDBFriendInfo, sizeof(DBFriendInfo));
|
||||
}
|
||||
|
||||
dwInfoBufferSize_InOut = static_cast<unsigned long>(szInfoBufferPos - szInfoBuffer_Out);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool CFriendList::SerializeIn(const char* szBuffer_In, const char* szInfo_In, unsigned long dwBufferSize_In, unsigned long dwInfoBufferSize_In)
|
||||
{
|
||||
const char* szBufferPos = szBuffer_In;
|
||||
const char* szBufferPastEnd = szBuffer_In + dwBufferSize_In;
|
||||
const char* szBufferInfoPos = szInfo_In;
|
||||
const char* szBufferInfoPastEnd = szInfo_In + dwInfoBufferSize_In;
|
||||
|
||||
Rebind rebind;
|
||||
|
||||
for(;szBufferPos + sizeof(DBFriend) <= szBufferPastEnd; szBufferPos += sizeof(DBFriend), szBufferInfoPos += sizeof(DBFriendInfo))
|
||||
{
|
||||
FriendInfo sFriendInfo;
|
||||
|
||||
memcpy(&sFriendInfo, szBufferPos, 8);
|
||||
|
||||
memset(sFriendInfo.m_szName, 0, DBFriend::MAX_NAME);
|
||||
memcpy(sFriendInfo.m_szName, szBufferPos+8, DBFriend::MAX_NAME);
|
||||
|
||||
memcpy(&sFriendInfo.m_dwGID, szBufferInfoPos, 7);
|
||||
|
||||
unsigned long dwFriendCID = sFriendInfo.m_dwCID;
|
||||
|
||||
FriendList::iterator lbound = std::lower_bound(m_friendList.begin(), m_friendList.end(), dwFriendCID);
|
||||
|
||||
if(lbound == m_friendList.end() || dwFriendCID != lbound->m_friendInfo.m_dwCID)
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD>Ͱ<EFBFBD> <20><><EFBFBD><EFBFBD>. <20>űԷ<C5B1> <20>߰<EFBFBD><DFB0>Ѵ<EFBFBD>.
|
||||
memcpy(&rebind.m_friendInfo, &sFriendInfo, sizeof(FriendInfo));
|
||||
|
||||
if(NULL != m_lpXRefTable)
|
||||
{
|
||||
rebind.m_XRefItr = m_lpXRefTable->Add(m_dwOwnerCID, dwFriendCID);
|
||||
}
|
||||
|
||||
m_friendList.insert(lbound, rebind);
|
||||
|
||||
}
|
||||
else if(0 == strncmp(lbound->m_friendInfo.m_szName, sFriendInfo.m_szName, FriendInfo::MAX_NAME))
|
||||
{
|
||||
// <20>̹<EFBFBD> CID/Name<6D><65> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ͱ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD> <20>÷<EFBFBD><C3B7><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD>Ѵ<EFBFBD>.
|
||||
lbound->m_friendInfo.m_dwStatusFlag = sFriendInfo.m_dwStatusFlag;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
146
Server/RylServerProject/RylServerLibrary/Community/FriendList.h
Normal file
146
Server/RylServerProject/RylServerLibrary/Community/FriendList.h
Normal file
@@ -0,0 +1,146 @@
|
||||
#ifndef _FRIEND_LIST_H_
|
||||
#define _FRIEND_LIST_H_
|
||||
|
||||
#include <Network/Packet/PacketStruct/FriendPacket.h>
|
||||
|
||||
#include <map>
|
||||
#include <list>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <algorithm>
|
||||
|
||||
|
||||
class CXRefFriends
|
||||
{
|
||||
public:
|
||||
|
||||
static CXRefFriends& GetInstance();
|
||||
|
||||
typedef std::multimap<unsigned long, unsigned long> XRefTable;
|
||||
|
||||
CXRefFriends() { }
|
||||
~CXRefFriends() { }
|
||||
|
||||
// FnProcess<73><73> bool operator() (CXRefFriends::XRefTable::value_type&) <20>Լ<EFBFBD><D4BC><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ü(Ŭ<><C5AC><EFBFBD><EFBFBD>)<29>̴<EFBFBD>.
|
||||
template<typename FnProcess>
|
||||
void Process(unsigned long dwFriendID, FnProcess fnProcess)
|
||||
{
|
||||
// dwFriendID<49><44> ģ<><C4A3><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> CID<49><44> <20><><EFBFBD>ؼ<EFBFBD> <20>۾<EFBFBD><DBBE>Ѵ<EFBFBD>.
|
||||
std::pair<XRefTable::iterator, XRefTable::iterator> result =
|
||||
m_XRefTable.equal_range(dwFriendID);
|
||||
|
||||
std::for_each(result.first, result.second, fnProcess);
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
XRefTable::iterator Add(unsigned long dwOwnerID, unsigned long dwFriendID)
|
||||
{ return m_XRefTable.insert(std::make_pair(dwFriendID, dwOwnerID)); }
|
||||
|
||||
void Remove(XRefTable::iterator erasePos) { m_XRefTable.erase(erasePos); }
|
||||
|
||||
XRefTable m_XRefTable;
|
||||
|
||||
// Add, Remove Method<6F><64> <20><><EFBFBD>߱<EFBFBD> <20><><EFBFBD>ؼ<EFBFBD> friend<6E><64> <20><><EFBFBD><EFBFBD>.
|
||||
friend class CFriendList;
|
||||
};
|
||||
|
||||
|
||||
class CFriendList
|
||||
{
|
||||
public:
|
||||
|
||||
enum { MAX_FRIENDS_NUM = 100 };
|
||||
|
||||
class Rebind
|
||||
{
|
||||
private:
|
||||
|
||||
CXRefFriends::XRefTable::iterator m_XRefItr;
|
||||
FriendInfo m_friendInfo;
|
||||
|
||||
Rebind() : m_XRefItr() { }
|
||||
Rebind(const CXRefFriends::XRefTable::iterator& XRefItr, const FriendInfo& friendInfo)
|
||||
: m_XRefItr(XRefItr), m_friendInfo(friendInfo) { }
|
||||
|
||||
public:
|
||||
|
||||
inline unsigned long GetCID() { return m_friendInfo.m_dwCID; }
|
||||
inline unsigned long GetGroup() { return m_friendInfo.GetGroup(); }
|
||||
inline bool IsLogined() { return m_friendInfo.IsLogined(); }
|
||||
inline const char* GetCharacterName() { return m_friendInfo.m_szName; }
|
||||
|
||||
inline bool IsFriend(const char* szName) { return 0 == strncmp(szName, m_friendInfo.m_szName, FriendInfo::MAX_NAME); }
|
||||
inline bool SetGroup(unsigned long dwGroup) { return m_friendInfo.SetGroup(dwGroup); }
|
||||
inline void SetLoginStatus(bool bLogin) { m_friendInfo.SetLoginStatus(bLogin); }
|
||||
|
||||
inline void UpdateLevel(char cLevel) { m_friendInfo.m_cLevel = cLevel; }
|
||||
inline void UpdateGID(unsigned long dwGID) { m_friendInfo.m_dwGID = dwGID; }
|
||||
inline void UpdateServerID(unsigned long dwServerID) { m_friendInfo.m_dwServerID = dwServerID; }
|
||||
inline void UpdateClass(unsigned short wClass) { m_friendInfo.m_wClass = wClass; }
|
||||
|
||||
inline char GetLevel() { return m_friendInfo.m_cLevel; }
|
||||
inline unsigned long GetGID() { return m_friendInfo.m_dwGID; }
|
||||
inline unsigned short GetClass() { return m_friendInfo.m_wClass; }
|
||||
inline unsigned long GetServerID() { return m_friendInfo.m_dwServerID; }
|
||||
|
||||
inline void InitializeFriendInfo(unsigned long dwServerID, unsigned long dwGID, unsigned short wClass, char cLevel)
|
||||
{
|
||||
m_friendInfo.m_dwServerID = dwServerID;
|
||||
m_friendInfo.m_dwGID = (m_friendInfo.m_dwGID!=dwGID) ? dwGID : m_friendInfo.m_dwGID;
|
||||
m_friendInfo.m_cLevel = (m_friendInfo.m_cLevel!=cLevel) ? cLevel : m_friendInfo.m_cLevel;
|
||||
m_friendInfo.m_wClass = (m_friendInfo.m_wClass!=wClass) ? wClass : m_friendInfo.m_wClass;
|
||||
}
|
||||
|
||||
friend class CFriendList;
|
||||
friend class CFindFriendCID;
|
||||
|
||||
friend inline static bool operator < (unsigned long dwCID, const Rebind& rhs) { return dwCID < rhs.m_friendInfo.m_dwCID; }
|
||||
friend inline static bool operator < (const Rebind& lhs, unsigned long dwCID) { return lhs.m_friendInfo.m_dwCID < dwCID; }
|
||||
friend inline static bool operator < (const Rebind& lhs, const Rebind& rhs) { return lhs.m_friendInfo.m_dwCID < rhs.m_friendInfo.m_dwCID; }
|
||||
};
|
||||
|
||||
typedef std::vector<Rebind> FriendList;
|
||||
|
||||
CFriendList(unsigned long dwOwnerCID, CXRefFriends* lpXRefTable = NULL);
|
||||
~CFriendList();
|
||||
|
||||
void Clear();
|
||||
|
||||
bool Add(unsigned long dwFriendCID, const char* szCharacterName, unsigned long dwGID, unsigned short wClass, char cLevel, unsigned long dwServerID);
|
||||
bool Remove(unsigned long dwFriendCID);
|
||||
|
||||
// CID<49><44> <20><><EFBFBD>ٰ<EFBFBD>, <20≯<EFBFBD><CCB8><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD>. <20>ݵ<EFBFBD><DDB5><EFBFBD> Ȯ<><C8AE><EFBFBD><EFBFBD> <20><>.
|
||||
Rebind* GetFriend(unsigned long dwFriendCID);
|
||||
Rebind* GetFriend(const char* szFriendName);
|
||||
|
||||
bool SerializeIn(const char* szBuffer_In, unsigned long dwBufferSize_In);
|
||||
bool SerializeOut(char* szBuffer_Out, unsigned long& dwBufferSize_InOut) const;
|
||||
|
||||
void GetCIDList(unsigned long* dwCID_In);
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> //
|
||||
bool SerializeOut(char* szBuffer_Out, char* szInfoBuffer_Out, unsigned long& dwBufferSize_InOut, unsigned long& dwInfoBufferSize_InOut) const;
|
||||
bool SerializeIn(const char* szBuffer_In, const char* szInfo_In, unsigned long dwBufferSize_In, unsigned long dwInfoBufferSize_In);
|
||||
|
||||
unsigned long GetFriendNum() const { return static_cast<unsigned long>(m_friendList.size()); }
|
||||
|
||||
// FnProcess<73><73> bool operator() (CFriendList::Rebind&) <20>Լ<EFBFBD><D4BC><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ü(Ŭ<><C5AC><EFBFBD><EFBFBD>)<29>̴<EFBFBD>.
|
||||
template<typename FnProcess>
|
||||
void Process(FnProcess fnProcess)
|
||||
{
|
||||
std::for_each(m_friendList.begin(), m_friendList.end(), fnProcess);
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
struct Flags;
|
||||
|
||||
unsigned long m_dwOwnerCID; // XRef<65><66><EFBFBD>Կ<EFBFBD>.
|
||||
CXRefFriends* m_lpXRefTable; // XRefTable<6C><65><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (NULL<4C≯<EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><>)
|
||||
FriendList m_friendList;
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user