chatcleaner bugfix
This commit is contained in:
@@ -13,43 +13,45 @@ class LetterRepeatingCheck;
|
|||||||
class UrlCheck;
|
class UrlCheck;
|
||||||
|
|
||||||
class MessageFilter: public QObject {
|
class MessageFilter: public QObject {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
MessageFilter(CleanerConfig*);
|
MessageFilter(CleanerConfig*);
|
||||||
~MessageFilter();
|
~MessageFilter();
|
||||||
|
|
||||||
QStringList check(unsigned, QString, QString);
|
QStringList check(unsigned, QString, QString);
|
||||||
void refreshConfig();
|
void refreshConfig();
|
||||||
void cleanKickCounterList();
|
|
||||||
|
public slots:
|
||||||
|
void cleanKickCounterList();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
BadWordCheck *myBadWordCheck;
|
BadWordCheck *myBadWordCheck;
|
||||||
TextFloodCheck *myTextFloodCheck;
|
TextFloodCheck *myTextFloodCheck;
|
||||||
CapsFloodCheck *myCapsFloodCheck;
|
CapsFloodCheck *myCapsFloodCheck;
|
||||||
LetterRepeatingCheck *myLetterRepeatingCheck;
|
LetterRepeatingCheck *myLetterRepeatingCheck;
|
||||||
UrlCheck *myUrlCheck;
|
UrlCheck *myUrlCheck;
|
||||||
|
|
||||||
struct ClientWarnInfos {
|
struct ClientWarnInfos {
|
||||||
QString nick;
|
QString nick;
|
||||||
int lastWarnType;
|
int lastWarnType;
|
||||||
int warnLevel;
|
int warnLevel;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ClientKickInfos {
|
struct ClientKickInfos {
|
||||||
size_t lastKickTimestamp;
|
size_t lastKickTimestamp;
|
||||||
int kickNumber;
|
int kickNumber;
|
||||||
};
|
};
|
||||||
|
|
||||||
QMap<unsigned, ClientWarnInfos> myClientWarnLevelList;
|
QMap<unsigned, ClientWarnInfos> myClientWarnLevelList;
|
||||||
QMap<QString, ClientKickInfos> myClientKickCounterList;
|
QMap<QString, ClientKickInfos> myClientKickCounterList;
|
||||||
|
|
||||||
int warnLevelToKick;
|
int warnLevelToKick;
|
||||||
int kickNumberToBan;
|
int kickNumberToBan;
|
||||||
|
|
||||||
CleanerConfig *config;
|
CleanerConfig *config;
|
||||||
|
|
||||||
boost::timers::portable::second_timer timer;
|
boost::timers::portable::second_timer timer;
|
||||||
QTimer *cleanTimer;
|
QTimer *cleanTimer;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // MESSAGEFILTER_H
|
#endif // MESSAGEFILTER_H
|
||||||
|
|||||||
Reference in New Issue
Block a user