server/game/src/banword.h

25 lines
556 B
C
Raw Normal View History

2022-03-05 12:44:06 +02:00
#ifndef BANWORD_MANAGER_H_
#define BANWORD_MANAGER_H_
#include <unordered_map>
2022-03-05 12:44:06 +02:00
class CBanwordManager : public singleton<CBanwordManager>
{
public:
CBanwordManager();
virtual ~CBanwordManager();
bool Initialize(TBanwordTable * p, WORD wSize);
bool Find(const char * c_pszString);
bool CheckString(const char * c_pszString, size_t _len);
void ConvertString(char * c_pszString, size_t _len);
protected:
typedef std::unordered_map<std::string, bool> TBanwordHashmap;
2022-03-05 12:44:06 +02:00
TBanwordHashmap m_hashmap_words;
};
#endif /* BANWORD_MANAGER_H_ */