Merge branch 'experimental' of git://cockatrice.git.sourceforge.net/gitroot/cockatrice/cockatrice

This commit is contained in:
Max-Wilhelm Bruker 2011-07-06 01:20:47 +02:00
commit b8dca803e7
6 changed files with 115 additions and 1 deletions

View file

@ -55,6 +55,7 @@
<file>translations/cockatrice_pl.qm</file>
<file>translations/cockatrice_sk.qm</file>
<file>resources/countries/ar.svg</file>
<file>resources/countries/at.svg</file>
<file>resources/countries/au.svg</file>
<file>resources/countries/be.svg</file>

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 18 KiB

View file

@ -16,6 +16,7 @@ public:
bool getGameShouldPing() const { return false; }
int getMaxGameInactivityTime() const { return 9999999; }
int getMaxPlayerInactivityTime() const { return 9999999; }
bool getThreaded() const { return false; }
LocalServerInterface *newConnection();
protected:

View file

@ -40,6 +40,7 @@ public:
virtual int getMaxMessageCountPerInterval() const { return 0; }
virtual int getMaxMessageSizePerInterval() const { return 0; }
virtual int getMaxGamesPerUser() const { return 0; }
virtual bool getThreaded() const = 0;
virtual QMap<QString, ServerInfo_User *> getBuddyList(const QString &name) = 0;
virtual QMap<QString, ServerInfo_User *> getIgnoreList(const QString &name) = 0;

View file

@ -65,7 +65,7 @@ Servatrice::Servatrice(QSettings *_settings, QObject *parent)
statusUpdateClock->start(statusUpdateTime);
}
bool threaded = settings->value("server/threaded", false).toInt();
threaded = settings->value("server/threaded", false).toInt();
tcpServer = new Servatrice_TcpServer(this, threaded, this);
int port = settings->value("server/port", 4747).toInt();
qDebug() << "Starting server on port" << port;

View file

@ -68,6 +68,7 @@ public:
int getMaxMessageCountPerInterval() const { return maxMessageCountPerInterval; }
int getMaxMessageSizePerInterval() const { return maxMessageSizePerInterval; }
int getMaxGamesPerUser() const { return maxGamesPerUser; }
bool getThreaded() const { return threaded; }
QString getDbPrefix() const { return dbPrefix; }
void updateLoginMessage();
ServerInfo_User *getUserData(const QString &name);
@ -86,6 +87,7 @@ private:
QString dbPrefix;
QSettings *settings;
int serverId;
bool threaded;
int uptime;
QList<QPair<QHostAddress, int> > addressBanList;
int maxGameInactivityTime, maxPlayerInactivityTime;