forked from metin2/server
25 lines
556 B
C++
25 lines
556 B
C++
|
|
#ifndef BANWORD_MANAGER_H_
|
|
#define BANWORD_MANAGER_H_
|
|
|
|
#include <unordered_map>
|
|
|
|
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;
|
|
TBanwordHashmap m_hashmap_words;
|
|
};
|
|
|
|
#endif /* BANWORD_MANAGER_H_ */
|
|
|