Some chatcleaner fixes for Qt5 (and other stuff).
This commit is contained in:
@@ -29,6 +29,8 @@
|
||||
* as that of the covered work. *
|
||||
*****************************************************************************/
|
||||
#include "cleanerconfig.h"
|
||||
#include <QtCore>
|
||||
|
||||
#include <tinyxml.h>
|
||||
|
||||
#define MODUS 0711
|
||||
@@ -46,8 +48,6 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include <QtCore>
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
||||
|
||||
@@ -77,7 +77,9 @@ CleanerServer::~CleanerServer()
|
||||
|
||||
void CleanerServer::newCon()
|
||||
{
|
||||
if(!blockConnection) {
|
||||
if(blockConnection) {
|
||||
tcpServer->nextPendingConnection()->close();
|
||||
} else {
|
||||
tcpSocket = tcpServer->nextPendingConnection();
|
||||
connect(tcpSocket, SIGNAL(readyRead()), this, SLOT(onRead()));
|
||||
connect(tcpSocket, SIGNAL(stateChanged(QAbstractSocket::SocketState)), this, SLOT(socketStateChanged(QAbstractSocket::SocketState)));
|
||||
@@ -113,6 +115,7 @@ void CleanerServer::onRead()
|
||||
if (error) {
|
||||
qDebug() << "Error handling packets from client.";
|
||||
tcpSocket->close();
|
||||
blockConnection = false;
|
||||
}
|
||||
|
||||
/* char buf[1024];
|
||||
|
||||
@@ -33,7 +33,9 @@
|
||||
|
||||
#include <QtCore>
|
||||
#include <stdlib.h>
|
||||
#ifndef Q_MOC_RUN
|
||||
#include <third_party/boost/timers.hpp>
|
||||
#endif
|
||||
|
||||
class BadWordCheck;
|
||||
class TextFloodCheck;
|
||||
|
||||
@@ -32,7 +32,9 @@
|
||||
#define TEXTFLOODCHECK_H
|
||||
|
||||
#include <QtCore>
|
||||
#ifndef Q_MOC_RUN
|
||||
#include <third_party/boost/timers.hpp>
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user