server/game/src/banword.h

25 lines
568 B
C
Raw Normal View History

2022-03-05 12:44:06 +02:00
#ifndef BANWORD_MANAGER_H_
#define BANWORD_MANAGER_H_
#include <boost/unordered_map.hpp>
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 boost::unordered_map<std::string, bool> TBanwordHashmap;
TBanwordHashmap m_hashmap_words;
};
#endif /* BANWORD_MANAGER_H_ */