utils::StringFilter Class Reference

Used to filter content containing bad words. More...

#include <stringfilter.h>

List of all members.

Public Member Functions

 StringFilter ()
 ctors.
bool loadSlangFilterList ()
 Load slang list from the config file.
void writeSlangFilterList ()
 Write slang list to the config file.
bool filterContent (const std::string &text)
 Useful to filter slangs automatically, by instance.
bool isEmailValid (const std::string &email)
 Tells if an email is valid.
bool findDoubleQuotes (const std::string &text)
 find double quotes (") in strings.


Detailed Description

Used to filter content containing bad words.

Like username, character's names, chat, ...

Definition at line 33 of file stringfilter.h.


Member Function Documentation

bool utils::StringFilter::loadSlangFilterList (  ) 

Load slang list from the config file.

Returns:
true is the config is loaded succesfully

Definition at line 45 of file stringfilter.cpp.

Referenced by StringFilter().

void utils::StringFilter::writeSlangFilterList (  ) 

Write slang list to the config file.

Returns:
true is the config is loaded succesfully

Definition at line 62 of file stringfilter.cpp.

bool utils::StringFilter::filterContent ( const std::string &  text  ) 

Useful to filter slangs automatically, by instance.

Returns:
true if the sentence is slangs clear.

Definition at line 75 of file stringfilter.cpp.

Referenced by ChatChannelManager::tryNewPublicChannel().

bool utils::StringFilter::findDoubleQuotes ( const std::string &  text  ) 

find double quotes (") in strings.

Very useful not to make SQL Queries bqsed on names crash I placed it here cause where you've got " you can have slangs...

Definition at line 123 of file stringfilter.cpp.

Referenced by ChatChannelManager::tryNewPublicChannel().


The documentation for this class was generated from the following files:

Generated on Sun Apr 26 17:30:47 2009 for TMW Server Collection by  doxygen 1.5.5