diff --git a/ChangeLog b/ChangeLog
index 949d177b..907da8de 100755
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,28 @@
+2013-12-01 version 1.1 beta4
+- Updated several translations
+- New icon for spectator list on table (#217)
+- Display the number of spectators next to the spectator icon (#206)
+- BUGFIX: Correct sound is now played when joining a game (#230)
+- BUGFIX: No longer beep if ignored player uses nickname in chat (#221)
+
+2013-11-02 version 1.1 beta3
+- New option to allow/disallow spectators when creating a game (#215)
+
+2013-10-12 version 1.1 beta2
+- BUGFIX: Now you are able to click the menu buttons during a local game again (#203)
+- BUGFIX: Idle players are shown correctly if they join YOUR game (#198)
+- Updating websocket++ to latest github release (0.3 alpha4)
+
+2013-10-06 version 1.1 beta1
+- New web-based spectator mode on http://www.pokerth.net/live (#37)
+- Show list of spectators in the lobby and on the game table (#196)
+- Support for WebSocket connections was integrated in the server
+- Added option to disable emoticons in the chat (#172)
+- Avatars are no longer displayed for players which are on the ignore list (#187)
+- BUGFIX: context menu in connected player list was fixed (#183)
+- BUGFIX: "display idle players" in the lobby was fixed (#136)
+- translation updates
+
2013-04-07 version 1.0.1
- New Galician (gl) translation
- Client settings dialog option for connecting to a private, password protected server (#178)
diff --git a/chatcleaner.pro b/chatcleaner.pro
index 911c8f6b..6d63b4a9 100644
--- a/chatcleaner.pro
+++ b/chatcleaner.pro
@@ -13,32 +13,31 @@ OBJECTS_DIR = obj
TEMPLATE = app
INCLUDEPATH += src/ \
src/chatcleaner/ \
- src/third_party/asn1/ \
src/net/
DEPENDPATH += src/ \
src/chatcleaner/ \
- src/third_party/asn1/ \
src/net/
-SOURCES += chatcleaner.cpp \
- cleanerserver.cpp \
- messagefilter.cpp \
- badwordcheck.cpp \
- textfloodcheck.cpp \
- cleanerconfig.cpp \
- capsfloodcheck.cpp \
- letterrepeatingcheck.cpp \
- urlcheck.cpp
-HEADERS += cleanerserver.h \
- messagefilter.h \
- badwordcheck.h \
- textfloodcheck.h \
- cleanerconfig.h \
- capsfloodcheck.h \
- letterrepeatingcheck.h \
- urlcheck.h
+SOURCES += src/chatcleaner/chatcleaner.cpp \
+ src/chatcleaner/cleanerserver.cpp \
+ src/chatcleaner/messagefilter.cpp \
+ src/chatcleaner/badwordcheck.cpp \
+ src/chatcleaner/textfloodcheck.cpp \
+ src/chatcleaner/cleanerconfig.cpp \
+ src/chatcleaner/capsfloodcheck.cpp \
+ src/chatcleaner/letterrepeatingcheck.cpp \
+ src/chatcleaner/urlcheck.cpp
+HEADERS += src/chatcleaner/cleanerserver.h \
+ src/chatcleaner/messagefilter.h \
+ src/chatcleaner/badwordcheck.h \
+ src/chatcleaner/textfloodcheck.h \
+ src/chatcleaner/cleanerconfig.h \
+ src/chatcleaner/capsfloodcheck.h \
+ src/chatcleaner/letterrepeatingcheck.h \
+ src/chatcleaner/urlcheck.h
LIBPATH += lib
LIBS += -lpokerth_lib \
-lpokerth_protocol \
+ -lprotobuf \
-ltinyxml
win32 {
@@ -53,12 +52,13 @@ win32 {
INCLUDEPATH += $${PREFIX}/include
}
mac {
- # make it x86_64 only
- CONFIG += x86_64
- CONFIG -= x86
- CONFIG -= ppc
- QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.6
- QMAKE_CXXFLAGS -= -std=gnu++0x
+ # make it x86_64 only
+ CONFIG += x86_64
+ CONFIG -= x86
+ CONFIG -= ppc
+ QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.6
+ QMAKE_CXXFLAGS -= -std=gnu++0x
LIBPATH += /Developer/SDKs/MacOSX10.5.sdk/usr/lib
- INCLUDEPATH += /Developer/SDKs/MacOSX10.6.sdk/usr/include/
+ INCLUDEPATH += /Developer/SDKs/MacOSX10.6.sdk/usr/include/
+ INCLUDEPATH += /usr/local/include
}
diff --git a/chatcleaner.proto b/chatcleaner.proto
new file mode 100644
index 00000000..5f7b23e0
--- /dev/null
+++ b/chatcleaner.proto
@@ -0,0 +1,91 @@
+/*****************************************************************************
+ * PokerTH - The open source texas holdem engine *
+ * Copyright (C) 2006-2013 Felix Hammer, Florian Thauer, Lothar May *
+ * *
+ * This program is free software: you can redistribute it and/or modify *
+ * it under the terms of the GNU Affero General Public License as *
+ * published by the Free Software Foundation, either version 3 of the *
+ * License, or (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU Affero General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Affero General Public License *
+ * along with this program. If not, see . *
+ * *
+ * *
+ * Additional permission under GNU AGPL version 3 section 7 *
+ * *
+ * If you modify this program, or any covered work, by linking or *
+ * combining it with the OpenSSL project's OpenSSL library (or a *
+ * modified version of that library), containing parts covered by the *
+ * terms of the OpenSSL or SSLeay licenses, the authors of PokerTH *
+ * (Felix Hammer, Florian Thauer, Lothar May) grant you additional *
+ * permission to convey the resulting work. *
+ * Corresponding Source for a non-source form of such a combination *
+ * shall include the source code for the parts of OpenSSL used as well *
+ * as that of the covered work. *
+ *****************************************************************************/
+
+option java_package = "de.chatcleaner.protocol";
+option java_outer_classname = "ProtoBuf";
+option optimize_for = LITE_RUNTIME;
+
+message CleanerInitMessage {
+ required uint32 requestedVersion = 1;
+ required string clientSecret = 2;
+}
+
+message CleanerInitAckMessage {
+ required uint32 serverVersion = 1;
+ required string serverSecret = 2;
+}
+
+enum CleanerChatType {
+ cleanerChatTypeLobby = 0;
+ cleanerChatTypeGame = 1;
+}
+
+message CleanerChatRequestMessage {
+ required uint32 requestId = 1;
+ required CleanerChatType cleanerChatType = 2;
+ optional uint32 gameId = 3 [default = 0];
+ required uint32 playerId = 4;
+ required string playerName = 5;
+ required string chatMessage = 6;
+}
+
+message CleanerChatReplyMessage {
+ required uint32 requestId = 1;
+ required CleanerChatType cleanerChatType = 2;
+ optional uint32 gameId = 3 [default = 0];
+ required uint32 playerId = 4;
+ enum CleanerActionType {
+ cleanerActionNone = 0;
+ cleanerActionWarning = 1;
+ cleanerActionKick = 2;
+ cleanerActionBan = 3;
+ cleanerActionMute = 4;
+ }
+ required CleanerActionType cleanerActionType = 5;
+ optional string cleanerText = 6 [default = ""];
+}
+
+// The main message type (it is prefixed by 4 bytes length of the message).
+
+message ChatCleanerMessage {
+ enum ChatCleanerMessageType {
+ Type_CleanerInitMessage = 1;
+ Type_CleanerInitAckMessage = 2;
+ Type_CleanerChatRequestMessage = 3;
+ Type_CleanerChatReplyMessage = 4;
+ }
+ required ChatCleanerMessageType messageType = 1;
+
+ optional CleanerInitMessage cleanerInitMessage = 2;
+ optional CleanerInitAckMessage cleanerInitAckMessage = 3;
+ optional CleanerChatRequestMessage cleanerChatRequestMessage = 4;
+ optional CleanerChatReplyMessage cleanerChatReplyMessage = 5;
+}
diff --git a/connectivity.pro b/connectivity.pro
index 5f4de829..a6704719 100644
--- a/connectivity.pro
+++ b/connectivity.pro
@@ -41,13 +41,13 @@ unix : !mac {
QMAKE_LIBDIR += lib $${PREFIX}/lib /opt/gsasl/lib
INCLUDEPATH += $${PREFIX}/include
- LIB_DIRS = $${PREFIX}/lib $${PREFIX}/lib64
+ LIB_DIRS = $${PREFIX}/lib $${PREFIX}/lib64 $$system(qmake -query QT_INSTALL_LIBS)
BOOST_PROGRAM_OPTIONS = boost_program_options boost_program_options-mt
BOOST_SYS = boost_system boost_system-mt
#
- # searching in $PREFIX/lib and $PREFIX/lib64
+ # searching in $PREFIX/lib, $PREFIX/lib64 and $$system(qmake -query QT_INSTALL_LIBS)
# to override the default '/usr' pass PREFIX
# variable to qmake.
#
diff --git a/data/fonts/DejaVuSans-Bold.ttf b/data/fonts/DejaVuSans-Bold.ttf
index 0f4d5e9d..08695f23 100644
Binary files a/data/fonts/DejaVuSans-Bold.ttf and b/data/fonts/DejaVuSans-Bold.ttf differ
diff --git a/data/misc/third_party_libs.txt b/data/misc/third_party_libs.txt
new file mode 100644
index 00000000..1242eabc
--- /dev/null
+++ b/data/misc/third_party_libs.txt
@@ -0,0 +1,40 @@
+Qt
+http://qt-project.org/doc/qt-5.0/qtdoc/opensourcelicense.html
+http://qt-project.org/doc/qt-5.0/qtdoc/3rdparty.html
+
+Boost
+http://www.boost.org/users/license.html
+
+libprotobuf
+http://code.google.com/p/protobuf/
+
+websocket++
+https://github.com/zaphoyd/websocketpp/blob/master/COPYING
+
+libcurl
+http://curl.haxx.se/docs/copyright.html
+
+libgsasl
+http://www.gnu.org/software/gsasl/
+
+tinyxml
+http://www.grinninglizard.com/tinyxmldocs/
+
+OpenSSL
+http://www.openssl.org/source/license.html
+
+libgcrypt
+http://www.gnupg.org/
+
+SDL
+http://www.libsdl.org/license.php
+
+SDL_mixer
+http://www.libsdl.org/projects/SDL_mixer/
+
+sqlite3
+http://www.sqlite.org/copyright.html
+
+Due to dependencies of these libs, PokerTH may link to additional libs not listed here. If you think acknowledgement for a certain lib is missing, please contact us.
+
+This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/)
diff --git a/data/translations/pokerth_af.qm b/data/translations/pokerth_af.qm
index 3b15f6b3..7cb8d318 100644
Binary files a/data/translations/pokerth_af.qm and b/data/translations/pokerth_af.qm differ
diff --git a/data/translations/pokerth_bg.qm b/data/translations/pokerth_bg.qm
index 556bd7df..b21183f7 100644
Binary files a/data/translations/pokerth_bg.qm and b/data/translations/pokerth_bg.qm differ
diff --git a/data/translations/pokerth_ca.qm b/data/translations/pokerth_ca.qm
index 0f11184e..009f7019 100644
Binary files a/data/translations/pokerth_ca.qm and b/data/translations/pokerth_ca.qm differ
diff --git a/data/translations/pokerth_cz.qm b/data/translations/pokerth_cz.qm
index 9c7944ee..eea48219 100644
Binary files a/data/translations/pokerth_cz.qm and b/data/translations/pokerth_cz.qm differ
diff --git a/data/translations/pokerth_de.qm b/data/translations/pokerth_de.qm
index 70d4f2b2..bfb55de8 100644
Binary files a/data/translations/pokerth_de.qm and b/data/translations/pokerth_de.qm differ
diff --git a/data/translations/pokerth_dk.qm b/data/translations/pokerth_dk.qm
index bb2f51c6..11b133a6 100644
Binary files a/data/translations/pokerth_dk.qm and b/data/translations/pokerth_dk.qm differ
diff --git a/data/translations/pokerth_es.qm b/data/translations/pokerth_es.qm
index 7ea70de2..39f20a20 100644
Binary files a/data/translations/pokerth_es.qm and b/data/translations/pokerth_es.qm differ
diff --git a/data/translations/pokerth_fi.qm b/data/translations/pokerth_fi.qm
index 19023f2b..400ab56f 100644
Binary files a/data/translations/pokerth_fi.qm and b/data/translations/pokerth_fi.qm differ
diff --git a/data/translations/pokerth_fr.qm b/data/translations/pokerth_fr.qm
index ea3e177d..5419e627 100644
Binary files a/data/translations/pokerth_fr.qm and b/data/translations/pokerth_fr.qm differ
diff --git a/data/translations/pokerth_gl.qm b/data/translations/pokerth_gl.qm
index e6eeffd4..38dd74d8 100644
Binary files a/data/translations/pokerth_gl.qm and b/data/translations/pokerth_gl.qm differ
diff --git a/data/translations/pokerth_gr.qm b/data/translations/pokerth_gr.qm
index 2f85e970..a47bed56 100644
Binary files a/data/translations/pokerth_gr.qm and b/data/translations/pokerth_gr.qm differ
diff --git a/data/translations/pokerth_hu.qm b/data/translations/pokerth_hu.qm
index a6cca47b..5a59ee88 100644
Binary files a/data/translations/pokerth_hu.qm and b/data/translations/pokerth_hu.qm differ
diff --git a/data/translations/pokerth_it.qm b/data/translations/pokerth_it.qm
index 64bbe9cc..ad397f32 100644
Binary files a/data/translations/pokerth_it.qm and b/data/translations/pokerth_it.qm differ
diff --git a/data/translations/pokerth_jp.qm b/data/translations/pokerth_jp.qm
index 8ddeefce..9d9391a6 100644
Binary files a/data/translations/pokerth_jp.qm and b/data/translations/pokerth_jp.qm differ
diff --git a/data/translations/pokerth_lt.qm b/data/translations/pokerth_lt.qm
index 8e236ef8..d53cf30c 100644
Binary files a/data/translations/pokerth_lt.qm and b/data/translations/pokerth_lt.qm differ
diff --git a/data/translations/pokerth_nl.qm b/data/translations/pokerth_nl.qm
index 5d0cdcf6..dd1ae729 100644
Binary files a/data/translations/pokerth_nl.qm and b/data/translations/pokerth_nl.qm differ
diff --git a/data/translations/pokerth_no.qm b/data/translations/pokerth_no.qm
index d39d55fa..ec2b5168 100644
Binary files a/data/translations/pokerth_no.qm and b/data/translations/pokerth_no.qm differ
diff --git a/data/translations/pokerth_pl.qm b/data/translations/pokerth_pl.qm
index 2150b9bc..54353f5d 100644
Binary files a/data/translations/pokerth_pl.qm and b/data/translations/pokerth_pl.qm differ
diff --git a/data/translations/pokerth_ptbr.qm b/data/translations/pokerth_ptbr.qm
index 8cbf820b..93b8d509 100644
Binary files a/data/translations/pokerth_ptbr.qm and b/data/translations/pokerth_ptbr.qm differ
diff --git a/data/translations/pokerth_ptpt.qm b/data/translations/pokerth_ptpt.qm
index d5d16403..a0303e16 100644
Binary files a/data/translations/pokerth_ptpt.qm and b/data/translations/pokerth_ptpt.qm differ
diff --git a/data/translations/pokerth_ru.qm b/data/translations/pokerth_ru.qm
index 3dc5104a..755dbba2 100644
Binary files a/data/translations/pokerth_ru.qm and b/data/translations/pokerth_ru.qm differ
diff --git a/data/translations/pokerth_sk.qm b/data/translations/pokerth_sk.qm
index fdd66b5d..32e13217 100644
Binary files a/data/translations/pokerth_sk.qm and b/data/translations/pokerth_sk.qm differ
diff --git a/data/translations/pokerth_sv.qm b/data/translations/pokerth_sv.qm
index 7613e513..6ae995ef 100644
Binary files a/data/translations/pokerth_sv.qm and b/data/translations/pokerth_sv.qm differ
diff --git a/data/translations/pokerth_ta.qm b/data/translations/pokerth_ta.qm
index 533d3e3e..c756f2cb 100644
Binary files a/data/translations/pokerth_ta.qm and b/data/translations/pokerth_ta.qm differ
diff --git a/data/translations/pokerth_tr.qm b/data/translations/pokerth_tr.qm
index 87830c9d..06dc47de 100644
Binary files a/data/translations/pokerth_tr.qm and b/data/translations/pokerth_tr.qm differ
diff --git a/data/translations/pokerth_vi.qm b/data/translations/pokerth_vi.qm
new file mode 100644
index 00000000..02229744
Binary files /dev/null and b/data/translations/pokerth_vi.qm differ
diff --git a/data/translations/pokerth_zhcn.qm b/data/translations/pokerth_zhcn.qm
index bffe8091..73985e66 100644
Binary files a/data/translations/pokerth_zhcn.qm and b/data/translations/pokerth_zhcn.qm differ
diff --git a/docs/build_mingw_windows.txt b/docs/build_mingw_windows.txt
index e6fd79b1..dc241c03 100644
--- a/docs/build_mingw_windows.txt
+++ b/docs/build_mingw_windows.txt
@@ -12,7 +12,7 @@ on your Linux system.
3. Within /opt/mingw, run
make gcc
-make qt
+make qt5
make boost
make curl
make libgsasl
diff --git a/docs/chatcleaner.asn1 b/docs/chatcleaner.asn1
deleted file mode 100644
index 42aa788d..00000000
--- a/docs/chatcleaner.asn1
+++ /dev/null
@@ -1,76 +0,0 @@
-/*****************************************************************************
- * PokerTH - The open source texas holdem engine *
- * Copyright (C) 2006-2011 Felix Hammer, Florian Thauer, Lothar May *
- * *
- * This program is free software: you can redistribute it and/or modify *
- * it under the terms of the GNU Affero General Public License as *
- * published by the Free Software Foundation, either version 3 of the *
- * License, or (at your option) any later version. *
- * *
- * This program is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
- * GNU Affero General Public License for more details. *
- * *
- * You should have received a copy of the GNU Affero General Public License *
- * along with this program. If not, see . *
- *****************************************************************************/
-
-CHATCLEANER-PROTOCOL DEFINITIONS
-IMPLICIT TAGS
-EXTENSIBILITY IMPLIED ::=
-
-BEGIN
-
-ChatCleanerMessage ::= CHOICE {
- cleanerInitMessage CleanerInitMessage,
- cleanerInitAckMessage CleanerInitAckMessage,
- cleanerChatRequestMessage CleanerChatRequestMessage,
- cleanerChatReplyMessage CleanerChatReplyMessage
-}
-
-CleanerInitMessage ::= [APPLICATION 0] SEQUENCE {
- requestedVersion INTEGER(0..65535),
- clientSecret UTF8String (SIZE(1..32))
-}
-
-CleanerInitAckMessage ::= [APPLICATION 1] SEQUENCE {
- serverVersion INTEGER(0..65535),
- serverSecret UTF8String (SIZE(1..32))
-}
-
-CleanerChatType ::= CHOICE {
- cleanerChatTypeLobby [0] CleanerChatTypeLobby,
- cleanerChatTypeGame [1] CleanerChatTypeGame
-}
-
-CleanerChatTypeLobby ::= SEQUENCE {
-}
-
-CleanerChatTypeGame ::= SEQUENCE {
- gameId INTEGER(1..4294967295)
-}
-
-CleanerChatRequestMessage ::= [APPLICATION 2] SEQUENCE {
- requestId INTEGER(1..4294967295),
- cleanerChatType CleanerChatType,
- playerId INTEGER(1..4294967295),
- playerName UTF8String (SIZE(1..32)),
- chatMessage UTF8String (SIZE(1..128))
-}
-
-CleanerChatReplyMessage ::= [APPLICATION 3] SEQUENCE {
- requestId INTEGER(1..4294967295),
- cleanerChatType CleanerChatType,
- playerId INTEGER(1..4294967295),
- cleanerActionType ENUMERATED {
- cleanerActionNone (0),
- cleanerActionWarning (1),
- cleanerActionKick (2),
- cleanerActionBan (3),
- cleanerActionMute (4)
- },
- cleanerText UTF8String (SIZE(1..128)) OPTIONAL
-}
-
-END
diff --git a/docs/pokerth.asn1 b/docs/pokerth.asn1
deleted file mode 100644
index adddceaf..00000000
--- a/docs/pokerth.asn1
+++ /dev/null
@@ -1,848 +0,0 @@
-/*****************************************************************************
- * PokerTH - The open source texas holdem engine *
- * Copyright (C) 2006-2011 Felix Hammer, Florian Thauer, Lothar May *
- * *
- * This program is free software: you can redistribute it and/or modify *
- * it under the terms of the GNU Affero General Public License as *
- * published by the Free Software Foundation, either version 3 of the *
- * License, or (at your option) any later version. *
- * *
- * This program is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
- * GNU Affero General Public License for more details. *
- * *
- * You should have received a copy of the GNU Affero General Public License *
- * along with this program. If not, see . *
- *****************************************************************************/
-
- /* This file is now deprecated! google protocol buffers are used instead.
- * Please refer to pokerth.proto. */
-
-POKERTH-PROTOCOL DEFINITIONS
-IMPLICIT TAGS
-EXTENSIBILITY IMPLIED ::=
-
-BEGIN
-
-PokerTHMessage ::= CHOICE {
- announceMessage AnnounceMessage,
- initMessage InitMessage,
- authMessage AuthMessage,
- initAckMessage InitAckMessage,
- avatarRequestMessage AvatarRequestMessage,
- avatarReplyMessage AvatarReplyMessage,
- playerListMessage PlayerListMessage,
- gameListMessage GameListMessage,
- playerInfoRequestMessage PlayerInfoRequestMessage,
- playerInfoReplyMessage PlayerInfoReplyMessage,
- subscriptionRequestMessage SubscriptionRequestMessage,
- joinGameRequestMessage JoinGameRequestMessage,
- joinGameReplyMessage JoinGameReplyMessage,
- gamePlayerMessage GamePlayerMessage,
- kickPlayerRequestMessage KickPlayerRequestMessage,
- leaveGameRequestMessage LeaveGameRequestMessage,
- invitePlayerToGameMessage InvitePlayerToGameMessage,
- inviteNotifyMessage InviteNotifyMessage,
- rejectGameInvitationMessage RejectGameInvitationMessage,
- rejectInvNotifyMessage RejectInvNotifyMessage,
- startEventMessage StartEventMessage,
- startEventAckMessage StartEventAckMessage,
- gameStartMessage GameStartMessage,
- handStartMessage HandStartMessage,
- playersTurnMessage PlayersTurnMessage,
- myActionRequestMessage MyActionRequestMessage,
- yourActionRejectedMessage YourActionRejectedMessage,
- playersActionDoneMessage PlayersActionDoneMessage,
- dealFlopCardsMessage DealFlopCardsMessage,
- dealTurnCardMessage DealTurnCardMessage,
- dealRiverCardMessage DealRiverCardMessage,
- allInShowCardsMessage AllInShowCardsMessage,
- endOfHandMessage EndOfHandMessage,
- showMyCardsRequestMessage ShowMyCardsRequestMessage,
- afterHandShowCardsMessage AfterHandShowCardsMessage,
- endOfGameMessage EndOfGameMessage,
- playerIdChangedMessage PlayerIdChangedMessage,
- askKickPlayerMessage AskKickPlayerMessage,
- askKickDeniedMessage AskKickDeniedMessage,
- startKickPetitionMessage StartKickPetitionMessage,
- voteKickRequestMessage VoteKickRequestMessage,
- voteKickReplyMessage VoteKickReplyMessage,
- kickPetitionUpdateMessage KickPetitionUpdateMessage,
- endKickPetitionMessage EndKickPetitionMessage,
- statisticsMessage StatisticsMessage,
- chatRequestMessage ChatRequestMessage,
- chatMessage ChatMessage,
- chatRejectMessage ChatRejectMessage,
- dialogMessage DialogMessage,
- timeoutWarningMessage TimeoutWarningMessage,
- resetTimeoutMessage ResetTimeoutMessage,
- reportAvatarMessage ReportAvatarMessage,
- reportAvatarAckMessage ReportAvatarAckMessage,
- reportGameMessage ReportGameMessage,
- reportGameAckMessage ReportGameAckMessage,
- errorMessage ErrorMessage
-}
-
-AnnounceMessage ::= [APPLICATION 0] SEQUENCE {
- protocolVersion Version,
- latestGameVersion Version,
- latestBetaRevision INTEGER(0..65535),
- serverType ENUMERATED {
- serverTypeLAN (0),
- serverTypeInternetNoAuth (1),
- serverTypeInternetAuth (2)
- },
- numPlayersOnServer INTEGER(0..65535)
-}
-
--- buildId contains a constant build id (specific for Windows/Linux/Mac builds)
-InitMessage ::= [APPLICATION 1] SEQUENCE {
- requestedVersion Version,
- buildId INTEGER,
- myLastSessionId Guid OPTIONAL,
- authServerPassword UTF8String (SIZE(1..64)) OPTIONAL,
- login CHOICE {
- guestLogin [0] GuestLogin,
- authenticatedLogin [1] AuthenticatedLogin,
- unauthenticatedLogin [2] UnauthenticatedLogin
- }
-}
-
-Version ::= SEQUENCE {
- major INTEGER(0..65535),
- minor INTEGER(0..65535)
-}
-
-GuestLogin ::= SEQUENCE {
- nickName UTF8String (SIZE(1..64))
-}
-
--- Login data is according to SCRAM SHA-1
-AuthenticatedLogin ::= SEQUENCE {
- clientUserData OCTET STRING (SIZE(1..256)),
- avatar AvatarHash OPTIONAL
-}
-
-UnauthenticatedLogin ::= SEQUENCE {
- nickName UTF8String (SIZE(1..64)),
- avatar AvatarHash OPTIONAL
-}
-
-AuthMessage ::= [APPLICATION 2] CHOICE {
- authServerChallenge [0] AuthServerChallenge,
- authClientResponse [1] AuthClientResponse,
- authServerVerification [2] AuthServerVerification
-}
-
-AuthServerChallenge ::= SEQUENCE {
- serverChallenge OCTET STRING (SIZE(1..256))
-}
-
-AuthClientResponse ::= SEQUENCE {
- clientResponse OCTET STRING (SIZE(1..256))
-}
-
-AuthServerVerification ::= SEQUENCE {
- serverVerification OCTET STRING (SIZE(1..256))
-}
-
-InitAckMessage ::= [APPLICATION 3] SEQUENCE {
- yourSessionId Guid,
- yourPlayerId NonZeroId,
- yourAvatar AvatarHash OPTIONAL,
- rejoinGameId NonZeroId OPTIONAL
-}
-
-AvatarRequestMessage ::= [APPLICATION 4] SEQUENCE {
- requestId NonZeroId,
- avatar AvatarHash
-}
-
-AvatarReplyMessage ::= [APPLICATION 5] SEQUENCE {
- requestId NonZeroId,
- avatarResult CHOICE {
- avatarHeader [0] AvatarHeader,
- avatarData [1] AvatarData,
- avatarEnd [2] AvatarEnd,
- unknownAvatar [3] UnknownAvatar
- }
-}
-
-AvatarHeader ::= SEQUENCE {
- avatarType NetAvatarType,
- avatarSize INTEGER(32..30720)
-}
-
-AvatarData ::= SEQUENCE {
- avatarBlock OCTET STRING (SIZE(1..256))
-}
-
-AvatarEnd ::= SEQUENCE {
-}
-
-UnknownAvatar ::= SEQUENCE {
-}
-
-AvatarHash ::= OCTET STRING (SIZE(16)) -- md5 hash value
-
-NetAvatarType ::= ENUMERATED {
- avatarImagePng (1),
- avatarImageJpg (2),
- avatarImageGif (3)
-}
-
-PlayerListMessage ::= [APPLICATION 6] SEQUENCE {
- playerId NonZeroId,
- playerListNotification ENUMERATED {
- playerListNew (0),
- playerListLeft (1)
- }
-}
-
-GameListMessage ::= [APPLICATION 7] SEQUENCE {
- gameId NonZeroId,
- gameListNotification CHOICE {
- gameListNew [0] GameListNew,
- gameListUpdate [1] GameListUpdate,
- gameListPlayerJoined [2] GameListPlayerJoined,
- gameListPlayerLeft [3] GameListPlayerLeft,
- gameListAdminChanged [4] GameListAdminChanged
- }
-}
-
-GameListNew ::= SEQUENCE {
- gameMode NetGameMode,
- isPrivate BOOLEAN,
- playerIds SEQUENCE SIZE(0..10) OF NonZeroId,
- adminPlayerId NonZeroId,
- gameInfo NetGameInfo
-}
-
-GameListUpdate ::= SEQUENCE {
- gameMode NetGameMode
-}
-
-GameListPlayerJoined ::= SEQUENCE {
- playerId NonZeroId
-}
-
-GameListPlayerLeft ::= SEQUENCE {
- playerId NonZeroId
-}
-
-GameListAdminChanged ::= SEQUENCE {
- newAdminPlayerId NonZeroId
-}
-
-NetGameMode ::= ENUMERATED {
- gameCreated (1),
- gameStarted (2),
- gameClosed (3)
-}
-
-PlayerInfoRequestMessage ::= [APPLICATION 8] SEQUENCE {
- playerId NonZeroId
-}
-
-PlayerInfoReplyMessage ::= [APPLICATION 9] SEQUENCE {
- playerId NonZeroId,
- playerInfoResult CHOICE {
- playerInfoData [0] PlayerInfoData,
- unknownPlayerInfo [1] UnknownPlayerInfo
- }
-}
-
-PlayerInfoRights ::= ENUMERATED {
- playerRightsGuest (1),
- playerRightsNormal (2),
- playerRightsAdmin (3)
-}
-
-PlayerInfoData ::= SEQUENCE {
- playerName UTF8String (SIZE(1..32)),
- isHuman BOOLEAN,
- playerRights PlayerInfoRights,
- countryCode UTF8String (SIZE(2)) OPTIONAL,
- avatarData SEQUENCE {
- avatarType NetAvatarType,
- avatar AvatarHash
- } OPTIONAL
-}
-
-UnknownPlayerInfo ::= SEQUENCE {
-}
-
--- The following request will not be confirmed by the server. It is used,
--- optionally, to reduce server traffic. The server might ignore it.
-SubscriptionRequestMessage ::= [APPLICATION 10] SEQUENCE {
- subscriptionAction ENUMERATED {
- unsubscribeGameList (1),
- resubscribeGameList (2)
- }
-}
-
-JoinGameRequestMessage ::= [APPLICATION 11] SEQUENCE {
- joinGameAction CHOICE {
- joinExistingGame [0] JoinExistingGame,
- joinNewGame [1] JoinNewGame,
- rejoinExistingGame [2] RejoinExistingGame
- },
- autoLeave BOOLEAN
-}
-
-JoinExistingGame ::= SEQUENCE {
- gameId NonZeroId,
- password UTF8String (SIZE(1..64)) OPTIONAL
-}
-
-JoinNewGame ::= SEQUENCE {
- gameInfo NetGameInfo,
- password UTF8String (SIZE(1..64)) OPTIONAL
-}
-
-RejoinExistingGame ::= SEQUENCE {
- gameId NonZeroId
-}
-
-JoinGameReplyMessage ::= [APPLICATION 12] SEQUENCE {
- gameId NonZeroId,
- joinGameResult CHOICE {
- joinGameAck [0] JoinGameAck,
- joinGameFailed [1] JoinGameFailed
- }
-}
-
-JoinGameAck ::= SEQUENCE {
- areYouGameAdmin BOOLEAN,
- gameInfo NetGameInfo
-}
-
-JoinGameFailed ::= SEQUENCE {
- joinGameFailureReason ENUMERATED {
- invalidGame (1),
- gameIsFull (2),
- gameIsRunning (3),
- invalidPassword (4),
- notAllowedAsGuest (5),
- notInvited (6),
- gameNameInUse (7),
- badGameName (8),
- invalidSettings (9),
- ipAddressBlocked (10),
- rejoinFailed (11)
- }
-}
-
-NetGameInfo ::= SEQUENCE {
- gameName UTF8String (SIZE(1..64)),
- netGameType ENUMERATED {
- normalGame (1),
- registeredOnlyGame (2),
- inviteOnlyGame (3),
- rankingGame (4)
- },
- maxNumPlayers INTEGER(2..10),
- raiseIntervalMode CHOICE {
- raiseEveryHands [0] INTEGER(1..1000),
- raiseEveryMinutes [1] INTEGER(1..1000)
- },
- endRaiseMode ENUMERATED {
- doubleBlinds (1),
- raiseByEndValue (2),
- keepLastBlind (3)
- },
- proposedGuiSpeed INTEGER(1..11),
- delayBetweenHands INTEGER(5..20), -- These are seconds
- playerActionTimeout INTEGER(0..60), -- These are seconds
- firstSmallBlind INTEGER(1..20000),
- endRaiseSmallBlindValue InitialAmountOfMoney,
- startMoney InitialNonZeroAmountOfMoney,
- manualBlinds SEQUENCE SIZE(0..30) OF InitialNonZeroAmountOfMoney
-}
-
-GamePlayerMessage ::= [APPLICATION 13] SEQUENCE {
- gameId NonZeroId,
- gamePlayerNotification CHOICE {
- gamePlayerJoined [0] GamePlayerJoined,
- gamePlayerLeft [1] GamePlayerLeft,
- gameAdminChanged [2] GameAdminChanged,
- removedFromGame [3] RemovedFromGame
- }
-}
-
-GamePlayerJoined ::= SEQUENCE {
- playerId NonZeroId,
- isGameAdmin BOOLEAN
-}
-
-GamePlayerLeft ::= SEQUENCE {
- playerId NonZeroId,
- gamePlayerLeftReason ENUMERATED {
- leftOnRequest (0),
- leftKicked (1),
- leftError (2)
- }
-}
-
-GameAdminChanged ::= SEQUENCE {
- newAdminPlayerId NonZeroId
-}
-
-RemovedFromGame ::= SEQUENCE {
- removedFromGameReason ENUMERATED {
- removedOnRequest (0), -- No error, client wished to leave.
- kickedFromGame (1),
- gameIsFull (2),
- gameIsRunning (3),
- gameTimeout (4),
- removedStartFailed (5)
- }
-}
-
-KickPlayerRequestMessage ::= [APPLICATION 14] SEQUENCE {
- gameId NonZeroId,
- playerId NonZeroId
-}
-
-LeaveGameRequestMessage ::= [APPLICATION 15] SEQUENCE {
- gameId NonZeroId
-}
-
-InvitePlayerToGameMessage ::= [APPLICATION 16] SEQUENCE {
- gameId NonZeroId,
- playerId NonZeroId
-}
-
-InviteNotifyMessage ::= [APPLICATION 17] SEQUENCE {
- gameId NonZeroId,
- playerIdWho NonZeroId,
- playerIdByWhom NonZeroId
-}
-
-RejectGameInvReason ::= ENUMERATED {
- no (0),
- busy (1)
-}
-
-RejectGameInvitationMessage ::= [APPLICATION 18] SEQUENCE {
- gameId NonZeroId,
- myRejectReason RejectGameInvReason
-}
-
-RejectInvNotifyMessage ::= [APPLICATION 19] SEQUENCE {
- gameId NonZeroId,
- playerId NonZeroId,
- playerRejectReason RejectGameInvReason
-}
-
-StartEventMessage ::= [APPLICATION 20] SEQUENCE {
- gameId NonZeroId,
- startEventType CHOICE {
- startEvent [0] StartEvent,
- rejoinEvent [1] RejoinEvent
- }
-}
-
-StartEvent ::= SEQUENCE {
- fillWithComputerPlayers BOOLEAN
-}
-
-RejoinEvent ::= SEQUENCE {
-}
-
-StartEventAckMessage ::= [APPLICATION 21] SEQUENCE {
- gameId NonZeroId
-}
-
-RejoinPlayerData ::= SEQUENCE {
- playerId NonZeroId,
- playerMoney AmountOfMoney
-}
-
-GameStartModeInitial ::= SEQUENCE {
- playerSeats SEQUENCE SIZE(2..10) OF NonZeroId
-}
-
-GameStartModeRejoin ::= SEQUENCE {
- handNum NonZeroId,
- rejoinPlayerData SEQUENCE SIZE(2..10) OF RejoinPlayerData
-}
-
-GameStartMessage ::= [APPLICATION 22] SEQUENCE {
- gameId NonZeroId,
- startDealerPlayerId NonZeroId,
- gameStartMode CHOICE {
- gameStartModeInitial [0] GameStartModeInitial,
- gameStartModeRejoin [1] GameStartModeRejoin
- }
-}
-
-PlainCards ::= SEQUENCE {
- plainCard1 Card,
- plainCard2 Card
-}
-
-EncryptedCards ::= SEQUENCE {
- cardData OCTET STRING (SIZE(16..64))
-}
-
-HandStartMessage ::= [APPLICATION 23] SEQUENCE {
- gameId NonZeroId,
- yourCards CHOICE {
- plainCards [0] PlainCards,
- encryptedCards [1] EncryptedCards
- },
- smallBlind INTEGER(1..100000000),
- seatStates SEQUENCE SIZE(2..10) OF NetPlayerState
-}
-
-PlayersTurnMessage ::= [APPLICATION 24] SEQUENCE {
- gameId NonZeroId,
- playerId NonZeroId,
- gameState NetGameState
-}
-
-MyActionRequestMessage ::= [APPLICATION 25] SEQUENCE {
- gameId NonZeroId,
- handNum NonZeroId,
- gameState NetGameState,
- myAction NetPlayerAction,
- myRelativeBet AmountOfMoney
-}
-
-YourActionRejectedMessage ::= [APPLICATION 26] SEQUENCE {
- gameId NonZeroId,
- gameState NetGameState,
- yourAction NetPlayerAction,
- yourRelativeBet AmountOfMoney,
- rejectionReason ENUMERATED {
- rejectedInvalidGameState (1),
- rejectedNotYourTurn (2),
- rejectedActionNotAllowed (3)
- }
-}
-
-PlayersActionDoneMessage ::= [APPLICATION 27] SEQUENCE {
- gameId NonZeroId,
- playerId NonZeroId,
- gameState NetGameState,
- playerAction NetPlayerAction,
- totalPlayerBet AmountOfMoney,
- playerMoney AmountOfMoney,
- highestSet AmountOfMoney,
- minimumRaise AmountOfMoney
-}
-
-DealFlopCardsMessage ::= [APPLICATION 28] SEQUENCE {
- gameId NonZeroId,
- flopCard1 Card,
- flopCard2 Card,
- flopCard3 Card
-}
-
-DealTurnCardMessage ::= [APPLICATION 29] SEQUENCE {
- gameId NonZeroId,
- turnCard Card
-}
-
-DealRiverCardMessage ::= [APPLICATION 30] SEQUENCE {
- gameId NonZeroId,
- riverCard Card
-}
-
-AllInShowCardsMessage ::= [APPLICATION 31] SEQUENCE {
- gameId NonZeroId,
- playersAllIn SEQUENCE SIZE(1..10) OF PlayerAllIn
-}
-
-PlayerAllIn ::= SEQUENCE {
- playerId NonZeroId,
- allInCard1 Card,
- allInCard2 Card
-}
-
-EndOfHandMessage ::= [APPLICATION 32] SEQUENCE {
- gameId NonZeroId,
- endOfHandType CHOICE {
- endOfHandShowCards [0] EndOfHandShowCards,
- endOfHandHideCards [1] EndOfHandHideCards
- }
-}
-
-EndOfHandShowCards ::= SEQUENCE {
- playerResults SEQUENCE SIZE(1..10) OF PlayerResult
-}
-
-PlayerResult ::= SEQUENCE {
- playerId NonZeroId,
- resultCard1 Card,
- resultCard2 Card,
- bestHandPosition SEQUENCE SIZE(5) OF INTEGER, -- TODO size restrictions
- moneyWon AmountOfMoney,
- playerMoney AmountOfMoney,
- cardsValue INTEGER OPTIONAL
-}
-
-EndOfHandHideCards ::= SEQUENCE {
- playerId NonZeroId,
- moneyWon AmountOfMoney,
- playerMoney AmountOfMoney
-}
-
-ShowMyCardsRequestMessage ::= [APPLICATION 33] SEQUENCE {
-}
-
-AfterHandShowCardsMessage ::= [APPLICATION 34] SEQUENCE {
- playerResult PlayerResult
-}
-
-EndOfGameMessage ::= [APPLICATION 35] SEQUENCE {
- gameId NonZeroId,
- winnerPlayerId NonZeroId
-}
-
-PlayerIdChangedMessage ::= [APPLICATION 36] SEQUENCE {
- oldPlayerId NonZeroId,
- newPlayerId NonZeroId
-}
-
-AskKickPlayerMessage ::= [APPLICATION 64] SEQUENCE {
- gameId NonZeroId,
- playerId NonZeroId
-}
-
-AskKickDeniedMessage ::= [APPLICATION 65] SEQUENCE {
- gameId NonZeroId,
- playerId NonZeroId,
- kickDeniedReason ENUMERATED {
- kickDeniedInvalidGameState (0),
- kickDeniedNotPossible (1),
- kickDeniedTryAgainLater (2),
- kickDeniedAlreadyInProgress (3),
- kickDeniedInvalidPlayerId (4)
- }
-}
-
-StartKickPetitionMessage ::= [APPLICATION 66] SEQUENCE {
- gameId NonZeroId,
- petitionId NonZeroId,
- proposingPlayerId NonZeroId,
- kickPlayerId NonZeroId,
- kickTimeoutSec INTEGER(1..120),
- numVotesNeededToKick INTEGER(1..9)
-}
-
-VoteKickRequestMessage ::= [APPLICATION 67] SEQUENCE {
- gameId NonZeroId,
- petitionId NonZeroId,
- voteKick BOOLEAN
-}
-
-VoteKickReplyMessage ::= [APPLICATION 68] SEQUENCE {
- gameId NonZeroId,
- petitionId NonZeroId,
- voteKickReplyType CHOICE {
- voteKickAck [0] VoteKickAck,
- voteKickDenied [1] VoteKickDenied
- }
-}
-
-VoteKickAck ::= SEQUENCE {
-}
-
-VoteKickDenied ::= SEQUENCE {
- voteKickDeniedReason ENUMERATED {
- voteKickDeniedInvalid (0),
- voteKickDeniedAlreadyVoted (1)
- }
-}
-
-KickPetitionUpdateMessage ::= [APPLICATION 69] SEQUENCE {
- gameId NonZeroId,
- petitionId NonZeroId,
- numVotesAgainstKicking INTEGER(0..9),
- numVotesInFavourOfKicking INTEGER(1..9),
- numVotesNeededToKick INTEGER(1..9)
-}
-
-EndKickPetitionMessage ::= [APPLICATION 70] SEQUENCE {
- gameId NonZeroId,
- petitionId NonZeroId,
- numVotesAgainstKicking INTEGER(0..9),
- numVotesInFavourOfKicking INTEGER(1..9),
- resultPlayerKicked BOOLEAN,
- petitionEndReason ENUMERATED {
- petitionEndEnoughVotes (0),
- petitionEndTooFewPlayers (1),
- petitionEndPlayerLeft (2),
- petitionEndTimeout (3)
- }
-}
-
-StatisticsMessage ::= [APPLICATION 128] SEQUENCE {
- statisticsData SEQUENCE SIZE(1..32) OF StatisticsData
-}
-
-StatisticsData ::= SEQUENCE {
- statisticsType ENUMERATED {
- statNumberOfPlayers (1)
- },
- statisticsValue INTEGER
-}
-
-ChatRequestMessage ::= [APPLICATION 129] SEQUENCE {
- chatRequestType CHOICE {
- chatRequestTypeLobby [0] ChatRequestTypeLobby,
- chatRequestTypeGame [1] ChatRequestTypeGame,
- chatRequestTypePrivate [2] ChatRequestTypePrivate
- },
- chatText UTF8String (SIZE(1..128))
-}
-
-ChatRequestTypeLobby ::= SEQUENCE {
-}
-
-ChatRequestTypeGame ::= SEQUENCE {
- gameId NonZeroId
-}
-
-ChatRequestTypePrivate ::= SEQUENCE {
- targetPlayerId NonZeroId
-}
-
-ChatMessage ::= [APPLICATION 130] SEQUENCE {
- chatType CHOICE {
- chatTypeLobby [0] ChatTypeLobby,
- chatTypeGame [1] ChatTypeGame,
- chatTypeBot [2] ChatTypeBot,
- chatTypeBroadcast [3] ChatTypeBroadcast,
- chatTypePrivate [4] ChatTypePrivate
- },
- chatText UTF8String (SIZE(1..128))
-}
-
-ChatTypeLobby ::= SEQUENCE {
- playerId NonZeroId
-}
-
-ChatTypeGame ::= SEQUENCE {
- gameId NonZeroId,
- playerId NonZeroId
-}
-
-ChatTypeBroadcast ::= SEQUENCE {
-}
-
-ChatTypeBot ::= SEQUENCE {
-}
-
-ChatTypePrivate ::= SEQUENCE {
- playerId NonZeroId
-}
-
-ChatRejectMessage ::= [APPLICATION 131] SEQUENCE {
- chatText UTF8String (SIZE(1..128))
-}
-
-DialogMessage ::= [APPLICATION 132] SEQUENCE {
- notificationText UTF8String (SIZE(1..128))
-}
-
-TimeoutWarningMessage ::= [APPLICATION 133] SEQUENCE {
- timeoutReason ENUMERATED {
- timeoutNoDataReceived (0),
- timeoutInactiveGame (1),
- timeoutKickAfterAutofold (2)
- },
- remainingSeconds INTEGER
-}
-
-ResetTimeoutMessage ::= [APPLICATION 134] SEQUENCE {
-}
-
-ReportAvatarMessage ::= [APPLICATION 135] SEQUENCE {
- reportedPlayerId NonZeroId,
- reportedAvatar AvatarHash
-}
-
-ReportAvatarAckMessage ::= [APPLICATION 136] SEQUENCE {
- reportedPlayerId NonZeroId,
- reportAvatarResult ENUMERATED {
- avatarReportAccepted (0),
- avatarReportDuplicate (1),
- avatarReportInvalid (2)
- }
-}
-
-ReportGameMessage ::= [APPLICATION 137] SEQUENCE {
- reportedGameId NonZeroId
-}
-
-ReportGameAckMessage ::= [APPLICATION 138] SEQUENCE {
- reportedGameId NonZeroId,
- reportGameResult ENUMERATED {
- gameReportAccepted (0),
- gameReportDuplicate (1),
- gameReportInvalid (2)
- }
-}
-
-ErrorMessage ::= [APPLICATION 255] SEQUENCE {
- errorReason ENUMERATED {
- errorReserved (0),
- errorInitVersionNotSupported (1),
- errorInitServerFull (2),
- errorInitAuthFailure (3),
- errorInitPlayerNameInUse (4),
- errorInitInvalidPlayerName (5),
- errorInitServerMaintenance (6),
- errorInitBlocked (7),
- errorAvatarTooLarge (8),
- errorInvalidPacket (256),
- errorInvalidState (257),
- errorKickedFromServer (258),
- errorBannedFromServer (259),
- errorBlockedByServer (260),
- errorSessionTimeout (261)
- }
-}
-
-NetGameState ::= ENUMERATED {
- statePreflop (0),
- stateFlop (1),
- stateTurn (2),
- stateRiver (3),
- statePreflopSmallBlind (4),
- statePreflopBigBlind (5)
-}
-
-NetPlayerAction ::= ENUMERATED {
- actionNone (0),
- actionFold (1),
- actionCheck (2),
- actionCall (3),
- actionBet (4),
- actionRaise (5),
- actionAllIn (6)
-}
-
-NetPlayerState ::= ENUMERATED {
- playerStateNormal (0),
- playerStateSessionInactive (1),
- playerStateNoMoney (2)
-}
-
-NonZeroId ::= INTEGER(1..4294967295)
-
-Id ::= INTEGER(0..4294967295)
-
-Guid ::= OCTET STRING (SIZE(16))
-
-Card ::= INTEGER(0..51)
-
-AmountOfMoney ::= INTEGER(0..10000000)
-InitialAmountOfMoney ::= INTEGER(0..1000000)
-InitialNonZeroAmountOfMoney ::= INTEGER(1..1000000)
-
-END
diff --git a/load.pro b/load.pro
index c2deb473..8e3d80f1 100644
--- a/load.pro
+++ b/load.pro
@@ -42,14 +42,14 @@ unix : !mac {
QMAKE_LIBDIR += lib $${PREFIX}/lib /opt/gsasl/lib
INCLUDEPATH += $${PREFIX}/include
- LIB_DIRS = $${PREFIX}/lib $${PREFIX}/lib64
+ LIB_DIRS = $${PREFIX}/lib $${PREFIX}/lib64 $$system(qmake -query QT_INSTALL_LIBS)
BOOST_THREAD = boost_thread boost_thread-mt
BOOST_PROGRAM_OPTIONS = boost_program_options boost_program_options-mt
BOOST_SYS = boost_system boost_system-mt
#
- # searching in $PREFIX/lib and $PREFIX/lib64
+ # searching in $PREFIX/lib, $PREFIX/lib64 and $$system(qmake -query QT_INSTALL_LIBS)
# to override the default '/usr' pass PREFIX
# variable to qmake.
#
diff --git a/mac_post_make.sh b/mac_post_make.sh
index 4a465c90..f0aa99b1 100755
--- a/mac_post_make.sh
+++ b/mac_post_make.sh
@@ -9,8 +9,8 @@
# of binary-size if you leave Qt out.
# (see http://trolltech.com/developer/downloads/qt/mac)
-QT_FW_PATH="/Library/Frameworks"
-QT_PLUGIN_PATH="/Developer/Applications/Qt/plugins"
+QT_FW_PATH="/Developer/Qt5/5/clang_64/lib"
+QT_PLUGIN_PATH="/Developer/Qt5/5/clang_64/plugins"
SDL_FW_PATH="/Library/Frameworks"
APPLICATION="./pokerth.app"
BINARY="$APPLICATION/Contents/MacOs/pokerth"
@@ -27,6 +27,7 @@ mkdir $BINARY_FW_PATH
BINARY_PLUGIN_PATH="$APPLICATION/Contents/plugins"
mkdir -p $BINARY_PLUGIN_PATH/imageformats
mkdir -p $BINARY_PLUGIN_PATH/sqldrivers
+mkdir -p $BINARY_PLUGIN_PATH/platforms
# integrate SDL-frameworks into binary
cp -R $SDL_FW_PATH/SDL.framework $BINARY_FW_PATH
@@ -38,55 +39,81 @@ if [ "$1" != "--without-qt" ] ; then
cp $QT_PLUGIN_PATH/imageformats/libqgif.dylib $BINARY_PLUGIN_PATH/imageformats
cp $QT_PLUGIN_PATH/imageformats/libqjpeg.dylib $BINARY_PLUGIN_PATH/imageformats
cp $QT_PLUGIN_PATH/sqldrivers/libqsqlite.dylib $BINARY_PLUGIN_PATH/sqldrivers
- cp -R $QT_FW_PATH/QtCore.framework $BINARY_FW_PATH
+ cp $QT_PLUGIN_PATH/platforms/libqcocoa.dylib $BINARY_PLUGIN_PATH/platforms
+ cp -R $QT_FW_PATH/QtCore.framework $BINARY_FW_PATH
cp -R $QT_FW_PATH/QtGui.framework $BINARY_FW_PATH
+ cp -R $QT_FW_PATH/QtWidgets.framework $BINARY_FW_PATH
cp -R $QT_FW_PATH/QtSql.framework $BINARY_FW_PATH
cp -R $QT_FW_PATH/QtNetwork.framework $BINARY_FW_PATH
+ cp -R $QT_FW_PATH/QtPrintSupport.framework $BINARY_FW_PATH
# remove debug versions
rm -f $APPLICATION/Contents/Frameworks/QtCore.framework/QtCore_debug
- rm -rf $APPLICATION/Contents/Frameworks/QtCore.framework/QtCore_debug.dSYM
rm -f $APPLICATION/Contents/Frameworks/QtCore.framework/QtCore_debug.prl
- rm -f $APPLICATION/Contents/Frameworks/QtCore.framework/Versions/4/QtCore_debug
+ rm -f $APPLICATION/Contents/Frameworks/QtCore.framework/Versions/5/QtCore_debug
rm -f $APPLICATION/Contents/Frameworks/QtGui.framework/QtGui_debug
- rm -rf $APPLICATION/Contents/Frameworks/QtGui.framework/QtGui_debug.dSYM
rm -f $APPLICATION/Contents/Frameworks/QtGui.framework/QtGui_debug.prl
- rm -f $APPLICATION/Contents/Frameworks/QtGui.framework/Versions/4/QtGui_debug
+ rm -f $APPLICATION/Contents/Frameworks/QtGui.framework/Versions/5/QtGui_debug
+ rm -f $APPLICATION/Contents/Frameworks/QtWidgets.framework/QtWidgets_debug
+ rm -f $APPLICATION/Contents/Frameworks/QtWidgets.framework/QtWidgets_debug.prl
+ rm -f $APPLICATION/Contents/Frameworks/QtWidgets.framework/Versions/5/QtWidgets_debug
rm -f $APPLICATION/Contents/Frameworks/QtSql.framework/QtSql_debug
- rm -rf $APPLICATION/Contents/Frameworks/QtSql.framework/QtSql_debug.dSYM
rm -f $APPLICATION/Contents/Frameworks/QtSql.framework/QtSql_debug.prl
- rm -f $APPLICATION/Contents/Frameworks/QtSql.framework/Versions/4/QtSql_debug
+ rm -f $APPLICATION/Contents/Frameworks/QtSql.framework/Versions/5/QtSql_debug
rm -f $APPLICATION/Contents/Frameworks/QtNetwork.framework/QtNetwork_debug
- rm -rf $APPLICATION/Contents/Frameworks/QtNetwork.framework/QtNetwork_debug.dSYM
rm -f $APPLICATION/Contents/Frameworks/QtNetwork.framework/QtNetwork_debug.prl
- rm -f $APPLICATION/Contents/Frameworks/QtNetwork.framework/Versions/4/QtNetwork_debug
+ rm -f $APPLICATION/Contents/Frameworks/QtNetwork.framework/Versions/5/QtNetwork_debug
+ rm -f $APPLICATION/Contents/Frameworks/QtPrintSupport.framework/QtPrintSupport_debug
+ rm -f $APPLICATION/Contents/Frameworks/QtPrintSupport.framework/QtPrintSupport_debug.prl
+ rm -f $APPLICATION/Contents/Frameworks/QtPrintSupport.framework/Versions/5/QtPrintSupport_debug
- # redirect binary to use integrated frameworks
- QTCORE="QtCore.framework/Versions/4.0/QtCore"
- QTGUI="QtGui.framework/Versions/4.0/QtGui"
- QTSQL="QtSql.framework/Versions/4.0/QtSql"
- QTNETWORK="QtNetwork.framework/Versions/4.0/QtNetwork"
+ # redirect binary to use integrated frameworks
+ QTCORE="QtCore.framework/Versions/5/QtCore"
+ QTGUI="QtGui.framework/Versions/5/QtGui"
+ QTWIDGETS="QtWidgets.framework/Versions/5/QtWidgets"
+ QTSQL="QtSql.framework/Versions/5/QtSql"
+ QTNETWORK="QtNetwork.framework/Versions/5/QtNetwork"
+ QTPRINT="QtPrintSupport.framework/Versions/5/QtPrintSupport"
install_name_tool -id @executable_path/../Frameworks/$QTCORE $BINARY_FW_PATH/$QTCORE
- install_name_tool -id @executable_path/../Frameworks/$QTGUI $BINARY_FW_PATH/$QTGUI
+ install_name_tool -id @executable_path/../Frameworks/$QTGUI $BINARY_FW_PATH/$QTGUI
+ install_name_tool -id @executable_path/../Frameworks/$QTWIDGETS $BINARY_FW_PATH/$QTWIDGETS
install_name_tool -id @executable_path/../Frameworks/$QTSQL $BINARY_FW_PATH/$QTSQL
- install_name_tool -id @executable_path/../Frameworks/$QTSQL $BINARY_FW_PATH/$QTNETWORK
+ install_name_tool -id @executable_path/../Frameworks/$QTNETWORK $BINARY_FW_PATH/$QTNETWORK
+ install_name_tool -id @executable_path/../Frameworks/$QTPRINT $BINARY_FW_PATH/$QTPRINT
QTCORE_LINK=$(otool -L $BINARY | grep QtCore | cut -d"(" -f1 | cut -f2)
- QTGUI_LINK=$(otool -L $BINARY | grep QtGui | cut -d"(" -f1 | cut -f2)
+ QTGUI_LINK=$(otool -L $BINARY | grep QtGui | cut -d"(" -f1 | cut -f2)
+ QTWIDGETS_LINK=$(otool -L $BINARY | grep QtWidgets | cut -d"(" -f1 | cut -f2)
QTSQL_LINK=$(otool -L $BINARY | grep QtSql | cut -d"(" -f1 | cut -f2)
QTNETWORK_LINK=$(otool -L $BINARY | grep QtNetwork | cut -d"(" -f1 | cut -f2)
+ QTPRINT_LINK=$(otool -L $BINARY_PLUGIN_PATH/platforms/libqcocoa.dylib | grep QtPrintSupport | cut -d"(" -f1 | cut -f2)
install_name_tool -change $QTCORE_LINK @executable_path/../Frameworks/$QTCORE $BINARY
- install_name_tool -change $QTGUI_LINK @executable_path/../Frameworks/$QTGUI $BINARY
+ install_name_tool -change $QTGUI_LINK @executable_path/../Frameworks/$QTGUI $BINARY
+ install_name_tool -change $QTWIDGETS_LINK @executable_path/../Frameworks/$QTWIDGETS $BINARY
install_name_tool -change $QTSQL_LINK @executable_path/../Frameworks/$QTSQL $BINARY
install_name_tool -change $QTNETWORK_LINK @executable_path/../Frameworks/$QTNETWORK $BINARY
install_name_tool -change $QTCORE_LINK @executable_path/../Frameworks/$QTCORE $BINARY_PLUGIN_PATH/imageformats/libqgif.dylib
install_name_tool -change $QTGUI_LINK @executable_path/../Frameworks/$QTGUI $BINARY_PLUGIN_PATH/imageformats/libqgif.dylib
+ install_name_tool -change $QTWIDGETS_LINK @executable_path/../Frameworks/$QTWIDGETS $BINARY_PLUGIN_PATH/imageformats/libqgif.dylib
install_name_tool -change $QTCORE_LINK @executable_path/../Frameworks/$QTCORE $BINARY_PLUGIN_PATH/imageformats/libqjpeg.dylib
install_name_tool -change $QTGUI_LINK @executable_path/../Frameworks/$QTGUI $BINARY_PLUGIN_PATH/imageformats/libqjpeg.dylib
+ install_name_tool -change $QTWIDGETS_LINK @executable_path/../Frameworks/$QTWIDGETS $BINARY_PLUGIN_PATH/imageformats/libqjpeg.dylib
install_name_tool -change $QTCORE_LINK @executable_path/../Frameworks/$QTCORE $BINARY_PLUGIN_PATH/sqldrivers/libqsqlite.dylib
install_name_tool -change $QTSQL_LINK @executable_path/../Frameworks/$QTSQL $BINARY_PLUGIN_PATH/sqldrivers/libqsqlite.dylib
+ install_name_tool -change $QTCORE_LINK @executable_path/../Frameworks/$QTCORE $BINARY_PLUGIN_PATH/platforms/libqcocoa.dylib
+ install_name_tool -change $QTGUI_LINK @executable_path/../Frameworks/$QTGUI $BINARY_PLUGIN_PATH/platforms/libqcocoa.dylib
+ install_name_tool -change $QTWIDGETS_LINK @executable_path/../Frameworks/$QTWIDGETS $BINARY_PLUGIN_PATH/platforms/libqcocoa.dylib
+ install_name_tool -change $QTPRINT_LINK @executable_path/../Frameworks/$QTPRINT $BINARY_PLUGIN_PATH/platforms/libqcocoa.dylib
QTCORE_LINK=$(otool -L $BINARY_FW_PATH/$QTGUI | grep QtCore | head -1 | cut -d"(" -f1 | cut -f2)
install_name_tool -change $QTCORE_LINK @executable_path/../Frameworks/$QTCORE $BINARY_FW_PATH/$QTGUI
+ install_name_tool -change $QTCORE_LINK @executable_path/../Frameworks/$QTCORE $BINARY_FW_PATH/$QTWIDGETS
install_name_tool -change $QTCORE_LINK @executable_path/../Frameworks/$QTCORE $BINARY_FW_PATH/$QTSQL
install_name_tool -change $QTCORE_LINK @executable_path/../Frameworks/$QTCORE $BINARY_FW_PATH/$QTNETWORK
+ install_name_tool -change $QTCORE_LINK @executable_path/../Frameworks/$QTCORE $BINARY_FW_PATH/$QTPRINT
+ QTGUI_LINK=$(otool -L $BINARY_FW_PATH/$QTWIDGETS | grep QtGui | cut -d"(" -f1 | cut -f2)
+ install_name_tool -change $QTGUI_LINK @executable_path/../Frameworks/$QTGUI $BINARY_FW_PATH/$QTWIDGETS
+ install_name_tool -change $QTGUI_LINK @executable_path/../Frameworks/$QTGUI $BINARY_FW_PATH/$QTPRINT
+
+ QTWIDGETS_LINK=$(otool -L $BINARY_FW_PATH/$QTPRINT | grep QtWidgets | cut -d"(" -f1 | cut -f2)
+ install_name_tool -change $QTWIDGETS_LINK @executable_path/../Frameworks/$QTWIDGETS $BINARY_FW_PATH/$QTPRINT
fi
diff --git a/pokerth.pro b/pokerth.pro
index b63a1c81..181b1e2d 100755
--- a/pokerth.pro
+++ b/pokerth.pro
@@ -6,3 +6,33 @@ SUBDIRS = pokerth_protocol.pro pokerth_db.pro pokerth_lib.pro pokerth_game.pro
SUBDIRS += pokerth_server.pro chatcleaner.pro
}
CONFIG += ordered
+
+OTHER_FILES += \
+ android/src/org/kde/necessitas/ministro/IMinistro.aidl \
+ android/src/org/kde/necessitas/ministro/IMinistroCallback.aidl \
+ android/src/org/qtproject/qt5/android/bindings/QtActivity.java \
+ android/src/org/qtproject/qt5/android/bindings/QtApplication.java \
+ android/res/values-pl/strings.xml \
+ android/res/values-es/strings.xml \
+ android/res/values-it/strings.xml \
+ android/res/values-ru/strings.xml \
+ android/res/values-et/strings.xml \
+ android/res/values-rs/strings.xml \
+ android/res/values-ja/strings.xml \
+ android/res/values-fa/strings.xml \
+ android/res/values-ro/strings.xml \
+ android/res/values-zh-rTW/strings.xml \
+ android/res/values-nl/strings.xml \
+ android/res/values-zh-rCN/strings.xml \
+ android/res/values-pt-rBR/strings.xml \
+ android/res/values-el/strings.xml \
+ android/res/layout/splash.xml \
+ android/res/values-fr/strings.xml \
+ android/res/values-id/strings.xml \
+ android/res/values-ms/strings.xml \
+ android/res/values-de/strings.xml \
+ android/res/values-nb/strings.xml \
+ android/res/values/strings.xml \
+ android/res/values/libs.xml \
+ android/version.xml \
+ android/AndroidManifest.xml
diff --git a/pokerth.proto b/pokerth.proto
index 5cbfdbd1..bc880873 100644
--- a/pokerth.proto
+++ b/pokerth.proto
@@ -110,6 +110,7 @@ message NetGameInfo {
required uint32 firstSmallBlind = 12;
required uint32 startMoney = 13;
repeated uint32 manualBlinds = 14 [packed = true];
+ optional bool allowSpectators = 15 [default = true];
}
// Message Part containing player result.
@@ -223,6 +224,7 @@ message GameListNewMessage {
repeated uint32 playerIds = 4 [packed = true];
required uint32 adminPlayerId = 5;
required NetGameInfo gameInfo = 6;
+ repeated uint32 spectatorIds = 7 [packed = true];
}
message GameListUpdateMessage {
@@ -288,8 +290,8 @@ message SubscriptionRequestMessage {
message JoinExistingGameMessage {
required uint32 gameId = 1;
optional string password = 2;
- optional bool autoLeave = 3;
- optional bool spectateOnly = 4;
+ optional bool autoLeave = 3 [default = false];
+ optional bool spectateOnly = 4 [default = false];
}
message JoinNewGameMessage {
@@ -307,6 +309,7 @@ message JoinGameAckMessage {
required uint32 gameId = 1;
required bool areYouGameAdmin = 2;
required NetGameInfo gameInfo = 3;
+ optional bool spectateOnly = 4;
}
message JoinGameFailedMessage {
@@ -323,6 +326,7 @@ message JoinGameFailedMessage {
invalidSettings = 9;
ipAddressBlocked = 10;
rejoinFailed = 11;
+ noSpectatorsAllowed = 12;
}
required JoinGameFailureReason joinGameFailureReason = 2;
}
@@ -369,6 +373,7 @@ message RemovedFromGameMessage {
gameIsRunning = 3;
gameTimeout = 4;
removedStartFailed = 5;
+ gameClosed = 6;
}
required RemovedFromGameReason removedFromGameReason = 2;
}
@@ -449,6 +454,7 @@ message HandStartMessage {
optional bytes encryptedCards = 3;
required uint32 smallBlind = 4;
repeated NetPlayerState seatStates = 5;
+ optional uint32 dealerPlayerId = 6;
}
message PlayersTurnMessage {
diff --git a/pokerth_db.pro b/pokerth_db.pro
index b610fce2..7c2d1428 100644
--- a/pokerth_db.pro
+++ b/pokerth_db.pro
@@ -64,7 +64,8 @@ mac{
# on Intel-Mac you have to comment this line out or build will fail.
# QMAKE_MAC_SDK=/Developer/SDKs/MacOSX10.4u.sdk/
- INCLUDEPATH += /Developer/SDKs/MacOSX10.6.sdk/usr/include/
+ INCLUDEPATH += /Developer/SDKs/MacOSX10.6.sdk/usr/include/
INCLUDEPATH += /Library/Frameworks/SDL.framework/Headers
INCLUDEPATH += /Library/Frameworks/SDL_mixer.framework/Headers
+ INCLUDEPATH += /usr/local/include
}
diff --git a/pokerth_game.pro b/pokerth_game.pro
index 7ca9cf35..d660452e 100644
--- a/pokerth_game.pro
+++ b/pokerth_game.pro
@@ -18,6 +18,7 @@ CONFIG += qt \
warn_on
include(src/third_party/qtsingleapplication/qtsingleapplication.pri)
QT += sql
+greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
UI_DIR = uics
MOC_DIR = mocs
OBJECTS_DIR = obj
@@ -42,7 +43,6 @@ INCLUDEPATH += . \
src/engine/local_engine \
src/engine/network_engine \
src/config \
- src/third_party/asn1 \
src/gui/qt \
src/gui/qt/connecttoserverdialog \
src/core \
@@ -200,7 +200,6 @@ HEADERS += src/engine/game.h \
src/gui/generic/serverguiwrapper.h \
src/gui/qt/gametable/mychancelabel.h \
src/gui/qt/serverlistdialog/serverlistdialogimpl.h \
- src/gui/qt/gametable/mymenubar.h \
src/gui/qt/gametable/mytimeoutlabel.h \
src/gui/qt/gametable/mynamelabel.h \
src/gui/qt/settingsdialog/mystylelistitem.h \
@@ -277,7 +276,6 @@ SOURCES += src/pokerth.cpp \
src/core/common/loghelper_client.cpp \
src/gui/qt/gametable/mychancelabel.cpp \
src/gui/qt/serverlistdialog/serverlistdialogimpl.cpp \
- src/gui/qt/gametable/mymenubar.cpp \
src/gui/qt/gametable/mytimeoutlabel.cpp \
src/gui/qt/gametable/mynamelabel.cpp \
src/gui/qt/settingsdialog/mystylelistitem.cpp \
@@ -318,6 +316,7 @@ TRANSLATIONS = ts/pokerth_af.ts \
ts/pokerth_sv.ts \
ts/pokerth_ta.ts \
ts/pokerth_tr.ts \
+ ts/pokerth_vi.ts \
ts/pokerth_START_HERE.ts
LIBS += -lpokerth_lib \
@@ -358,12 +357,12 @@ win32 {
-lcrypto \
-lssh2 \
-lgnutls \
- -lnettle \
-lhogweed \
-lgmp \
-lgcrypt \
-lgpg-error \
-lgsasl \
+ -lnettle \
-lidn \
-lintl \
-lprotobuf
@@ -404,15 +403,16 @@ unix:!mac {
# QMAKE_CXXFLAGS += -ffunction-sections -fdata-sections
# QMAKE_LFLAGS += -Wl,--gc-sections
INCLUDEPATH += $${PREFIX}/include
- LIBPATH += lib
+ QMAKE_LIBDIR += lib
!android{
LIBPATH += $${PREFIX}/lib /opt/gsasl/lib
LIB_DIRS = $${PREFIX}/lib \
- $${PREFIX}/lib64
+ $${PREFIX}/lib64 \
+ $$system(qmake -query QT_INSTALL_LIBS)
}
android{
- LIBPATH += $${PREFIX}/lib/armv5
- LIB_DIRS = $${PREFIX}/lib/armv5
+ LIBPATH += $${PREFIX}/lib/armv7
+ LIB_DIRS = $${PREFIX}/lib/armv7
}
BOOST_FS = boost_filesystem \
boost_filesystem-mt
@@ -427,7 +427,7 @@ unix:!mac {
BOOST_RANDOM = boost_random \
boost_random-mt
- # searching in $PREFIX/lib and $PREFIX/lib64
+ # searching in $PREFIX/lib, $PREFIX/lib64 and $$system(qmake -query QT_INSTALL_LIBS)
# to override the default '/usr' pass PREFIX
# variable to qmake.
for(dir, LIB_DIRS):exists($$dir) {
@@ -596,6 +596,7 @@ mac {
INCLUDEPATH += /Developer/SDKs/MacOSX10.6.sdk/usr/include/
INCLUDEPATH += /Library/Frameworks/SDL.framework/Headers
INCLUDEPATH += /Library/Frameworks/SDL_mixer.framework/Headers
+ INCLUDEPATH += /usr/local/include
}
OTHER_FILES += docs/infomessage-id-desc.txt
official_server {
@@ -634,7 +635,8 @@ gui_800x480 {
android{
# Use old boost::filesystem, because the new version requires std::wstring.
- DEFINES += BOOST_FILESYSTEM_VERSION=2
+ DEFINES += BOOST_FILESYSTEM_VERSION=3
+ DEFINES += TIXML_USE_STL
# sqlite3 is included directly.
INCLUDEPATH += src/third_party/sqlite3
diff --git a/pokerth_lib.pro b/pokerth_lib.pro
index 213976fc..6db489d8 100644
--- a/pokerth_lib.pro
+++ b/pokerth_lib.pro
@@ -27,8 +27,8 @@ INCLUDEPATH += . \
src/engine/local_engine \
src/engine/network_engine \
src/config \
- src/third_party/asn1 \
- src/core
+ src/core \
+ src/third_party/websocketpp
DEPENDPATH += . \
src \
@@ -42,7 +42,7 @@ DEPENDPATH += . \
src/core/common \
src/engine/local_engine \
src/engine/network_engine \
- src/net/common \
+ src/net/common
# Input
HEADERS += \
@@ -75,7 +75,9 @@ HEADERS += \
src/net/senderhelper.h \
src/net/sendercallback.h \
src/net/serverexception.h \
+ src/net/serveracceptinterface.h \
src/net/serveraccepthelper.h \
+ src/net/serveracceptwebhelper.h \
src/net/servergame.h \
src/net/servergamestate.h \
src/net/serverlobbythread.h \
@@ -100,7 +102,6 @@ HEADERS += \
src/net/uploadhelper.h \
src/net/downloaderthread.h \
src/net/downloadhelper.h \
- src/net/internalchatcleanerpacket.h \
src/engine/local_engine/cardsvalue.h \
src/engine/local_engine/localboard.h \
src/engine/local_engine/localenginefactory.h \
@@ -129,9 +130,15 @@ HEADERS += \
src/gui/qttoolsinterface.h \
src/gui/generic/serverguiwrapper.h \
src/net/receivebuffer.h \
+ src/net/asioreceivebuffer.h \
+ src/net/webreceivebuffer.h \
src/net/sendbuffer.h \
+ src/net/asiosendbuffer.h \
+ src/net/websendbuffer.h \
src/net/servermanagerfactory.h \
- src/net/uploadcallback.h
+ src/net/uploadcallback.h \
+ src/net/websocket_defs.h \
+ src/net/websocketdata.h
SOURCES += \
src/engine/game.cpp \
@@ -180,7 +187,8 @@ SOURCES += \
src/net/common/senderhelper.cpp \
src/net/common/sendercallback.cpp \
src/net/common/serverexception.cpp \
- src/net/common/serveraccepthelper.cpp \
+ src/net/common/serveracceptinterface.cpp \
+ src/net/common/serveracceptwebhelper.cpp \
src/net/common/servergame.cpp \
src/net/common/servergamestate.cpp \
src/net/common/serverlobbythread.cpp \
@@ -201,11 +209,14 @@ SOURCES += \
src/net/common/transferhelper.cpp \
src/net/common/uploaderthread.cpp \
src/net/common/uploadhelper.cpp \
- src/net/common/internalchatcleanerpacket.cpp \
src/gui/generic/serverguiwrapper.cpp \
src/gui/qttoolsinterface.cpp \
src/net/common/sendbuffer.cpp \
+ src/net/common/asiosendbuffer.cpp \
+ src/net/common/websendbuffer.cpp \
src/net/common/receivebuffer.cpp \
+ src/net/common/asioreceivebuffer.cpp \
+ src/net/common/webreceivebuffer.cpp \
src/net/common/uploadcallback.cpp
!android:!android_test{
@@ -250,12 +261,12 @@ mac{
INCLUDEPATH += /Developer/SDKs/MacOSX10.6.sdk/usr/include/
INCLUDEPATH += /Library/Frameworks/SDL.framework/Headers
INCLUDEPATH += /Library/Frameworks/SDL_mixer.framework/Headers
- INCLUDEPATH += /opt/local/include
+ INCLUDEPATH += /usr/local/include
}
android{
# Use old boost::filesystem, because the new version requires std::wstring.
- DEFINES += BOOST_FILESYSTEM_VERSION=2
+ DEFINES += BOOST_FILESYSTEM_VERSION=3
# sqlite3 is included directly.
INCLUDEPATH += src/third_party/sqlite3
SOURCES += src/third_party/sqlite3/sqlite3.c
diff --git a/pokerth_protocol.pro b/pokerth_protocol.pro
index 4b1be2bf..7a331df5 100644
--- a/pokerth_protocol.pro
+++ b/pokerth_protocol.pro
@@ -18,96 +18,24 @@ QT -= core \
# PRECOMPILED_HEADER = src/pch_lib.h
INCLUDEPATH += . \
- src \
- src/third_party/asn1
+ src
DEPENDPATH += . \
- src \
- src/third_party/asn1
+ src
# Input
-HEADERS += src/third_party/asn1/asn_application.h \
- src/third_party/asn1/asn_codecs.h \
- src/third_party/asn1/asn_codecs_prim.h \
- src/third_party/asn1/asn_internal.h \
- src/third_party/asn1/asn_SEQUENCE_OF.h \
- src/third_party/asn1/asn_SET_OF.h \
- src/third_party/asn1/asn_system.h \
- src/third_party/asn1/ber_decoder.h \
- src/third_party/asn1/ber_tlv_length.h \
- src/third_party/asn1/ber_tlv_tag.h \
- src/third_party/asn1/BIT_STRING.h \
- src/third_party/asn1/BOOLEAN.h \
- src/third_party/asn1/constraints.h \
- src/third_party/asn1/constr_CHOICE.h \
- src/third_party/asn1/constr_SEQUENCE.h \
- src/third_party/asn1/constr_SEQUENCE_OF.h \
- src/third_party/asn1/constr_SET_OF.h \
- src/third_party/asn1/constr_TYPE.h \
- src/third_party/asn1/der_encoder.h \
- src/third_party/asn1/INTEGER.h \
- src/third_party/asn1/NativeEnumerated.h \
- src/third_party/asn1/NativeInteger.h \
- src/third_party/asn1/OCTET_STRING.h \
- src/third_party/asn1/per_decoder.h \
- src/third_party/asn1/per_encoder.h \
- src/third_party/asn1/per_opentype.h \
- src/third_party/asn1/per_support.h \
- src/third_party/asn1/UTF8String.h \
- src/third_party/asn1/xer_decoder.h \
- src/third_party/asn1/xer_encoder.h \
- src/third_party/asn1/xer_support.h \
- src/third_party/asn1/ChatCleanerMessage.h \
- src/third_party/asn1/CleanerChatTypeLobby.h \
- src/third_party/asn1/CleanerChatTypeGame.h \
- src/third_party/asn1/CleanerChatType.h \
- src/third_party/asn1/CleanerInitMessage.h \
- src/third_party/asn1/CleanerInitAckMessage.h \
- src/third_party/asn1/CleanerChatRequestMessage.h \
- src/third_party/asn1/CleanerChatReplyMessage.h
-HEADERS += src/third_party/protobuf/pokerth.pb.h
-SOURCES += src/third_party/asn1/ChatCleanerMessage.c \
- src/third_party/asn1/CleanerChatTypeLobby.c \
- src/third_party/asn1/CleanerChatTypeGame.c \
- src/third_party/asn1/CleanerChatType.c \
- src/third_party/asn1/CleanerInitMessage.c \
- src/third_party/asn1/CleanerInitAckMessage.c \
- src/third_party/asn1/CleanerChatRequestMessage.c \
- src/third_party/asn1/CleanerChatReplyMessage.c \
- src/third_party/asn1/xer_support.c \
- src/third_party/asn1/xer_encoder.c \
- src/third_party/asn1/xer_decoder.c \
- src/third_party/asn1/UTF8String.c \
- src/third_party/asn1/per_support.c \
- src/third_party/asn1/per_opentype.c \
- src/third_party/asn1/per_encoder.c \
- src/third_party/asn1/per_decoder.c \
- src/third_party/asn1/OCTET_STRING.c \
- src/third_party/asn1/NativeInteger.c \
- src/third_party/asn1/NativeEnumerated.c \
- src/third_party/asn1/INTEGER.c \
- src/third_party/asn1/der_encoder.c \
- src/third_party/asn1/constraints.c \
- src/third_party/asn1/constr_TYPE.c \
- src/third_party/asn1/constr_SET_OF.c \
- src/third_party/asn1/constr_SEQUENCE_OF.c \
- src/third_party/asn1/constr_SEQUENCE.c \
- src/third_party/asn1/constr_CHOICE.c \
- src/third_party/asn1/BOOLEAN.c \
- src/third_party/asn1/BIT_STRING.c \
- src/third_party/asn1/ber_tlv_tag.c \
- src/third_party/asn1/ber_tlv_length.c \
- src/third_party/asn1/ber_decoder.c \
- src/third_party/asn1/asn_SET_OF.c \
- src/third_party/asn1/asn_SEQUENCE_OF.c \
- src/third_party/asn1/asn_codecs_prim.c
-SOURCES += src/third_party/protobuf/pokerth.pb.cc
-win32 {
+
+HEADERS += src/third_party/protobuf/pokerth.pb.h \
+ src/third_party/protobuf/chatcleaner.pb.h
+SOURCES += src/third_party/protobuf/pokerth.pb.cc \
+ src/third_party/protobuf/chatcleaner.pb.cc
+win32 {
DEFINES += CURL_STATICLIB
DEFINES += _WIN32_WINNT=0x0501
}
unix : !mac {
INCLUDEPATH += $${PREFIX}/include
system(protoc pokerth.proto --cpp_out=src/third_party/protobuf)
+ system(protoc chatcleaner.proto --cpp_out=src/third_party/protobuf)
system(protoc pokerth.proto --java_out=tests/src)
}
mac {
@@ -120,7 +48,8 @@ mac {
# for universal-compilation on PPC-Mac uncomment the following line
# on Intel-Mac you have to comment this line out or build will fail.
# QMAKE_MAC_SDK=/Developer/SDKs/MacOSX10.4u.sdk/
- INCLUDEPATH += /Developer/SDKs/MacOSX10.6.sdk/usr/include/
+ INCLUDEPATH += /Developer/SDKs/MacOSX10.6.sdk/usr/include/
INCLUDEPATH += /Library/Frameworks/SDL.framework/Headers
INCLUDEPATH += /Library/Frameworks/SDL_mixer.framework/Headers
+ INCLUDEPATH += /usr/local/include
}
diff --git a/pokerth_server.pro b/pokerth_server.pro
index 69957cb7..706475f7 100644
--- a/pokerth_server.pro
+++ b/pokerth_server.pro
@@ -30,7 +30,6 @@ INCLUDEPATH += . \
src/engine/local_engine \
src/engine/network_engine \
src/config \
- src/third_party/asn1 \
src/core \
DEPENDPATH += . \
@@ -131,7 +130,7 @@ win32 {
debug:LIBPATH += debug/lib
release:LIBPATH += release/lib
- LIBS += -lssl -lcrypto -lssh2 -lgnutls -lnettle -lhogweed -lgmp -lgcrypt -lgpg-error -lgsasl -lidn -lintl -lprotobuf -ltinyxml -lsqlite3 -lntlm
+ LIBS += -lssl -lcrypto -lssh2 -lgnutls -lhogweed -lgmp -lgcrypt -lgpg-error -lgsasl -lnettle -lidn -lintl -lprotobuf -ltinyxml -lsqlite3 -lntlm
LIBS += -lboost_thread_win32-mt
LIBS += -lboost_filesystem-mt
LIBS += -lboost_regex-mt
@@ -176,7 +175,7 @@ unix : !mac {
LIBPATH += lib $${PREFIX}/lib /opt/gsasl/lib
INCLUDEPATH += $${PREFIX}/include
- LIB_DIRS = $${PREFIX}/lib $${PREFIX}/lib64
+ LIB_DIRS = $${PREFIX}/lib $${PREFIX}/lib64 $$system(qmake -query QT_INSTALL_LIBS)
BOOST_FS = boost_filesystem boost_filesystem-mt
BOOST_THREAD = boost_thread boost_thread-mt
BOOST_PROGRAM_OPTIONS = boost_program_options boost_program_options-mt
@@ -186,7 +185,7 @@ unix : !mac {
BOOST_RANDOM = boost_random boost_random-mt
#
- # searching in $PREFIX/lib and $PREFIX/lib64
+ # searching in $PREFIX/lib, $PREFIX/lib64 and $$system(qmake -query QT_INSTALL_LIBS)
# to override the default '/usr' pass PREFIX
# variable to qmake.
#
@@ -316,6 +315,7 @@ mac {
RC_FILE = pokerth.icns
LIBPATH += /Developer/SDKs/MacOSX10.6.sdk/usr/lib
INCLUDEPATH += /Developer/SDKs/MacOSX10.6.sdk/usr/include/
+ INCLUDEPATH += /usr/local/include
}
official_server {
diff --git a/src/chatcleaner/cleanerconfig.cpp b/src/chatcleaner/cleanerconfig.cpp
index cee11f61..26492dbc 100644
--- a/src/chatcleaner/cleanerconfig.cpp
+++ b/src/chatcleaner/cleanerconfig.cpp
@@ -29,6 +29,8 @@
* as that of the covered work. *
*****************************************************************************/
#include "cleanerconfig.h"
+#include
+
#include
#define MODUS 0711
@@ -46,8 +48,6 @@
#include
#include
-#include
-
using namespace std;
diff --git a/src/chatcleaner/cleanerserver.cpp b/src/chatcleaner/cleanerserver.cpp
index 34066149..13e7b62e 100644
--- a/src/chatcleaner/cleanerserver.cpp
+++ b/src/chatcleaner/cleanerserver.cpp
@@ -32,9 +32,10 @@
#include
#include
+#include
#include
#include
-#include
+#include
#include "messagefilter.h"
#include "cleanerconfig.h"
@@ -82,6 +83,9 @@ void CleanerServer::newCon()
connect(tcpSocket, SIGNAL(readyRead()), this, SLOT(onRead()));
connect(tcpSocket, SIGNAL(stateChanged(QAbstractSocket::SocketState)), this, SLOT(socketStateChanged(QAbstractSocket::SocketState)));
blockConnection = true;
+#if QT_VERSION >= 0x050100
+ tcpServer->pauseAccepting();
+#endif
}
}
@@ -91,23 +95,38 @@ void CleanerServer::onRead()
bool error = bytesRead < 1;
if (!error) {
m_recvBufUsed += bytesRead;
-
- asn_dec_rval_t retVal;
+ bool valid;
do {
- // Try to decode the packets.
- InternalChatCleanerPacket recvMsg;
- retVal = ber_decode(0, &asn_DEF_ChatCleanerMessage, (void **)recvMsg.GetMsgPtr(), m_recvBuf, m_recvBufUsed);
- if(retVal.code == RC_OK) {
- if (retVal.consumed < m_recvBufUsed) {
- m_recvBufUsed -= retVal.consumed;
- memmove(m_recvBuf, m_recvBuf + retVal.consumed, m_recvBufUsed);
- } else
+ valid = false;
+ if (m_recvBufUsed >= CLEANER_NET_HEADER_SIZE) {
+ // Read the size of the packet (first 4 bytes in network byte order).
+ uint32_t nativeVal;
+ memcpy(&nativeVal, &m_recvBuf[0], sizeof(uint32_t));
+ size_t packetSize = qFromBigEndian(nativeVal);
+ if (packetSize > MAX_CLEANER_PACKET_SIZE) {
m_recvBufUsed = 0;
-
- // Handle the packets.
- error = handleMessage(recvMsg);
+ qDebug() << "Invalid packet size: " << packetSize;
+ } else if (m_recvBufUsed >= packetSize + CLEANER_NET_HEADER_SIZE) {
+ try {
+ // Try to decode the packet.
+ boost::shared_ptr recvMsg(ChatCleanerMessage::default_instance().New());
+ if (recvMsg->ParseFromArray(&m_recvBuf[CLEANER_NET_HEADER_SIZE], static_cast(packetSize))) {
+ m_recvBufUsed -= (packetSize + CLEANER_NET_HEADER_SIZE);
+ if (m_recvBufUsed) {
+ memmove(m_recvBuf, m_recvBuf + packetSize + CLEANER_NET_HEADER_SIZE, m_recvBufUsed);
+ }
+ }
+ // Handle the packet.
+ error = handleMessage(*recvMsg);
+ valid = true;
+ } catch (const exception &e) {
+ // Reset buffer on error.
+ m_recvBufUsed = 0;
+ qDebug() << "Exception while decoding packet: " << e.what();
+ }
+ }
}
- } while (!error && retVal.code == RC_OK);
+ } while (valid && !error);
}
if (error) {
@@ -128,71 +147,58 @@ void CleanerServer::onRead()
tcpSocket->write(checkMessage.toAscii().data(), checkMessage.length());*/
}
-bool CleanerServer::handleMessage(InternalChatCleanerPacket &msg)
+bool CleanerServer::handleMessage(ChatCleanerMessage &msg)
{
bool error = true;
- if (msg.GetMsg()->present == ChatCleanerMessage_PR_cleanerInitMessage) {
- CleanerInitMessage_t *netInit = &msg.GetMsg()->choice.cleanerInitMessage;
- if (netInit->requestedVersion == CLEANER_PROTOCOL_VERSION) {
- string tmpClientSecret((const char *)netInit->clientSecret.buf, netInit->clientSecret.size);
- if (clientSecret == QString::fromStdString(tmpClientSecret)) {
+ if (msg.messagetype() == ChatCleanerMessage::Type_CleanerInitMessage) {
+ const CleanerInitMessage &netInit = msg.cleanerinitmessage();
+ if (netInit.requestedversion() == CLEANER_PROTOCOL_VERSION) {
+ if (clientSecret == QString::fromStdString(netInit.clientsecret())) {
error = false;
- InternalChatCleanerPacket tmpAck;
- tmpAck.GetMsg()->present = ChatCleanerMessage_PR_cleanerInitAckMessage;
- CleanerInitAckMessage_t *netAck = &tmpAck.GetMsg()->choice.cleanerInitAckMessage;
- netAck->serverVersion = CLEANER_PROTOCOL_VERSION;
- string tmpServerSecret(serverSecret.toStdString());
- OCTET_STRING_fromBuf(&netAck->serverSecret,
- tmpServerSecret.c_str(),
- tmpServerSecret.length());
- sendMessageToClient(tmpAck);
+ boost::shared_ptr tmpAck(ChatCleanerMessage::default_instance().New());
+ tmpAck->set_messagetype(ChatCleanerMessage::Type_CleanerInitAckMessage);
+ CleanerInitAckMessage *netAck = tmpAck->mutable_cleanerinitackmessage();
+ netAck->set_serverversion(CLEANER_PROTOCOL_VERSION);
+ netAck->set_serversecret(serverSecret.toStdString());
+ sendMessageToClient(*tmpAck);
} else
qDebug() << "Invalid client secret.";
} else
- qDebug() << "Invalid client version: " << netInit->requestedVersion;
- } else if (msg.GetMsg()->present == ChatCleanerMessage_PR_cleanerChatRequestMessage) {
+ qDebug() << "Invalid client version: " << netInit.requestedversion();
+ } else if (msg.messagetype() == ChatCleanerMessage::Type_CleanerChatRequestMessage) {
error = false;
- CleanerChatRequestMessage_t *netRequest = &msg.GetMsg()->choice.cleanerChatRequestMessage;
- unsigned playerId = netRequest->playerId;
- QString nick(QString::fromUtf8(
- string((const char *)netRequest->playerName.buf, netRequest->playerName.size).c_str()));
- QString message(QString::fromUtf8(
- string((const char *)netRequest->chatMessage.buf, netRequest->chatMessage.size).c_str()));
- unsigned gameId = 0;
- if (netRequest->cleanerChatType.present == CleanerChatType_PR_cleanerChatTypeGame) {
- gameId = netRequest->cleanerChatType.choice.cleanerChatTypeGame.gameId;
- }
+ const CleanerChatRequestMessage &netRequest = msg.cleanerchatrequestmessage();
+ unsigned playerId = netRequest.playerid();
+ QString nick(QString::fromUtf8(netRequest.playername().c_str()));
+ QString message(QString::fromUtf8(netRequest.chatmessage().c_str()));
+ unsigned gameId = netRequest.gameid();
QStringList checkreturn = myMessageFilter->check(gameId, playerId, nick, message);
QString checkAction = checkreturn.at(0);
QString checkMessage = checkreturn.at(1);
if (!checkAction.isEmpty()) {
- InternalChatCleanerPacket tmpReply;
- tmpReply.GetMsg()->present = ChatCleanerMessage_PR_cleanerChatReplyMessage;
- CleanerChatReplyMessage_t *netReply = &tmpReply.GetMsg()->choice.cleanerChatReplyMessage;
- netReply->requestId = netRequest->requestId;
- netReply->cleanerChatType = netRequest->cleanerChatType;
- netReply->playerId = netRequest->playerId;
+ boost::shared_ptr tmpReply(ChatCleanerMessage::default_instance().New());
+ tmpReply->set_messagetype(ChatCleanerMessage::Type_CleanerChatReplyMessage);
+ CleanerChatReplyMessage *netReply = tmpReply->mutable_cleanerchatreplymessage();
+ netReply->set_requestid(netRequest.requestid());
+ netReply->set_gameid(netRequest.gameid());
+ netReply->set_cleanerchattype(netRequest.cleanerchattype());
+ netReply->set_playerid(netRequest.playerid());
if(checkAction == "warn") {
- netReply->cleanerActionType = cleanerActionType_cleanerActionWarning;
+ netReply->set_cleaneractiontype(CleanerChatReplyMessage_CleanerActionType_cleanerActionWarning);
} else if (checkAction == "kick") {
- netReply->cleanerActionType = cleanerActionType_cleanerActionKick;
+ netReply->set_cleaneractiontype(CleanerChatReplyMessage_CleanerActionType_cleanerActionKick);
} else if (checkAction == "kickban") {
- netReply->cleanerActionType = cleanerActionType_cleanerActionBan;
+ netReply->set_cleaneractiontype(CleanerChatReplyMessage_CleanerActionType_cleanerActionBan);
} else if (checkAction == "mute") {
- netReply->cleanerActionType = cleanerActionType_cleanerActionMute;
+ netReply->set_cleaneractiontype(CleanerChatReplyMessage_CleanerActionType_cleanerActionMute);
}
- string tmpCheck(checkMessage.toUtf8());
- netReply->cleanerText =
- OCTET_STRING_new_fromBuf(
- &asn_DEF_OCTET_STRING,
- (const char *)tmpCheck.c_str(),
- tmpCheck.length());
- sendMessageToClient(tmpReply);
+ netReply->set_cleanertext(checkMessage.toUtf8());
+ sendMessageToClient(*tmpReply);
}
}
return error;
@@ -200,9 +206,13 @@ bool CleanerServer::handleMessage(InternalChatCleanerPacket &msg)
void CleanerServer::socketStateChanged(QAbstractSocket::SocketState state)
{
-
- qDebug() << "Socket state changed to: " << QAbstractSocket::UnconnectedState;
- if(state == QAbstractSocket::UnconnectedState) blockConnection = false;
+ qDebug() << "Socket state changed to: " << state;
+ if (state == QAbstractSocket::UnconnectedState) {
+ blockConnection = false;
+#if QT_VERSION >= 0x050100
+ tcpServer->resumeAccepting();
+#endif
+ }
}
void CleanerServer::refreshConfig()
@@ -217,14 +227,13 @@ void CleanerServer::refreshConfig()
myMessageFilter->refreshConfig();
}
-void CleanerServer::sendMessageToClient(InternalChatCleanerPacket &msg)
+void CleanerServer::sendMessageToClient(ChatCleanerMessage &msg)
{
- unsigned char buf[MAX_CLEANER_PACKET_SIZE];
- asn_enc_rval_t e = der_encode_to_buffer(&asn_DEF_ChatCleanerMessage, msg.GetMsg(), buf, MAX_CLEANER_PACKET_SIZE);
-
- if (e.encoded == -1)
- qDebug() << "Failed to encode chat cleaner packet: " << msg.GetMsg()->present;
- else
- tcpSocket->write((const char *)buf, e.encoded);
+ uint32_t packetSize = msg.ByteSize();
+ google::protobuf::uint8 *buf = new google::protobuf::uint8[packetSize + CLEANER_NET_HEADER_SIZE];
+ *((uint32_t *)buf) = qToBigEndian(packetSize);
+ msg.SerializeWithCachedSizesToArray(&buf[CLEANER_NET_HEADER_SIZE]);
+ tcpSocket->write((const char *)buf, packetSize + CLEANER_NET_HEADER_SIZE);
+ delete[] buf;
}
diff --git a/src/chatcleaner/cleanerserver.h b/src/chatcleaner/cleanerserver.h
index c72fb67f..568dacfa 100644
--- a/src/chatcleaner/cleanerserver.h
+++ b/src/chatcleaner/cleanerserver.h
@@ -33,10 +33,14 @@
#include
#include
-#include
+
+#define CLEANER_NET_HEADER_SIZE 4
+#define MAX_CLEANER_PACKET_SIZE 512
+#define CLEANER_PROTOCOL_VERSION 2
class MessageFilter;
class CleanerConfig;
+class ChatCleanerMessage;
class CleanerServer: public QObject
{
@@ -49,10 +53,10 @@ public:
private slots:
void newCon();
void onRead();
- bool handleMessage(InternalChatCleanerPacket &msg);
+ bool handleMessage(ChatCleanerMessage &msg);
void socketStateChanged(QAbstractSocket::SocketState);
void refreshConfig();
- void sendMessageToClient(InternalChatCleanerPacket &msg);
+ void sendMessageToClient(ChatCleanerMessage &msg);
private:
QTcpServer *tcpServer;
@@ -66,7 +70,7 @@ private:
QString serverSecret;
unsigned char m_recvBuf[2*MAX_CLEANER_PACKET_SIZE];
- unsigned m_recvBufUsed;
+ size_t m_recvBufUsed;
int secondsSinceLastConfigChange;
};
diff --git a/src/chatcleaner/messagefilter.h b/src/chatcleaner/messagefilter.h
index cabb5bac..f26023b7 100644
--- a/src/chatcleaner/messagefilter.h
+++ b/src/chatcleaner/messagefilter.h
@@ -33,7 +33,9 @@
#include
#include
+#ifndef Q_MOC_RUN
#include
+#endif
class BadWordCheck;
class TextFloodCheck;
diff --git a/src/chatcleaner/textfloodcheck.h b/src/chatcleaner/textfloodcheck.h
index 229cf145..29b3cf38 100644
--- a/src/chatcleaner/textfloodcheck.h
+++ b/src/chatcleaner/textfloodcheck.h
@@ -32,7 +32,9 @@
#define TEXTFLOODCHECK_H
#include
+#ifndef Q_MOC_RUN
#include
+#endif
#include
diff --git a/src/config/configfile.cpp b/src/config/configfile.cpp
index b0bdb447..701199f5 100644
--- a/src/config/configfile.cpp
+++ b/src/config/configfile.cpp
@@ -64,7 +64,7 @@ ConfigFile::ConfigFile(char *argv0, bool readonly) : noWriteAccess(readonly)
myConfigState = OK;
// !!!! Revisionsnummer der Configdefaults !!!!!
- configRev = 98;
+ configRev = 104;
//standard defaults
logOnOffDefault = "1";
@@ -150,9 +150,9 @@ ConfigFile::ConfigFile(char *argv0, bool readonly) : noWriteAccess(readonly)
configList.push_back(ConfigInfo("AppDataDir", CONFIG_TYPE_STRING, myQtToolsInterface->getDataPathStdString(myArgv0)));
#endif
configList.push_back(ConfigInfo("Language", CONFIG_TYPE_INT, myQtToolsInterface->getDefaultLanguage()));
- /*configList.push_back(ConfigInfo("InternetServerAddressIRCChannelUpdateDone", CONFIG_TYPE_INT, "1"));*/ //HACK
configList.push_back(ConfigInfo("ShowLeftToolBox", CONFIG_TYPE_INT, "1"));
configList.push_back(ConfigInfo("ShowCountryFlagInAvatar", CONFIG_TYPE_INT, "1"));
+ configList.push_back(ConfigInfo("ShowPingStateInAvatar", CONFIG_TYPE_INT, "1"));
configList.push_back(ConfigInfo("ShowRightToolBox", CONFIG_TYPE_INT, "1"));
configList.push_back(ConfigInfo("ShowFadeOutCardsAnimation", CONFIG_TYPE_INT, "1"));
configList.push_back(ConfigInfo("ShowFlipCardsAnimation", CONFIG_TYPE_INT, "1"));
@@ -161,6 +161,8 @@ ConfigFile::ConfigFile(char *argv0, bool readonly) : noWriteAccess(readonly)
configList.push_back(ConfigInfo("DontTranslateInternationalPokerStringsFromStyle", CONFIG_TYPE_INT, "0"));
configList.push_back(ConfigInfo("DisableSplashScreenOnStartup", CONFIG_TYPE_INT, "0"));
configList.push_back(ConfigInfo("AccidentallyCallBlocker", CONFIG_TYPE_INT, "1"));
+ configList.push_back(ConfigInfo("DontHideAvatarsOfIgnored", CONFIG_TYPE_INT, "0"));
+ configList.push_back(ConfigInfo("DisableChatEmoticons", CONFIG_TYPE_INT, "0"));
configList.push_back(ConfigInfo("AntiPeekMode", CONFIG_TYPE_INT, "0"));
configList.push_back(ConfigInfo("AlternateFKeysUserActionMode", CONFIG_TYPE_INT, "0"));
configList.push_back(ConfigInfo("EnableBetInputFocusSwitch", CONFIG_TYPE_INT, "0"));
@@ -218,7 +220,11 @@ ConfigFile::ConfigFile(char *argv0, bool readonly) : noWriteAccess(readonly)
configList.push_back(ConfigInfo("ServerPassword", CONFIG_TYPE_STRING, ""));
configList.push_back(ConfigInfo("ServerUseIpv6", CONFIG_TYPE_INT, "0"));
configList.push_back(ConfigInfo("ServerUseSctp", CONFIG_TYPE_INT, "0"));
+ configList.push_back(ConfigInfo("ServerUseWebSocket", CONFIG_TYPE_INT, "0"));
configList.push_back(ConfigInfo("ServerPort", CONFIG_TYPE_INT, "7234"));
+ configList.push_back(ConfigInfo("ServerWebSocketPort", CONFIG_TYPE_INT, "7233"));
+ configList.push_back(ConfigInfo("ServerWebSocketResource", CONFIG_TYPE_STRING, ""));
+ configList.push_back(ConfigInfo("ServerWebSocketOrigin", CONFIG_TYPE_STRING, ""));
configList.push_back(ConfigInfo("ServerUsePutAvatars", CONFIG_TYPE_INT, "0"));
configList.push_back(ConfigInfo("ServerPutAvatarsAddress", CONFIG_TYPE_STRING, ""));
configList.push_back(ConfigInfo("ServerPutAvatarsUser", CONFIG_TYPE_STRING, ""));
@@ -236,6 +242,7 @@ ConfigFile::ConfigFile(char *argv0, bool readonly) : noWriteAccess(readonly)
configList.push_back(ConfigInfo("InternetGamePassword", CONFIG_TYPE_STRING, ""));
configList.push_back(ConfigInfo("InternetGameType", CONFIG_TYPE_INT, "0"));
configList.push_back(ConfigInfo("InternetGameName", CONFIG_TYPE_STRING, "My Online Game"));
+ configList.push_back(ConfigInfo("InternetGameAllowSpectators", CONFIG_TYPE_INT, "1"));
configList.push_back(ConfigInfo("UseLobbyChat", CONFIG_TYPE_INT, "1"));
configList.push_back(ConfigInfo("UseAdminIRC", CONFIG_TYPE_INT, "0"));
configList.push_back(ConfigInfo("AdminIRCServerAddress", CONFIG_TYPE_STRING, "chat.freenode.net"));
diff --git a/src/config/configfile.h b/src/config/configfile.h
index e7df2cae..7f771911 100644
--- a/src/config/configfile.h
+++ b/src/config/configfile.h
@@ -35,7 +35,9 @@
#include
#include
+#ifndef Q_MOC_RUN
#include
+#endif
enum ConfigState { NONEXISTING, OLD, OK };
enum ConfigType { CONFIG_TYPE_INT, CONFIG_TYPE_STRING, CONFIG_TYPE_INT_LIST, CONFIG_TYPE_STRING_LIST };
diff --git a/src/core/common/avatarmanager.cpp b/src/core/common/avatarmanager.cpp
index 945caeab..d9b9fd41 100644
--- a/src/core/common/avatarmanager.cpp
+++ b/src/core/common/avatarmanager.cpp
@@ -435,7 +435,6 @@ AvatarManager::RemoveOldAvatarCacheEntries()
// Count files and record age.
AvatarList removeList;
TimeAvatarMap timeMap;
- unsigned fileCount = 0;
{
AvatarMap::const_iterator i = m_cachedAvatars.begin();
AvatarMap::const_iterator end = m_cachedAvatars.end();
@@ -448,7 +447,6 @@ AvatarManager::RemoveOldAvatarCacheEntries()
// Only consider files with MD5 as file name.
MD5Buf tmpBuf;
if (exists(filePath) && tmpBuf.FromString(basename(filePath))) {
- ++fileCount;
timeMap.insert(TimeAvatarMap::value_type(last_write_time(filePath), i->first));
keepFile = true;
}
diff --git a/src/engine/game.cpp b/src/engine/game.cpp
index e1582182..8d1fe4dc 100755
--- a/src/engine/game.cpp
+++ b/src/engine/game.cpp
@@ -220,8 +220,9 @@ void Game::startHand()
boost::shared_ptr Game::getPlayerByUniqueId(unsigned id)
{
boost::shared_ptr tmpPlayer;
- PlayerListIterator i = getSeatsList()->begin();
- PlayerListIterator end = getSeatsList()->end();
+ PlayerList tmpList = getSeatsList();
+ PlayerListIterator i = tmpList->begin();
+ PlayerListIterator end = tmpList->end();
while (i != end) {
if ((*i)->getMyUniqueID() == id) {
tmpPlayer = *i;
@@ -235,8 +236,9 @@ boost::shared_ptr Game::getPlayerByUniqueId(unsigned id)
boost::shared_ptr Game::getPlayerByNumber(int number)
{
boost::shared_ptr tmpPlayer;
- PlayerListIterator i = getSeatsList()->begin();
- PlayerListIterator end = getSeatsList()->end();
+ PlayerList tmpList = getSeatsList();
+ PlayerListIterator i = tmpList->begin();
+ PlayerListIterator end = tmpList->end();
while (i != end) {
if ((*i)->getMyID() == number) {
tmpPlayer = *i;
@@ -258,8 +260,9 @@ boost::shared_ptr Game::getCurrentPlayer()
boost::shared_ptr Game::getPlayerByName(const std::string &name)
{
boost::shared_ptr tmpPlayer;
- PlayerListIterator i = getSeatsList()->begin();
- PlayerListIterator end = getSeatsList()->end();
+ PlayerList tmpList = getSeatsList();
+ PlayerListIterator i = tmpList->begin();
+ PlayerListIterator end = tmpList->end();
while (i != end) {
if ((*i)->getMyName() == name) {
tmpPlayer = *i;
diff --git a/src/engine/local_engine/cardsvalue.cpp b/src/engine/local_engine/cardsvalue.cpp
index edb72451..e309d95f 100755
--- a/src/engine/local_engine/cardsvalue.cpp
+++ b/src/engine/local_engine/cardsvalue.cpp
@@ -1142,11 +1142,9 @@ std::string CardsValue::determineHandName(int myCardsValueInt, PlayerList active
// 4.there are still same hands
if(equal) {
different = false;
- equal = false;
// third kicker?
for(it = sameHandCardsValueInt.begin(); it != sameHandCardsValueInt.end(); ) {
if((*it) == myCardsValueInt) {
- equal = true;
++it;
} else {
different = true;
diff --git a/src/engine/local_engine/localplayer.cpp b/src/engine/local_engine/localplayer.cpp
index a81f1e61..c3d16b25 100755
--- a/src/engine/local_engine/localplayer.cpp
+++ b/src/engine/local_engine/localplayer.cpp
@@ -3452,7 +3452,7 @@ int LocalPlayer::flopCardsValue(int* cards)
return (71000 + temp*100 + array[j1][1]);
} else {
// Test auf Straight-Flush-Ausnahme 5-4-3-2-A
- if(array[j1][1] == 12 && (array[j1+1][1]<=3 || (j1==0 && array[j1+2][1]<=3 && array[j1][0]==array[j1+4][0]))) {
+ if(array[j1][1] == 12 && (array[j1+1][1]<=3 || (j1==0 && array[j1+2][1]<=3 && array[j1][0]==array[j1+4][0]))) {
// cout << "Straight-Flush-Draw Ass unten";
for(j2=0; j2<4; j2++) {
if(array[j1+j2][2] <= 1) temp++;
diff --git a/src/game_defs.h b/src/game_defs.h
index bef056ce..2dd70952 100644
--- a/src/game_defs.h
+++ b/src/game_defs.h
@@ -38,15 +38,15 @@
#define MAX_GUI_SPEED 11
#define DEBUG_MODE 0
-#define SQLITE_LOG 1
-#define HTML_LOG 0
+#define SQLITE_LOG 1
+#define HTML_LOG 0
#define POKERTH_VERSION_MAJOR 1
-#define POKERTH_VERSION_MINOR 01
+#define POKERTH_VERSION_MINOR 10
#define POKERTH_VERSION ((POKERTH_VERSION_MAJOR << 8) | POKERTH_VERSION_MINOR)
-#define POKERTH_BETA_REVISION 0
-#define POKERTH_BETA_RELEASE_STRING "1.0.1"
+#define POKERTH_BETA_REVISION 4
+#define POKERTH_BETA_RELEASE_STRING "1.1 beta4"
#define SQLITE_LOG_VERSION 1
@@ -64,7 +64,10 @@ enum ServerMode {
enum ServerTransportProtocol {
TRANSPORT_PROTOCOL_TCP = 1,
TRANSPORT_PROTOCOL_SCTP = 2,
- TRANSPORT_PROTOCOL_TCP_SCTP = 3
+ TRANSPORT_PROTOCOL_TCP_SCTP = 3,
+ TRANSPORT_PROTOCOL_WEBSOCKET = 4,
+ TRANSPORT_PROTOCOL_TCP_WEBSOCKET = 5,
+ TRANSPORT_PROTOCOL_TCP_SCTP_WEBSOCKET = 7
};
enum GameState {
@@ -176,16 +179,4 @@ enum NetTimeoutReason {
NETWORK_TIMEOUT_KICK_AFTER_AUTOFOLD
};
-struct ServerStats {
- ServerStats()
- : numberOfPlayersOnServer(0), numberOfGamesOpen(0), totalPlayersEverLoggedIn(0),
- totalGamesEverCreated(0), maxGamesOpen(0), maxPlayersLoggedIn(0) {}
- unsigned numberOfPlayersOnServer;
- unsigned numberOfGamesOpen;
- unsigned totalPlayersEverLoggedIn;
- unsigned totalGamesEverCreated;
- unsigned maxGamesOpen;
- unsigned maxPlayersLoggedIn;
-};
-
#endif
diff --git a/src/gamedata.h b/src/gamedata.h
index 7ba86e5b..9f7586ed 100644
--- a/src/gamedata.h
+++ b/src/gamedata.h
@@ -35,8 +35,9 @@
#include
#include
+#ifndef Q_MOC_RUN
#include
-
+#endif
typedef std::list PlayerIdList;
@@ -71,13 +72,14 @@ enum AfterManualBlindsMode {
// For the sake of simplicity, this is a struct.
struct GameData {
- GameData() : gameType(GAME_TYPE_NORMAL), maxNumberOfPlayers(0), startMoney(0),
- firstSmallBlind(0), raiseIntervalMode(RAISE_ON_HANDNUMBER),
- raiseSmallBlindEveryHandsValue(8), raiseSmallBlindEveryMinutesValue(1),
- raiseMode(DOUBLE_BLINDS), afterManualBlindsMode(AFTERMB_DOUBLE_BLINDS),
- afterMBAlwaysRaiseValue(0), guiSpeed(4), delayBetweenHandsSec(6),
- playerActionTimeoutSec(20) {}
+ GameData() : gameType(GAME_TYPE_NORMAL), allowSpectators(true),
+ maxNumberOfPlayers(0), startMoney(0), firstSmallBlind(0),
+ raiseIntervalMode(RAISE_ON_HANDNUMBER), raiseSmallBlindEveryHandsValue(8),
+ raiseSmallBlindEveryMinutesValue(1), raiseMode(DOUBLE_BLINDS),
+ afterManualBlindsMode(AFTERMB_DOUBLE_BLINDS), afterMBAlwaysRaiseValue(0),
+ guiSpeed(4), delayBetweenHandsSec(6), playerActionTimeoutSec(20) {}
GameType gameType;
+ bool allowSpectators;
int maxNumberOfPlayers;
int startMoney;
int firstSmallBlind;
@@ -100,6 +102,8 @@ struct GameInfo {
GameMode mode;
unsigned adminPlayerId;
PlayerIdList players;
+ PlayerIdList spectators;
+ PlayerIdList spectatorsDuringGame;
bool isPasswordProtected;
};
diff --git a/src/gui/generic/serverguiwrapper.cpp b/src/gui/generic/serverguiwrapper.cpp
index 84dba5a9..27813677 100644
--- a/src/gui/generic/serverguiwrapper.cpp
+++ b/src/gui/generic/serverguiwrapper.cpp
@@ -58,70 +58,50 @@ void ServerGuiWrapper::setSession(boost::shared_ptr session)
}
void ServerGuiWrapper::refreshSet() const {}
-
void ServerGuiWrapper::refreshCash() const {}
-
void ServerGuiWrapper::refreshAction(int /*playerID*/, int /*playerAction*/) const {}
-
void ServerGuiWrapper::refreshChangePlayer() const {}
-
void ServerGuiWrapper::refreshAll() const {}
-
void ServerGuiWrapper::refreshPot() const {}
void ServerGuiWrapper::refreshGroupbox(int /*playerID*/, int /*status*/) const {}
void ServerGuiWrapper::refreshPlayerName() const {}
void ServerGuiWrapper::refreshButton() const {}
void ServerGuiWrapper::refreshGameLabels(GameState /*state*/) const {}
-
void ServerGuiWrapper::setPlayerAvatar(int /*myUniqueID*/, const std::string &/*myAvatar*/) const {};
-
void ServerGuiWrapper::waitForGuiUpdateDone() const {}
-
void ServerGuiWrapper::dealBeRoCards(int /*myBeRoID*/) {}
void ServerGuiWrapper::dealHoleCards() {}
void ServerGuiWrapper::dealFlopCards() {}
void ServerGuiWrapper::dealTurnCard() {}
void ServerGuiWrapper::dealRiverCard() {}
-
void ServerGuiWrapper::nextPlayerAnimation() {}
-
void ServerGuiWrapper::beRoAnimation2(int /*myBeRoID*/) {}
-
void ServerGuiWrapper::preflopAnimation1() {}
void ServerGuiWrapper::preflopAnimation2() {}
-
void ServerGuiWrapper::flopAnimation1() {}
void ServerGuiWrapper::flopAnimation2() {}
-
void ServerGuiWrapper::turnAnimation1() {}
void ServerGuiWrapper::turnAnimation2() {}
-
void ServerGuiWrapper::riverAnimation1() {}
void ServerGuiWrapper::riverAnimation2() {}
-
void ServerGuiWrapper::postRiverAnimation1() {}
void ServerGuiWrapper::postRiverRunAnimation1() {}
void ServerGuiWrapper::flipHolecardsAllIn() {}
-
void ServerGuiWrapper::nextRoundCleanGui() {}
-
void ServerGuiWrapper::meInAction() {}
void ServerGuiWrapper::disableMyButtons() {}
void ServerGuiWrapper::updateMyButtonsState() {}
void ServerGuiWrapper::startTimeoutAnimation(int /*playerNum*/, int /*timeoutSec*/) {}
void ServerGuiWrapper::stopTimeoutAnimation(int /*playerNum*/) {}
-
void ServerGuiWrapper::startVoteOnKick(unsigned /*playerId*/, unsigned /*voteStarterPlayerId*/, int /*timeoutSec*/, int /*numVotesNeededToKick*/) {}
void ServerGuiWrapper::changeVoteOnKickButtonsState(bool /*showHide*/) {}
void ServerGuiWrapper::refreshVotesMonitor(int /*currentVotes*/, int /*numVotesNeededToKick*/) {}
void ServerGuiWrapper::endVoteOnKick() {}
-
void ServerGuiWrapper::logPlayerActionMsg(string /*playerName*/, int /*action*/, int /*setValue*/) {}
void ServerGuiWrapper::logNewGameHandMsg(int /*gameID*/, int /*handID*/) {}
void ServerGuiWrapper::logPlayerWinsMsg(std::string /*playerName*/, int /*pot*/, bool /*main*/) {}
void ServerGuiWrapper::logPlayerSitsOut(std::string /*playerName*/) {}
void ServerGuiWrapper::logNewBlindsSetsMsg(int /*sbSet*/, int /*bbSet*/, std::string /*sbName*/, std::string /*bbName*/) {}
-
void ServerGuiWrapper::logDealBoardCardsMsg(int /*roundID*/, int /*card1*/, int /*card2*/, int /*card3*/, int /*card4*/, int /*card5*/) {}
void ServerGuiWrapper::logFlipHoleCardsMsg(std::string /*playerName*/, int /*card1*/, int /*card2*/, int /*cardsValueInt*/, std::string /*showHas*/) {}
void ServerGuiWrapper::logPlayerWinGame(std::string /*playerName*/, int /*gameID*/) {}
@@ -176,6 +156,10 @@ void ServerGuiWrapper::SignalNetClientStatsUpdate(const ServerStats &stats)
{
if (myClientcb) myClientcb->SignalNetClientStatsUpdate(stats);
}
+void ServerGuiWrapper::SignalNetClientPingUpdate(unsigned minPing, unsigned avgPing, unsigned maxPing)
+{
+ if (myClientcb) myClientcb->SignalNetClientPingUpdate(minPing, avgPing, maxPing);
+}
void ServerGuiWrapper::SignalNetClientShowTimeoutDialog(NetTimeoutReason reason, unsigned remainingSec)
{
if (myClientcb) myClientcb->SignalNetClientShowTimeoutDialog(reason, remainingSec);
@@ -200,6 +184,14 @@ void ServerGuiWrapper::SignalNetClientPlayerLeft(unsigned playerId, const string
{
if (myClientcb) myClientcb->SignalNetClientPlayerLeft(playerId, playerName, removeReason);
}
+void ServerGuiWrapper::SignalNetClientSpectatorJoined(unsigned playerId, const string &playerName)
+{
+ if (myClientcb) myClientcb->SignalNetClientSpectatorJoined(playerId, playerName);
+}
+void ServerGuiWrapper::SignalNetClientSpectatorLeft(unsigned playerId, const string &playerName, int removeReason)
+{
+ if (myClientcb) myClientcb->SignalNetClientSpectatorLeft(playerId, playerName, removeReason);
+}
void ServerGuiWrapper::SignalNetClientNewGameAdmin(unsigned playerId, const string &playerName)
{
if (myClientcb) myClientcb->SignalNetClientNewGameAdmin(playerId, playerName);
@@ -228,6 +220,14 @@ void ServerGuiWrapper::SignalNetClientGameListPlayerLeft(unsigned gameId, unsign
{
if (myClientcb) myClientcb->SignalNetClientGameListPlayerLeft(gameId, playerId);
}
+void ServerGuiWrapper::SignalNetClientGameListSpectatorJoined(unsigned gameId, unsigned playerId)
+{
+ if (myClientcb) myClientcb->SignalNetClientGameListSpectatorJoined(gameId, playerId);
+}
+void ServerGuiWrapper::SignalNetClientGameListSpectatorLeft(unsigned gameId, unsigned playerId)
+{
+ if (myClientcb) myClientcb->SignalNetClientGameListSpectatorLeft(gameId, playerId);
+}
void ServerGuiWrapper::SignalNetClientGameStart(boost::shared_ptr game)
{
if (myClientcb) myClientcb->SignalNetClientGameStart(game);
diff --git a/src/gui/generic/serverguiwrapper.h b/src/gui/generic/serverguiwrapper.h
index 343e2c75..2986c074 100644
--- a/src/gui/generic/serverguiwrapper.h
+++ b/src/gui/generic/serverguiwrapper.h
@@ -126,12 +126,15 @@ public:
void SignalNetClientError(int errorID, int osErrorID);
void SignalNetClientNotification(int notificationId);
void SignalNetClientStatsUpdate(const ServerStats &stats);
+ void SignalNetClientPingUpdate(unsigned minPing, unsigned avgPing, unsigned maxPing);
void SignalNetClientShowTimeoutDialog(NetTimeoutReason reason, unsigned remainingSec);
void SignalNetClientRemovedFromGame(int notificationId);
void SignalNetClientSelfJoined(unsigned playerId, const std::string &playerName, bool isGameAdmin);
void SignalNetClientPlayerJoined(unsigned playerId, const std::string &playerName, bool isGameAdmin);
void SignalNetClientPlayerChanged(unsigned playerId, const std::string &newPlayerName);
void SignalNetClientPlayerLeft(unsigned playerId, const std::string &playerName, int removeReason);
+ void SignalNetClientSpectatorJoined(unsigned playerId, const std::string &playerName);
+ void SignalNetClientSpectatorLeft(unsigned playerId, const std::string &playerName, int removeReason);
void SignalNetClientNewGameAdmin(unsigned playerId, const std::string &playerName);
void SignalNetClientGameChatMsg(const std::string &playerName, const std::string &msg);
void SignalNetClientLobbyChatMsg(const std::string &playerName, const std::string &msg);
@@ -144,6 +147,8 @@ public:
void SignalNetClientGameListUpdateAdmin(unsigned gameId, unsigned adminPlayerId);
void SignalNetClientGameListPlayerJoined(unsigned gameId, unsigned playerId);
void SignalNetClientGameListPlayerLeft(unsigned gameId, unsigned playerId);
+ void SignalNetClientGameListSpectatorJoined(unsigned gameId, unsigned playerId);
+ void SignalNetClientGameListSpectatorLeft(unsigned gameId, unsigned playerId);
void SignalNetClientGameStart(boost::shared_ptr game);
void SignalNetClientServerListAdd(unsigned serverId);
diff --git a/src/gui/qt/aboutpokerth.ui b/src/gui/qt/aboutpokerth.ui
index 6d844ac2..d9b138fe 100755
--- a/src/gui/qt/aboutpokerth.ui
+++ b/src/gui/qt/aboutpokerth.ui
@@ -12,7 +12,16 @@
-
+
+ 9
+
+
+ 9
+
+
+ 9
+
+
9
@@ -102,7 +111,16 @@
Project
-
+
+ 9
+
+
+ 9
+
+
+ 9
+
+
9
@@ -117,8 +135,8 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
p, li { white-space: pre-wrap; }
-</style></head><body style=" font-family:'Nimbus Sans L'; font-size:9pt; font-weight:400; font-style:normal;">
-<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p></body></html>
+</style></head><body style=" font-family:'Liberation Sans'; font-size:9pt; font-weight:400; font-style:normal;">
+<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Nimbus Sans L';"><br /></p></body></html>
true
@@ -132,7 +150,16 @@ p, li { white-space: pre-wrap; }
Translation
-
+
+ 9
+
+
+ 9
+
+
+ 9
+
+
9
@@ -144,11 +171,11 @@ p, li { white-space: pre-wrap; }
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
p, li { white-space: pre-wrap; }
-</style></head><body style=" font-family:'Nimbus Sans L'; font-size:9pt; font-weight:400; font-style:normal;">
+</style></head><body style=" font-family:'Liberation Sans'; font-size:9pt; font-weight:400; font-style:normal;">
<table border="0" style="-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;">
<tr>
<td style="border: none;">
-<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">translator name - mail address</span></p></td></tr></table></body></html>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Nimbus Sans L'; font-size:8pt;">translator name - mail address</span></p></td></tr></table></body></html>
true
@@ -162,7 +189,16 @@ p, li { white-space: pre-wrap; }
Thanks to
-
+
+ 9
+
+
+ 9
+
+
+ 9
+
+
9
@@ -174,8 +210,8 @@ p, li { white-space: pre-wrap; }
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
p, li { white-space: pre-wrap; }
-</style></head><body style=" font-family:'Nimbus Sans L'; font-size:9pt; font-weight:400; font-style:normal;">
-<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p></body></html>
+</style></head><body style=" font-family:'Liberation Sans'; font-size:9pt; font-weight:400; font-style:normal;">
+<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Nimbus Sans L';"><br /></p></body></html>
false
@@ -195,7 +231,16 @@ p, li { white-space: pre-wrap; }
License
-
+
+ 9
+
+
+ 9
+
+
+ 9
+
+
9
@@ -213,6 +258,16 @@ p, li { white-space: pre-wrap; }
+
+
+ Third party libs
+
+
+ -
+
+
+
+
-
@@ -220,7 +275,16 @@ p, li { white-space: pre-wrap; }
6
-
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
0
-
diff --git a/src/gui/qt/aboutpokerth/aboutpokerthimpl.cpp b/src/gui/qt/aboutpokerth/aboutpokerthimpl.cpp
index 8c945413..6e49cfb8 100755
--- a/src/gui/qt/aboutpokerth/aboutpokerthimpl.cpp
+++ b/src/gui/qt/aboutpokerth/aboutpokerthimpl.cpp
@@ -34,10 +34,10 @@
#include
#ifdef ANDROID
- #ifndef ANDROID_TEST
- #include
- #include
- #endif
+#ifndef ANDROID_TEST
+#include "QtGui/5.2.0/QtGui/qpa/qplatformnativeinterface.h"
+#include
+#endif
#endif
aboutPokerthImpl::aboutPokerthImpl(QWidget *parent, ConfigFile *c)
@@ -71,19 +71,20 @@ aboutPokerthImpl::aboutPokerthImpl(QWidget *parent, ConfigFile *c)
#ifdef ANDROID
int api = -2;
- #ifndef ANDROID_TEST
- JavaVM *currVM = (JavaVM *)QApplication::platformNativeInterface()->nativeResourceForWidget("JavaVM", 0);
- JNIEnv* env;
- if (currVM->AttachCurrentThread(&env, NULL)<0) {
- qCritical()<<"AttachCurrentThread failed";
- } else {
- jclass jclassApplicationClass = env->FindClass("android/os/Build$VERSION");
- if (jclassApplicationClass) {
- api = env->GetStaticIntField(jclassApplicationClass, env->GetStaticFieldID(jclassApplicationClass,"SDK_INT", "I"));
- }
- currVM->DetachCurrentThread();
+ this->setWindowState(Qt::WindowFullScreen);
+#ifndef ANDROID_TEST
+ JavaVM *currVM = (JavaVM *)QApplication::platformNativeInterface()->nativeResourceForIntegration("JavaVM");
+ JNIEnv* env;
+ if (currVM->AttachCurrentThread(&env, NULL)<0) {
+ qCritical()<<"AttachCurrentThread failed";
+ } else {
+ jclass jclassApplicationClass = env->FindClass("android/os/Build$VERSION");
+ if (jclassApplicationClass) {
+ api = env->GetStaticIntField(jclassApplicationClass, env->GetStaticFieldID(jclassApplicationClass,"SDK_INT", "I"));
}
- #endif
+ currVM->DetachCurrentThread();
+ }
+#endif
label_pokerthVersion->setText(QString(tr("PokerTH %1 for Android (API%2)").arg(POKERTH_BETA_RELEASE_STRING).arg(api)));
#else
label_pokerthVersion->setText(QString(tr("PokerTH %1").arg(POKERTH_BETA_RELEASE_STRING)));
@@ -131,4 +132,14 @@ aboutPokerthImpl::aboutPokerthImpl(QWidget *parent, ConfigFile *c)
projectText.append(" Oskar Lindqvist (tranberry@pokerth.net)
");
projectText.append(" - "+tr("initial gui graphics design")+"
");
textBrowser_2->setHtml(projectText);
+
+ QFile file(QDir::toNativeSeparators(myAppDataPath+"misc/third_party_libs.txt"));
+ QString string;
+ if(file.exists()) {
+ if (file.open( QIODevice::ReadOnly)) {
+ QTextStream stream( &file );
+ string = stream.readAll();
+ textBrowser_thirdPartyLicenceText->setPlainText(string);
+ }
+ }
}
diff --git a/src/gui/qt/changecompleteblindsdialog/changecompleteblindsdialogimpl.cpp b/src/gui/qt/changecompleteblindsdialog/changecompleteblindsdialogimpl.cpp
index 2b2d5aca..c0c85304 100644
--- a/src/gui/qt/changecompleteblindsdialog/changecompleteblindsdialogimpl.cpp
+++ b/src/gui/qt/changecompleteblindsdialog/changecompleteblindsdialogimpl.cpp
@@ -35,7 +35,7 @@
changeCompleteBlindsDialogImpl::changeCompleteBlindsDialogImpl(QWidget *parent, ConfigFile *c)
- : QDialog(parent), myConfig(c), settingsCorrect(TRUE)
+ : QDialog(parent), myConfig(c), settingsCorrect(true)
{
#ifdef __APPLE__
setWindowModality(Qt::ApplicationModal);
@@ -43,18 +43,18 @@ changeCompleteBlindsDialogImpl::changeCompleteBlindsDialogImpl(QWidget *parent,
#endif
setupUi(this);
this->installEventFilter(this);
+#ifdef ANDROID
+ this->setWindowState(Qt::WindowFullScreen);
+#endif
connect( pushButton_add, SIGNAL( clicked() ), this, SLOT( addBlindValueToList() ) );
connect( pushButton_delete, SIGNAL( clicked() ), this, SLOT( removeBlindFromList() ) );
connect( spinBox_firstSmallBlind, SIGNAL( valueChanged(int) ), this, SLOT( updateSpinBoxInputMinimum(int) ) );
-
}
-void changeCompleteBlindsDialogImpl::exec()
+int changeCompleteBlindsDialogImpl::exec()
{
-
-
- QDialog::exec();
+ return QDialog::exec();
}
void changeCompleteBlindsDialogImpl::updateSpinBoxInputMinimum(int value)
@@ -88,7 +88,7 @@ void changeCompleteBlindsDialogImpl::sortBlindsList()
int i;
QList tempIntList;
QStringList tempStringList;
- bool ok = TRUE;
+ bool ok = true;
for(i=0; icount(); i++) {
// std::cout << listWidget_blinds->item(i)->text().toInt(&ok,10) << "\n";
diff --git a/src/gui/qt/changecompleteblindsdialog/changecompleteblindsdialogimpl.h b/src/gui/qt/changecompleteblindsdialog/changecompleteblindsdialogimpl.h
index 37fd4c96..3dd465a8 100644
--- a/src/gui/qt/changecompleteblindsdialog/changecompleteblindsdialogimpl.h
+++ b/src/gui/qt/changecompleteblindsdialog/changecompleteblindsdialogimpl.h
@@ -48,7 +48,7 @@ class changeCompleteBlindsDialogImpl: public QDialog, public Ui::changeCompleteB
public:
changeCompleteBlindsDialogImpl(QWidget *parent = 0, ConfigFile *c = 0);
- void exec();
+ int exec();
bool eventFilter(QObject *obj, QEvent *event);
public slots:
diff --git a/src/gui/qt/changecontentdialog/changecontentdialogimpl.cpp b/src/gui/qt/changecontentdialog/changecontentdialogimpl.cpp
index 8280734b..fd9075d5 100644
--- a/src/gui/qt/changecontentdialog/changecontentdialogimpl.cpp
+++ b/src/gui/qt/changecontentdialog/changecontentdialogimpl.cpp
@@ -43,6 +43,9 @@ changeContentDialogImpl::changeContentDialogImpl(QWidget *parent, ConfigFile *co
#endif
setupUi(this);
this->installEventFilter(this);
+#ifdef ANDROID
+ this->setWindowState(Qt::WindowFullScreen);
+#endif
switch (myType) {
case CHANGE_HUMAN_PLAYER_NAME: {
@@ -86,7 +89,6 @@ changeContentDialogImpl::changeContentDialogImpl(QWidget *parent, ConfigFile *co
}
connect(this, SIGNAL(accepted ()), this, SLOT(saveContent()));
-
}
void changeContentDialogImpl::saveContent()
diff --git a/src/gui/qt/chattools/chattools.cpp b/src/gui/qt/chattools/chattools.cpp
index 0d61c736..069cc175 100644
--- a/src/gui/qt/chattools/chattools.cpp
+++ b/src/gui/qt/chattools/chattools.cpp
@@ -92,22 +92,11 @@ void ChatTools::receiveMessage(QString playerName, QString message, bool pm)
QString tempMsg;
if(myChatType == INET_LOBBY_CHAT && playerName == "(chat bot)" && message.startsWith(myNick)) {
-
tempMsg = QString(""+message+"");
- //play beep sound only in INET-lobby-chat
- if(myLobby->isVisible() && myConfig->readConfigInt("PlayLobbyChatNotification")) {
- myLobby->getMyW()->getMySoundEventHandler()->playSound("lobbychatnotify",0);
- }
} else if(message.contains(myNick, Qt::CaseInsensitive)) {
-
switch (myChatType) {
case INET_LOBBY_CHAT: {
tempMsg = QString("palette().link().color().name()+";\">"+message+"");
- //play beep sound only in INET-lobby-chat
- // TODO dont play when message is from yourself
- if(myLobby->isVisible() && myConfig->readConfigInt("PlayLobbyChatNotification")) {
- myLobby->getMyW()->getMySoundEventHandler()->playSound("lobbychatnotify",0);
- }
}
break;
case LAN_LOBBY_CHAT:
@@ -157,17 +146,28 @@ void ChatTools::receiveMessage(QString playerName, QString message, bool pm)
}
bool nickFoundOnIgnoreList = false;
+ bool chatBotWarnNickFoundOnIgnoreList = false;
list::iterator it1;
for(it1=ignoreList.begin(); it1 != ignoreList.end(); ++it1) {
-
if(playerName == QString::fromUtf8(it1->c_str())) {
nickFoundOnIgnoreList = true;
}
+ if(myChatType == INET_LOBBY_CHAT && playerName == "(chat bot)" && message.startsWith(QString::fromUtf8(it1->c_str()))) {
+ chatBotWarnNickFoundOnIgnoreList = true;
+ }
}
- if(!nickFoundOnIgnoreList) {
+ if(!nickFoundOnIgnoreList && !chatBotWarnNickFoundOnIgnoreList) {
+ //play beep sound as notification
+ if(myChatType == INET_LOBBY_CHAT && message.contains(myNick, Qt::CaseInsensitive) && playerName != myNick) {
+ if(myLobby->isVisible() && myConfig->readConfigInt("PlayLobbyChatNotification")) {
+ myLobby->getMyW()->getMySoundEventHandler()->playSound("lobbychatnotify",0);
+ }
+ }
- tempMsg = checkForEmotes(tempMsg);
+ if(!myConfig->readConfigInt("DisableChatEmoticons")) {
+ tempMsg = checkForEmotes(tempMsg);
+ }
if(message.indexOf(QString("/me "))==0) {
myTextBrowser->append(tempMsg.replace("/me ","*"+playerName+" ")+"");
diff --git a/src/gui/qt/chattools/chattools.h b/src/gui/qt/chattools/chattools.h
index 2fde45e1..a5391e88 100644
--- a/src/gui/qt/chattools/chattools.h
+++ b/src/gui/qt/chattools/chattools.h
@@ -33,6 +33,7 @@
#include
#include
+#include
#include
#include
diff --git a/src/gui/qt/connecttoserverdialog/connecttoserverdialogimpl.cpp b/src/gui/qt/connecttoserverdialog/connecttoserverdialogimpl.cpp
index 19dae39e..c9df8431 100644
--- a/src/gui/qt/connecttoserverdialog/connecttoserverdialogimpl.cpp
+++ b/src/gui/qt/connecttoserverdialog/connecttoserverdialogimpl.cpp
@@ -39,14 +39,17 @@ connectToServerDialogImpl::connectToServerDialogImpl(QWidget *parent)
setWindowFlags(Qt::WindowSystemMenuHint | Qt::CustomizeWindowHint | Qt::Dialog);
#endif
setupUi(this);
+#ifdef ANDROID
+ this->setWindowState(Qt::WindowFullScreen);
+#endif
}
-void connectToServerDialogImpl::exec()
+int connectToServerDialogImpl::exec()
{
label_actionMessage->setText("");
progressBar->setValue(0);
- QDialog::exec();
+ return QDialog::exec();
}
void connectToServerDialogImpl::refresh(int actionID)
diff --git a/src/gui/qt/connecttoserverdialog/connecttoserverdialogimpl.h b/src/gui/qt/connecttoserverdialog/connecttoserverdialogimpl.h
index 1d47e0aa..801a13ee 100644
--- a/src/gui/qt/connecttoserverdialog/connecttoserverdialogimpl.h
+++ b/src/gui/qt/connecttoserverdialog/connecttoserverdialogimpl.h
@@ -47,7 +47,7 @@ class connectToServerDialogImpl: public QDialog, public Ui::connectToServerDialo
public:
connectToServerDialogImpl(QWidget *parent = 0);
- void exec();
+ int exec();
public slots:
diff --git a/src/gui/qt/createinternetgamedialog.ui b/src/gui/qt/createinternetgamedialog.ui
index f676c8f3..1fa3d32e 100644
--- a/src/gui/qt/createinternetgamedialog.ui
+++ b/src/gui/qt/createinternetgamedialog.ui
@@ -6,8 +6,8 @@
0
0
- 303
- 390
+ 293
+ 410
@@ -100,7 +100,16 @@
6
-
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
0
-
@@ -126,14 +135,14 @@
- -
+
-
Qt::Horizontal
- -
+
-
Maximum number of players:
@@ -143,7 +152,7 @@
- -
+
-
2
@@ -156,7 +165,7 @@
- -
+
-
Start Cash:
@@ -166,7 +175,7 @@
- -
+
-
@@ -188,7 +197,7 @@
- -
+
-
Blinds
@@ -217,7 +226,7 @@
- -
+
-
@@ -233,7 +242,7 @@
- -
+
-
s
@@ -249,7 +258,7 @@
- -
+
-
Delay between hands:
@@ -259,7 +268,7 @@
- -
+
-
@@ -281,6 +290,13 @@
+ -
+
+
+ Allow spectators to watch the game
+
+
+
@@ -289,7 +305,16 @@
6
-
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
0
-
diff --git a/src/gui/qt/createinternetgamedialog/createinternetgamedialogimpl.cpp b/src/gui/qt/createinternetgamedialog/createinternetgamedialogimpl.cpp
index bd5dd387..43b090fb 100644
--- a/src/gui/qt/createinternetgamedialog/createinternetgamedialogimpl.cpp
+++ b/src/gui/qt/createinternetgamedialog/createinternetgamedialogimpl.cpp
@@ -44,16 +44,16 @@ createInternetGameDialogImpl::createInternetGameDialogImpl(QWidget *parent, Conf
#endif
setupUi(this);
this->installEventFilter(this);
+#ifdef ANDROID
+ this->setWindowState(Qt::WindowFullScreen);
+#endif
spinBox_netDelayBetweenHands->installEventFilter(this);
spinBox_netTimeOutPlayerAction->installEventFilter(this);
-
comboBox_gameType->setItemData(0, GAME_TYPE_NORMAL, Qt::UserRole);
comboBox_gameType->setItemData(1, GAME_TYPE_REGISTERED_ONLY, Qt::UserRole);
comboBox_gameType->setItemData(2, GAME_TYPE_INVITE_ONLY, Qt::UserRole);
comboBox_gameType->setItemData(3, GAME_TYPE_RANKING, Qt::UserRole);
-
myChangeCompleteBlindsDialog = new changeCompleteBlindsDialogImpl;
-
startBlind = new QLabel(tr("First small blind: $%1").arg(RANKING_GAME_START_SBLIND));
raiseMode = new QLabel(tr("Double blinds every %1'th hand").arg(RANKING_GAME_RAISE_EVERY_HAND));
startBlind->hide();
@@ -68,7 +68,6 @@ createInternetGameDialogImpl::createInternetGameDialogImpl(QWidget *parent, Conf
connect( pushButton_createGame, SIGNAL( clicked() ), this, SLOT( createGame() ) );
connect( checkBox_Password, SIGNAL( toggled(bool) ), this, SLOT( clearGamePassword(bool)) );
connect( comboBox_gameType, SIGNAL(currentIndexChanged(int)), this, SLOT( gameTypeChanged() ) );
-
}
@@ -143,7 +142,7 @@ void createInternetGameDialogImpl::callChangeBlindsDialog(bool show)
myChangeCompleteBlindsDialog->exec();
if(myChangeCompleteBlindsDialog->result() == QDialog::Accepted ) {}
else {
- radioButton_useSavedBlindsSettings->setChecked(TRUE);
+ radioButton_useSavedBlindsSettings->setChecked(true);
}
}
@@ -155,57 +154,63 @@ void createInternetGameDialogImpl::gameTypeChanged()
switch (comboBox_gameType->currentIndex()) {
case GAME_TYPE_NORMAL-1: {
- checkBox_Password->setDisabled(FALSE);
- spinBox_startCash->setDisabled(FALSE);
- spinBox_quantityPlayers->setDisabled(FALSE);
+ checkBox_Password->setDisabled(false);
+ spinBox_startCash->setDisabled(false);
+ spinBox_quantityPlayers->setDisabled(false);
spinBox_quantityPlayers->setValue(myConfig->readConfigInt("NetNumberOfPlayers"));
spinBox_startCash->setValue(myConfig->readConfigInt("NetStartCash"));
radioButton_useSavedBlindsSettings->show();
radioButton_changeBlindsSettings->show();
startBlind->hide();
raiseMode->hide();
+ checkBox_allowSpectators->setEnabled(true);
+ checkBox_allowSpectators->setChecked(myConfig->readConfigInt("InternetGameAllowSpectators"));
}
break;
case GAME_TYPE_REGISTERED_ONLY-1: {
- checkBox_Password->setDisabled(FALSE);
- spinBox_startCash->setDisabled(FALSE);
- spinBox_quantityPlayers->setDisabled(FALSE);
+ checkBox_Password->setDisabled(false);
+ spinBox_startCash->setDisabled(false);
+ spinBox_quantityPlayers->setDisabled(false);
spinBox_quantityPlayers->setValue(myConfig->readConfigInt("NetNumberOfPlayers"));
spinBox_startCash->setValue(myConfig->readConfigInt("NetStartCash"));
radioButton_useSavedBlindsSettings->show();
radioButton_changeBlindsSettings->show();
startBlind->hide();
raiseMode->hide();
+ checkBox_allowSpectators->setEnabled(true);
+ checkBox_allowSpectators->setChecked(myConfig->readConfigInt("InternetGameAllowSpectators"));
}
break;
case GAME_TYPE_INVITE_ONLY-1: {
- checkBox_Password->setChecked(FALSE);
- checkBox_Password->setDisabled(TRUE);
- spinBox_startCash->setDisabled(FALSE);
- spinBox_quantityPlayers->setDisabled(FALSE);
+ checkBox_Password->setChecked(false);
+ checkBox_Password->setDisabled(true);
+ spinBox_startCash->setDisabled(false);
+ spinBox_quantityPlayers->setDisabled(false);
spinBox_quantityPlayers->setValue(myConfig->readConfigInt("NetNumberOfPlayers"));
spinBox_startCash->setValue(myConfig->readConfigInt("NetStartCash"));
radioButton_useSavedBlindsSettings->show();
radioButton_changeBlindsSettings->show();
startBlind->hide();
raiseMode->hide();
-
+ checkBox_allowSpectators->setEnabled(true);
+ checkBox_allowSpectators->setChecked(myConfig->readConfigInt("InternetGameAllowSpectators"));
}
break;
case GAME_TYPE_RANKING-1: {
- checkBox_Password->setChecked(FALSE);
- checkBox_Password->setDisabled(TRUE);
+ checkBox_Password->setChecked(false);
+ checkBox_Password->setDisabled(true);
spinBox_startCash->setValue(RANKING_GAME_START_CASH);
- spinBox_startCash->setDisabled(TRUE);
+ spinBox_startCash->setDisabled(true);
spinBox_quantityPlayers->setValue(RANKING_GAME_NUMBER_OF_PLAYERS);
- spinBox_quantityPlayers->setDisabled(TRUE);
+ spinBox_quantityPlayers->setDisabled(true);
radioButton_useSavedBlindsSettings->hide();
radioButton_changeBlindsSettings->hide();
startBlind->show();
raiseMode->show();
-
+ checkBox_allowSpectators->setDisabled(true);
+ checkBox_allowSpectators->setChecked(true);
}
break;
}
@@ -213,11 +218,11 @@ void createInternetGameDialogImpl::gameTypeChanged()
if(comboBox_gameType->currentIndex() == GAME_TYPE_RANKING-1) {
//set static values
myChangeCompleteBlindsDialog->spinBox_firstSmallBlind->setValue(RANKING_GAME_START_SBLIND);
- myChangeCompleteBlindsDialog->radioButton_raiseBlindsAtHands->setChecked(TRUE);
- myChangeCompleteBlindsDialog->radioButton_raiseBlindsAtMinutes->setChecked(FALSE);
+ myChangeCompleteBlindsDialog->radioButton_raiseBlindsAtHands->setChecked(true);
+ myChangeCompleteBlindsDialog->radioButton_raiseBlindsAtMinutes->setChecked(false);
myChangeCompleteBlindsDialog->spinBox_raiseSmallBlindEveryHands->setValue(11);
- myChangeCompleteBlindsDialog->radioButton_alwaysDoubleBlinds->setChecked(TRUE);
- myChangeCompleteBlindsDialog->radioButton_manualBlindsOrder->setChecked(FALSE);
+ myChangeCompleteBlindsDialog->radioButton_alwaysDoubleBlinds->setChecked(true);
+ myChangeCompleteBlindsDialog->radioButton_manualBlindsOrder->setChecked(false);
myChangeCompleteBlindsDialog->listWidget_blinds->clear();
} else {
//read config values
diff --git a/src/gui/qt/createnetworkgamedialog/createnetworkgamedialogimpl.cpp b/src/gui/qt/createnetworkgamedialog/createnetworkgamedialogimpl.cpp
index 6dd80cec..6857f10b 100644
--- a/src/gui/qt/createnetworkgamedialog/createnetworkgamedialogimpl.cpp
+++ b/src/gui/qt/createnetworkgamedialog/createnetworkgamedialogimpl.cpp
@@ -42,9 +42,10 @@ createNetworkGameDialogImpl::createNetworkGameDialogImpl(QWidget *parent, Config
#endif
setupUi(this);
this->installEventFilter(this);
-
+#ifdef ANDROID
+ this->setWindowState(Qt::WindowFullScreen);
+#endif
myChangeCompleteBlindsDialog = new changeCompleteBlindsDialogImpl;
-
fillFormular();
connect( radioButton_changeBlindsSettings, SIGNAL( clicked(bool) ), this, SLOT( callChangeBlindsDialog(bool) ) );
@@ -52,14 +53,13 @@ createNetworkGameDialogImpl::createNetworkGameDialogImpl(QWidget *parent, Config
connect( pushButton_cancel, SIGNAL( clicked() ), this, SLOT( cancel() ) );
#endif
connect( pushButton_createGame, SIGNAL( clicked() ), this, SLOT( createGame() ) );
-
}
-void createNetworkGameDialogImpl::exec()
+int createNetworkGameDialogImpl::exec()
{
fillFormular();
- QDialog::exec();
+ return QDialog::exec();
}
void createNetworkGameDialogImpl::createGame()
@@ -131,7 +131,7 @@ void createNetworkGameDialogImpl::callChangeBlindsDialog(bool show)
myChangeCompleteBlindsDialog->exec();
if(myChangeCompleteBlindsDialog->result() == QDialog::Accepted ) {}
else {
- radioButton_useSavedBlindsSettings->setChecked(TRUE);
+ radioButton_useSavedBlindsSettings->setChecked(true);
}
}
diff --git a/src/gui/qt/createnetworkgamedialog/createnetworkgamedialogimpl.h b/src/gui/qt/createnetworkgamedialog/createnetworkgamedialogimpl.h
index e6022753..c53acec1 100644
--- a/src/gui/qt/createnetworkgamedialog/createnetworkgamedialogimpl.h
+++ b/src/gui/qt/createnetworkgamedialog/createnetworkgamedialogimpl.h
@@ -51,7 +51,7 @@ class createNetworkGameDialogImpl: public QDialog, public Ui::createNetworkGameD
public:
createNetworkGameDialogImpl(QWidget *parent = 0, ConfigFile *c = 0);
- void exec();
+ int exec();
changeCompleteBlindsDialogImpl* getChangeCompleteBlindsDialog() {
return myChangeCompleteBlindsDialog;
}
diff --git a/src/gui/qt/gamelobbydialog.ui b/src/gui/qt/gamelobbydialog.ui
index 7a7cf556..a5e35730 100644
--- a/src/gui/qt/gamelobbydialog.ui
+++ b/src/gui/qt/gamelobbydialog.ui
@@ -20,15 +20,24 @@
Internet Game Lobby
+
+ 5
+
+
+ 5
+
+
+ 5
+
+
+ 5
+
7
4
-
- 5
-
-
@@ -88,6 +97,277 @@
+ -
+
+
-
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+ QSizePolicy::Expanding
+
+
+
+ 20
+ 20
+
+
+
+
+ -
+
+
+ true
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+ QSizePolicy::Expanding
+
+
+
+ 20
+ 20
+
+
+
+
+ -
+
+
+ true
+
+
+
+
+
+ -
+
+
+
+ 400
+ 0
+
+
+
+ Qt::CustomContextMenu
+
+
+ Qt::ScrollBarAlwaysOff
+
+
+ QAbstractItemView::NoEditTriggers
+
+
+ false
+
+
+ 5
+
+
+ false
+
+
+ true
+
+
+
+ -
+
+
+ 6
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
-
+
+
+ true
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+ QSizePolicy::Expanding
+
+
+
+ 181
+ 20
+
+
+
+
+ -
+
+
+ &Create Game
+
+
+
+ :/gfx/list_add.png:/gfx/list_add.png
+
+
+
+ -
+
+
+ &Join Game
+
+
+
+ :/gfx/go-next-view.png:/gfx/go-next-view.png
+
+
+
+
+
+ -
+
+
+
+ 400
+ 223
+
+
+
+
+ 16777215
+ 230
+
+
+
+ Lobby-Chat
+
+
+
+ 7
+
+
+ 2
+
+
+ 7
+
+
+ 7
+
+
+ 0
+
+
-
+
+
+ true
+
+
+
+ -
+
+
+
+
+
+ -
+
+
-
+
+ Sort alphabetically
+
+
+ -
+
+ Sort by country
+
+
+ -
+
+ Display idle players
+
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 165
+ 0
+
+
+
+
+ 165
+ 16777215
+
+
+
+ Qt::CustomContextMenu
+
+
+ QAbstractItemView::NoEditTriggers
+
+
+ false
+
+
+ true
+
+
+
-
@@ -114,53 +394,122 @@
Game Info
-
-
- 3
-
+
- 7
+ 6
2
- 7
+ 6
6
-
-
-
-
-
- 221
- 237
-
+
+ 0
+
+
+ 1
+
+
-
+
+
+ 0
-
- Qt::CustomContextMenu
-
-
- 1
-
-
-
- 25
- 26
-
-
-
- 15
-
-
-
- Connected Players
-
-
+
+
+ Players
+
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
-
+
+
+
+ 221
+ 100
+
+
+
+ Qt::CustomContextMenu
+
+
+ 1
+
+
+
+ 25
+ 26
+
+
+
+ 15
+
+
+ false
+
+
+
+ Connected Players
+
+
+
+
+
+
+
+
+ Spectators
+
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+ -
+
+
+ false
+
+
+
+ 1
+
+
+
+
+
+
- -
+
-
@@ -176,20 +525,29 @@
0
0
- 246
- 168
+ 250
+ 200
-
+
+
+ 4
+
+
+ 4
+
+
+ 4
+
+
+ 4
+
- -1
+ 6
2
-
- 4
-
-
@@ -405,7 +763,7 @@
- -
+
-
-
@@ -442,7 +800,7 @@
- -
+
-
3
@@ -532,7 +890,7 @@
- -
+
-
0
@@ -587,272 +945,6 @@
- -
-
-
-
- 400
- 0
-
-
-
- Qt::CustomContextMenu
-
-
- Qt::ScrollBarAlwaysOff
-
-
- QAbstractItemView::NoEditTriggers
-
-
- false
-
-
- 5
-
-
- false
-
-
- true
-
-
-
- -
-
-
- 6
-
-
- 0
-
-
-
-
-
- Join &any game
-
-
-
- :/gfx/transform-rotate.png:/gfx/transform-rotate.png
-
-
-
- -
-
-
- Qt::Horizontal
-
-
- QSizePolicy::Expanding
-
-
-
- 181
- 20
-
-
-
-
- -
-
-
- &Create Game
-
-
-
- :/gfx/list_add.png:/gfx/list_add.png
-
-
-
- -
-
-
- &Join Game
-
-
-
- :/gfx/go-next-view.png:/gfx/go-next-view.png
-
-
-
-
-
- -
-
-
-
- 400
- 223
-
-
-
-
- 16777215
- 230
-
-
-
- Lobby-Chat
-
-
-
- 7
-
-
- 2
-
-
- 7
-
-
- 7
-
-
- 0
-
-
-
-
-
- true
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
-
-
-
- -
-
-
- Qt::Horizontal
-
-
- QSizePolicy::Expanding
-
-
-
- 20
- 20
-
-
-
-
- -
-
-
- true
-
-
-
- -
-
-
- Qt::Horizontal
-
-
- QSizePolicy::Expanding
-
-
-
- 20
- 20
-
-
-
-
- -
-
-
- true
-
-
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- 165
- 0
-
-
-
-
- 165
- 16777215
-
-
-
- Qt::CustomContextMenu
-
-
- QAbstractItemView::NoEditTriggers
-
-
- false
-
-
- true
-
-
-
- -
-
-
-
-
- Sort alphabetically
-
-
- -
-
- Sort by country
-
-
- -
-
- Display idle players
-
-
-
-
@@ -861,9 +953,7 @@
comboBox_nickListFilter
comboBox_gameListFilter
treeView_GameList
- pushButton_joinAnyGame
pushButton_CreateGame
- pushButton_JoinGame
textBrowser_ChatDisplay
lineEdit_ChatInput
treeWidget_connectedPlayers
diff --git a/src/gui/qt/gamelobbydialog/gamelobbydialogimpl.cpp b/src/gui/qt/gamelobbydialog/gamelobbydialogimpl.cpp
index 817ca377..02dae737 100644
--- a/src/gui/qt/gamelobbydialog/gamelobbydialogimpl.cpp
+++ b/src/gui/qt/gamelobbydialog/gamelobbydialogimpl.cpp
@@ -53,12 +53,13 @@ gameLobbyDialogImpl::gameLobbyDialogImpl(startWindowImpl *parent, ConfigFile *c)
setWindowModality(Qt::ApplicationModal);
setWindowFlags(Qt::WindowSystemMenuHint | Qt::CustomizeWindowHint | Qt::Dialog);
#elif _WIN32
- setWindowFlags(Qt::Dialog | Qt::WindowMinimizeButtonHint);
+// setWindowFlags(Qt::Dialog | Qt::WindowMinimizeButtonHint);
#endif
-
setupUi(this);
myAppDataPath = QString::fromUtf8(myConfig->readConfigString("AppDataDir").c_str());
-
+#ifdef ANDROID
+ this->setWindowState(Qt::WindowFullScreen);
+#endif
//wait start game message
waitStartGameMsgBox = new MyMessageBox(this);
waitStartGameMsgBox->setText(tr("Starting game. Please wait ..."));
@@ -86,17 +87,19 @@ gameLobbyDialogImpl::gameLobbyDialogImpl(startWindowImpl *parent, ConfigFile *c)
//HTML stuff
QString pokerthDotNet("http://www.pokerth.net");
QString clickToRanking(QString("%1").arg(tr("Click here to view the online rankings")));
+ QString clickToSpectate(QString("%1").arg(tr("Spectate")));
label_pokerthDotNet->setText(pokerthDotNet);
label_rankings->setText(clickToRanking);
+ label_spectate->setText(clickToSpectate);
waitStartGameMsgBoxTimer = new QTimer(this);
- waitStartGameMsgBoxTimer->setSingleShot(TRUE);
+ waitStartGameMsgBoxTimer->setSingleShot(true);
blinkingButtonAnimationTimer = new QTimer(this);
blinkingButtonAnimationTimer->setInterval(1000);
autoStartTimer = new QTimer(this);
autoStartTimer->setInterval(1000);
showInfoMsgBoxTimer = new QTimer(this);
- showInfoMsgBoxTimer->setSingleShot(TRUE);
+ showInfoMsgBoxTimer->setSingleShot(true);
//fetch button colors for blinking
groupBox_GameInfo->setEnabled(true);
@@ -111,12 +114,12 @@ gameLobbyDialogImpl::gameLobbyDialogImpl(startWindowImpl *parent, ConfigFile *c)
//prepare overlay
autoStartTimerOverlay = new QLabel(scrollArea_gameInfos);
autoStartTimerOverlay->hide();
- autoStartTimerOverlay->setWordWrap(TRUE);
+ autoStartTimerOverlay->setWordWrap(true);
autoStartTimerOverlay->setMaximumWidth(190);
autoStartTimerOverlay->setMinimumWidth(190);
autoStartTimerOverlay->setTextFormat(Qt::RichText);
autoStartTimerOverlay->setAlignment(Qt::AlignCenter);
- autoStartTimerOverlay->setAutoFillBackground(TRUE);
+ autoStartTimerOverlay->setAutoFillBackground(true);
autoStartTimerOverlay->setFrameStyle(QFrame::StyledPanel);
QPalette p;
p.setColor(QPalette::Background, QColor(255, 255, 255, 210));
@@ -126,9 +129,8 @@ gameLobbyDialogImpl::gameLobbyDialogImpl(startWindowImpl *parent, ConfigFile *c)
myGameListModel = new QStandardItemModel(this);
myGameListSortFilterProxyModel = new MyGameListSortFilterProxyModel(this);
myGameListSortFilterProxyModel->setSourceModel(myGameListModel);
- myGameListSortFilterProxyModel->setDynamicSortFilter(TRUE);
+ myGameListSortFilterProxyModel->setDynamicSortFilter(true);
treeView_GameList->setModel(myGameListSortFilterProxyModel);
-
myGameListSelectionModel = treeView_GameList->selectionModel();
QStringList headerList;
@@ -174,12 +176,12 @@ gameLobbyDialogImpl::gameLobbyDialogImpl(startWindowImpl *parent, ConfigFile *c)
treeView_GameList->setStyleSheet("QTreeView {background-color: white; background-image: url(\""+myAppDataPath +"gfx/gui/misc/background_gamelist.png\"); background-attachment: fixed; background-position: top center ; background-repeat: no-repeat;}");
#endif
- treeView_GameList->setAutoFillBackground(TRUE);
+ treeView_GameList->setAutoFillBackground(true);
myNickListModel = new QStandardItemModel(this);
myNickListSortFilterProxyModel = new MyNickListSortFilterProxyModel(this);
myNickListSortFilterProxyModel->setSourceModel(myNickListModel);
- myNickListSortFilterProxyModel->setDynamicSortFilter(TRUE);
+ myNickListSortFilterProxyModel->setDynamicSortFilter(true);
myNickListSortFilterProxyModel->setSortCaseSensitivity(Qt::CaseInsensitive);
treeView_NickList->setModel(myNickListSortFilterProxyModel);
@@ -197,6 +199,8 @@ gameLobbyDialogImpl::gameLobbyDialogImpl(startWindowImpl *parent, ConfigFile *c)
nickListContextMenu->addAction(nickListInviteAction);
nickListIgnorePlayerAction = new QAction(QIcon(":/gfx/im-ban-user.png"), tr("Ignore player"), nickListContextMenu);
nickListContextMenu->addAction(nickListIgnorePlayerAction);
+ nickListUnignorePlayerAction = new QAction(QIcon(":/gfx/dialog_ok_apply.png"), tr("Unignore player"), nickListContextMenu);
+ nickListContextMenu->addAction(nickListUnignorePlayerAction);
nickListPlayerInfoSubMenu = nickListContextMenu->addMenu(QIcon(":/gfx/dialog-information.png"), tr("Player infos ..."));
nickListPlayerInGameInfo = new QAction(nickListContextMenu);
nickListPlayerInfoSubMenu->addAction(nickListPlayerInGameInfo);
@@ -219,7 +223,6 @@ gameLobbyDialogImpl::gameLobbyDialogImpl(startWindowImpl *parent, ConfigFile *c)
connect( pushButton_CreateGame, SIGNAL( clicked() ), this, SLOT( createGame() ) );
connect( pushButton_JoinGame, SIGNAL( clicked() ), this, SLOT( joinGame() ) );
- connect( pushButton_joinAnyGame, SIGNAL( clicked() ), this, SLOT( joinAnyGame() ) );
connect( pushButton_StartGame, SIGNAL( clicked() ), this, SLOT( startGame() ) );
connect( pushButton_Kick, SIGNAL( clicked() ), this, SLOT( kickPlayer() ) );
connect( pushButton_Leave, SIGNAL( clicked() ), this, SLOT( leaveGame() ) );
@@ -241,6 +244,7 @@ gameLobbyDialogImpl::gameLobbyDialogImpl(startWindowImpl *parent, ConfigFile *c)
connect( treeView_GameList, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT( showGameListContextMenu(QPoint) ) );
connect( nickListInviteAction, SIGNAL(triggered()), this, SLOT( invitePlayerToCurrentGame() ));
connect( nickListIgnorePlayerAction, SIGNAL(triggered()), this, SLOT( putPlayerOnIgnoreList() ));
+ connect( nickListUnignorePlayerAction, SIGNAL(triggered()), this, SLOT( removePlayerFromIgnoreList() ));
connect( nickListOpenPlayerStats1, SIGNAL(triggered()), this, SLOT( openPlayerStats1() ));
connect( connectedPlayersListOpenPlayerStats, SIGNAL(triggered()), this, SLOT( openPlayerStats2() ));
connect( lineEdit_searchForPlayers, SIGNAL(textChanged(QString)),this, SLOT(searchForPlayerRegExpChanged()));
@@ -251,12 +255,10 @@ gameLobbyDialogImpl::gameLobbyDialogImpl(startWindowImpl *parent, ConfigFile *c)
lineEdit_searchForPlayers->installEventFilter(this);
lineEdit_ChatInput->installEventFilter(this);
this->installEventFilter(this);
-
clearDialog();
-
}
-void gameLobbyDialogImpl::exec()
+int gameLobbyDialogImpl::exec()
{
if(myConfig->readConfigInt("UseLobbyChat")) {
@@ -276,10 +278,11 @@ void gameLobbyDialogImpl::exec()
#ifdef ANDROID
this->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
#endif
- QDialog::exec();
-
+ int ret = QDialog::exec();
waitStartGameMsgBoxTimer->stop();
closeAllChildDialogs();
+
+ return ret;
}
@@ -328,7 +331,7 @@ void gameLobbyDialogImpl::createGame()
gameData.raiseMode = MANUAL_BLINDS_ORDER;
std::list tempBlindList;
int i;
- bool ok = TRUE;
+ bool ok = true;
for(i=0; igetChangeCompleteBlindsDialog()->listWidget_blinds->count(); i++) {
tempBlindList.push_back(myCreateInternetGameDialog->getChangeCompleteBlindsDialog()->listWidget_blinds->item(i)->text().toInt(&ok,10));
}
@@ -350,6 +353,7 @@ void gameLobbyDialogImpl::createGame()
gameData.delayBetweenHandsSec = myCreateInternetGameDialog->spinBox_netDelayBetweenHands->value();
gameData.playerActionTimeoutSec = myCreateInternetGameDialog->spinBox_netTimeOutPlayerAction->value();
gameData.gameType = GameType(myCreateInternetGameDialog->comboBox_gameType->itemData(myCreateInternetGameDialog->comboBox_gameType->currentIndex(), Qt::UserRole).toInt());
+ gameData.allowSpectators = myCreateInternetGameDialog->checkBox_allowSpectators->isChecked();
currentGameName = myCreateInternetGameDialog->lineEdit_gameName->text().simplified();
@@ -376,17 +380,11 @@ void gameLobbyDialogImpl::createGame()
break;
}
- showGameDescription(TRUE);
+ showGameDescription(true);
label_SmallBlind->setText(QString("%L1").arg(gameData.firstSmallBlind));
label_StartCash->setText(QString("%L1").arg(gameData.startMoney));
-
- QTreeWidgetItem *header = treeWidget_connectedPlayers->headerItem();
- header->setText(0, tr("Connected players - max. %1").arg(gameData.maxNumberOfPlayers));
- header->setData(0, Qt::UserRole, gameData.maxNumberOfPlayers);
-
updateDialogBlinds(gameData);
-
label_GameTiming->setText(QString::number(gameData.playerActionTimeoutSec)+" "+tr("sec (action)")+"\n"+QString::number(gameData.delayBetweenHandsSec)+" "+tr("sec (hand delay)"));
mySession->clientCreateGame(gameData, currentGameName.toUtf8().constData(), myCreateInternetGameDialog->lineEdit_Password->text().toUtf8().constData());
@@ -417,37 +415,6 @@ void gameLobbyDialogImpl::joinGame()
}
}
-void gameLobbyDialogImpl::joinAnyGame()
-{
-
- if(comboBox_gameListFilter->currentIndex() != 3 && comboBox_gameListFilter->currentIndex() != 0 && comboBox_gameListFilter->currentIndex() != 5) comboBox_gameListFilter->setCurrentIndex(0);
-
- bool found = FALSE;
-
- int it = 0;
- int gameToJoinId = 0;
- int mostConnectedPlayers = 0;
-
- while (myGameListModel->item(it)) {
-
- int players = myGameListModel->item(it, 1)->data(Qt::DisplayRole).toString().section("/",0,0).toInt();
- int maxPlayers = myGameListModel->item(it, 1)->data(Qt::DisplayRole).toString().section("/",1,1).toInt();
- if (myGameListModel->item(it, 2)->data(16) == "open" && myGameListModel->item(it, 4)->data(16) == "nonpriv" && players < maxPlayers) {
- if(players > mostConnectedPlayers) {
- mostConnectedPlayers = players;
- gameToJoinId = it;
- }
- found = TRUE;
- }
- it++;
- }
-
- if(found) {
- treeView_GameList->setCurrentIndex(myGameListSortFilterProxyModel->mapFromSource(myGameListModel->item(gameToJoinId)->index()));
- joinGame();
- }
-}
-
void gameLobbyDialogImpl::refresh(int actionID)
{
@@ -478,7 +445,6 @@ void gameLobbyDialogImpl::refresh(int actionID)
treeView_GameList->setColumnWidth(3,25);
treeView_GameList->setColumnWidth(4,25);
treeView_GameList->setColumnWidth(5,30);
-
#endif
QStringList headerList2;
@@ -550,7 +516,7 @@ void gameLobbyDialogImpl::gameSelected(const QModelIndex &index)
break;
}
- showGameDescription(TRUE);
+ showGameDescription(true);
label_SmallBlind->setText(QString("%L1").arg(info.data.firstSmallBlind));
label_StartCash->setText(QString("%L1").arg(info.data.startMoney));
// label_MaximumNumberOfPlayers->setText(QString::number(info.data.maxNumberOfPlayers));s
@@ -568,9 +534,15 @@ void gameLobbyDialogImpl::gameSelected(const QModelIndex &index)
++i;
}
- QTreeWidgetItem *header = treeWidget_connectedPlayers->headerItem();
- header->setText(0, tr("Connected players - Max. %1").arg(info.data.maxNumberOfPlayers));
- header->setData(0, Qt::UserRole, info.data.maxNumberOfPlayers);
+ treeWidget_connectedSpectators->clear();
+ PlayerIdList::const_iterator s = info.spectators.begin();
+ PlayerIdList::const_iterator s_end = info.spectators.end();
+ while (s != s_end) {
+ PlayerInfo playerInfo(mySession->getClientPlayerInfo(*s));
+ addConnectedSpectator(*s, QString::fromUtf8(playerInfo.playerName.c_str()));
+ ++s;
+ }
+
#ifdef __APPLE__
// Dirty workaround for a Qt redraw bug on Mac OS.
treeWidget_connectedPlayers->setFocus();
@@ -612,6 +584,22 @@ void gameLobbyDialogImpl::updateGameItem(QList itemList, unsign
++i;
}
+ //reset players iterator
+ i = info.players.begin();
+ end = info.players.end();
+ while (i != end) {
+ //mark players as active
+ int it1 = 0;
+ while (myNickListModel->item(it1)) {
+ if (myNickListModel->item(it1, 0)->data(Qt::UserRole) == *i) {
+ myNickListModel->item(it1, 0)->setData("active", 34);
+ break;
+ }
+ ++it1;
+ }
+ ++i;
+ }
+
QString playerStr;
playerStr.sprintf("%u/%u", (unsigned)info.players.size(), (unsigned)info.data.maxNumberOfPlayers);
itemList.at(1)->setData(playerStr, Qt::DisplayRole);
@@ -674,6 +662,22 @@ void gameLobbyDialogImpl::updateGameItem(QList itemList, unsign
treeView_GameList->sortByColumn(myConfig->readConfigInt("DlgGameLobbyGameListSortingSection"), (Qt::SortOrder)myConfig->readConfigInt("DlgGameLobbyGameListSortingOrder") );
refreshGameStats();
+
+ //mark spactators as active
+ PlayerIdList::const_iterator s = info.spectators.begin();
+ PlayerIdList::const_iterator s_end = info.spectators.end();
+
+ while (s != s_end) {
+ int it2 = 0;
+ while (myNickListModel->item(it2)) {
+ if (myNickListModel->item(it2, 0)->data(Qt::UserRole) == *s) {
+ myNickListModel->item(it2, 0)->setData("active", 34);
+ break;
+ }
+ ++it2;
+ }
+ ++s;
+ }
}
void gameLobbyDialogImpl::addGame(unsigned gameId)
@@ -690,7 +694,6 @@ void gameLobbyDialogImpl::addGame(unsigned gameId)
myGameListModel->appendRow(itemList);
updateGameItem(itemList, gameId);
-
}
void gameLobbyDialogImpl::updateGameMode(unsigned gameId, int /*newMode*/)
@@ -743,11 +746,8 @@ void gameLobbyDialogImpl::refreshGameStats()
++it;
}
- label_openGamesCounter->setText("| "+tr("running games: %1").arg(runningGamesCounter));
- label_runningGamesCounter->setText("| "+tr("open games: %1").arg(openGamesCounter));
-
- //refresh joinAnyGameButton state
- joinAnyGameButtonRefresh();
+ label_openGamesCounter->setText(" | "+tr("running games: %1").arg(runningGamesCounter));
+ label_runningGamesCounter->setText(" | "+tr("open games: %1").arg(openGamesCounter));
}
@@ -778,14 +778,15 @@ void gameLobbyDialogImpl::gameAddPlayer(unsigned gameId, unsigned playerId)
if (myGameListModel->item(it, 0)->data(Qt::UserRole) == gameId) {
QList itemList;
itemList << myGameListModel->item(it, 0) << myGameListModel->item(it, 1) << myGameListModel->item(it, 2) << myGameListModel->item(it, 3) << myGameListModel->item(it, 4) << myGameListModel->item(it, 5);
-
updateGameItem(itemList, gameId);
break;
}
it++;
}
+}
- //mark player as active
+void gameLobbyDialogImpl::gameAddSpectator(unsigned /*gameId*/, unsigned playerId)
+{
int it1 = 0;
while (myNickListModel->item(it1)) {
if (myNickListModel->item(it1, 0)->data(Qt::UserRole) == playerId) {
@@ -832,6 +833,19 @@ void gameLobbyDialogImpl::gameRemovePlayer(unsigned gameId, unsigned playerId)
}
}
+void gameLobbyDialogImpl::gameRemoveSpectator(unsigned, unsigned playerId)
+{
+ //mark spectator as idle again
+ int it1 = 0;
+ while (myNickListModel->item(it1)) {
+ if (myNickListModel->item(it1, 0)->data(Qt::UserRole) == playerId) {
+ myNickListModel->item(it1, 0)->setData("idle", 34);
+ break;
+ }
+ ++it1;
+ }
+}
+
void gameLobbyDialogImpl::updateStats(ServerStats /*stats*/)
{
refreshPlayerStats();
@@ -843,11 +857,7 @@ void gameLobbyDialogImpl::clearDialog()
groupBox_GameInfo->setEnabled(false);
currentGameName = "";
- QTreeWidgetItem *header = treeWidget_connectedPlayers->headerItem();
- header->setText(0, tr("Connected players"));
- header->setData(0, Qt::UserRole, 0);
-
- showGameDescription(FALSE);
+ showGameDescription(false);
label_typeIcon->setText(" ");
label_typeText->setText(" ");
label_SmallBlind->setText("");
@@ -863,6 +873,7 @@ void gameLobbyDialogImpl::clearDialog()
myGameListSortFilterProxyModel->clear();
treeView_GameList->show();
treeWidget_connectedPlayers->clear();
+ treeWidget_connectedSpectators->clear();
pushButton_Leave->hide();
pushButton_Kick->hide();
@@ -872,8 +883,6 @@ void gameLobbyDialogImpl::clearDialog()
pushButton_CreateGame->show();
pushButton_JoinGame->show();
pushButton_JoinGame->setEnabled(false);
- pushButton_joinAnyGame->show();
- pushButton_joinAnyGame->setEnabled(false);
QStringList headerList;
headerList << tr("Game") << tr("Players") << tr("State") << tr("T") << tr("P") << tr("Time");
@@ -911,17 +920,18 @@ void gameLobbyDialogImpl::clearDialog()
isGameAdministrator = false;
myPlayerId = 0;
- showGameDescription(FALSE);
+ showGameDescription(false);
label_connectedPlayersCounter->setText(tr("connected players: %1").arg(0));
- label_openGamesCounter->setText("| "+tr("running games: %1").arg(0));
- label_runningGamesCounter->setText("| "+tr("open games: %1").arg(0));
+ label_openGamesCounter->setText(" | "+tr("running games: %1").arg(0));
+ label_runningGamesCounter->setText(" | "+tr("open games: %1").arg(0));
readDialogSettings();
}
void gameLobbyDialogImpl::checkPlayerQuantity()
{
+ tabWidget_playerSpectators->setTabText(0, tr("Players (%1)").arg(treeWidget_connectedPlayers->topLevelItemCount()));
assert(mySession);
GameInfo info(mySession->getClientGameInfo(mySession->getClientCurrentGameId()));
@@ -935,7 +945,7 @@ void gameLobbyDialogImpl::checkPlayerQuantity()
if (treeWidget_connectedPlayers->topLevelItemCount() >= 2) {
pushButton_StartGame->setEnabled(true);
- if(treeWidget_connectedPlayers->topLevelItemCount() == treeWidget_connectedPlayers->headerItem()->data(0, Qt::UserRole).toInt()) {
+ if(treeWidget_connectedPlayers->topLevelItemCount() == info.data.maxNumberOfPlayers) {
blinkingButtonAnimationTimer->start();
} else {
blinkingButtonAnimationTimer->stop();
@@ -951,7 +961,7 @@ void gameLobbyDialogImpl::checkPlayerQuantity()
}
//general actions
- if(treeWidget_connectedPlayers->topLevelItemCount() < treeWidget_connectedPlayers->headerItem()->data(0, Qt::UserRole).toInt()) {
+ if(treeWidget_connectedPlayers->topLevelItemCount() < info.data.maxNumberOfPlayers) {
autoStartTimerOverlay->hide();
autoStartTimer->stop();
}
@@ -986,12 +996,9 @@ void gameLobbyDialogImpl::blinkingStartButtonAnimation()
void gameLobbyDialogImpl::joinedNetworkGame(unsigned playerId, QString playerName, bool isGameAdmin)
{
-
// Update dialog
inGame = true;
joinedGameDialogUpdate();
-
-
myPlayerId = playerId;
isGameAdministrator = isGameAdmin;
addConnectedPlayer(playerId, playerName, isGameAdmin);
@@ -1018,7 +1025,7 @@ void gameLobbyDialogImpl::joinedNetworkGame(unsigned playerId, QString playerNam
void gameLobbyDialogImpl::addConnectedPlayer(unsigned playerId, QString playerName, bool isGameAdmin)
{
-
+ GameInfo info(mySession->getClientGameInfo(mySession->getClientCurrentGameId()));
QTreeWidgetItem *item = new QTreeWidgetItem(treeWidget_connectedPlayers, 0);
item->setData(0, Qt::UserRole, playerId);
item->setData(0, Qt::DisplayRole, playerName);
@@ -1026,7 +1033,7 @@ void gameLobbyDialogImpl::addConnectedPlayer(unsigned playerId, QString playerNa
if(isGameAdmin) item->setBackground(0, QBrush(QColor(0, 255, 0, 127)));
if(this->isVisible() && inGame && myConfig->readConfigInt("PlayNetworkGameNotification")) {
- if(treeWidget_connectedPlayers->topLevelItemCount() < treeWidget_connectedPlayers->headerItem()->data(0, Qt::UserRole).toInt()) {
+ if(treeWidget_connectedPlayers->topLevelItemCount() < info.data.maxNumberOfPlayers) {
myW->getMySoundEventHandler()->playSound("playerconnected", 0);
} else {
myW->getMySoundEventHandler()->playSound("onlinegameready", 0);
@@ -1040,6 +1047,17 @@ void gameLobbyDialogImpl::addConnectedPlayer(unsigned playerId, QString playerNa
refreshConnectedPlayerAvatars();
}
+void gameLobbyDialogImpl::addConnectedSpectator(unsigned spectatorId, QString spectatorName)
+{
+
+ QTreeWidgetItem *item = new QTreeWidgetItem(treeWidget_connectedSpectators, 0);
+ item->setData(0, Qt::UserRole, spectatorId);
+ item->setData(0, Qt::DisplayRole, spectatorName);
+ tabWidget_playerSpectators->setTabText(1, tr("Spectators (%1)").arg(treeWidget_connectedSpectators->topLevelItemCount()));
+// if (inGame)
+// refreshConnectedSpecatatorAvatars();
+}
+
void gameLobbyDialogImpl::updatePlayer(unsigned playerId, QString newPlayerName)
{
@@ -1074,14 +1092,6 @@ void gameLobbyDialogImpl::updatePlayer(unsigned playerId, QString newPlayerName)
myNickListModel->item(it1, 0)->setIcon(QIcon(QString(":/cflags/cflags/%1.png").arg(countryString)));
myNickListModel->item(it1, 0)->setToolTip(getFullCountryString(countryString.toUpper()));
}
-
- unsigned gameIdOfPlayer = mySession->getGameIdOfPlayer(playerId);
- if(gameIdOfPlayer) {
- myNickListModel->item(it1, 0)->setData("active", 34);
- } else {
- myNickListModel->item(it1, 0)->setData("idle", 34);
- }
-
break;
}
@@ -1095,7 +1105,6 @@ void gameLobbyDialogImpl::updatePlayer(unsigned playerId, QString newPlayerName)
void gameLobbyDialogImpl::removePlayer(unsigned playerId, QString)
{
-
QTreeWidgetItemIterator it(treeWidget_connectedPlayers);
while (*it) {
if ((*it)->data(0, Qt::UserRole) == playerId) {
@@ -1104,9 +1113,21 @@ void gameLobbyDialogImpl::removePlayer(unsigned playerId, QString)
}
++it;
}
-
checkPlayerQuantity();
+}
+
+void gameLobbyDialogImpl::removeSpectator(unsigned spectatorId, QString)
+{
+ QTreeWidgetItemIterator it(treeWidget_connectedSpectators);
+ while (*it) {
+ if ((*it)->data(0, Qt::UserRole) == spectatorId) {
+ treeWidget_connectedSpectators->takeTopLevelItem(treeWidget_connectedSpectators->indexOfTopLevelItem(*it));
+ break;
+ }
+ ++it;
+ }
+ tabWidget_playerSpectators->setTabText(1, tr("Spectators (%1)").arg(treeWidget_connectedSpectators->topLevelItemCount()));
}
void gameLobbyDialogImpl::playerLeftLobby(unsigned playerId)
@@ -1138,15 +1159,7 @@ void gameLobbyDialogImpl::playerJoinedLobby(unsigned playerId, QString /*playerN
item->setIcon(QIcon(QString(":/cflags/cflags/%1.png").arg(countryString)));
item->setToolTip(getFullCountryString(countryString.toUpper()));
}
-
- unsigned gameIdOfPlayer = mySession->getGameIdOfPlayer(playerId);
- if(gameIdOfPlayer) {
- item->setData("active", 34);
- } else {
- item->setData("idle", 34);
- }
-
-
+ item->setData("idle", 34);
myNickListModel->appendRow(item);
refreshPlayerStats();
@@ -1204,7 +1217,6 @@ void gameLobbyDialogImpl::joinedGameDialogUpdate()
treeWidget_connectedPlayers->clear();
pushButton_CreateGame->hide();
pushButton_JoinGame->hide();
- pushButton_joinAnyGame->hide();
pushButton_Leave->show();
pushButton_Leave->setEnabled(true);
@@ -1237,15 +1249,11 @@ void gameLobbyDialogImpl::joinedGameDialogUpdate()
break;
}
- showGameDescription(TRUE);
+ showGameDescription(true);
label_SmallBlind->setText(QString("%L1").arg(info.data.firstSmallBlind));
label_StartCash->setText(QString("%L1").arg(info.data.startMoney));
updateDialogBlinds(info.data);
label_GameTiming->setText(QString::number(info.data.playerActionTimeoutSec)+" "+tr("sec (action)")+"\n"+QString::number(info.data.delayBetweenHandsSec)+" "+tr("sec (hand delay)"));
-
- QTreeWidgetItem *header = treeWidget_connectedPlayers->headerItem();
- header->setText(0, tr("Connected players - Max. %1").arg(info.data.maxNumberOfPlayers));
- header->setData(0, Qt::UserRole, info.data.maxNumberOfPlayers);
}
void gameLobbyDialogImpl::leftGameDialogUpdate()
@@ -1258,11 +1266,7 @@ void gameLobbyDialogImpl::leftGameDialogUpdate()
groupBox_GameInfo->setEnabled(false);
currentGameName = "";
- QTreeWidgetItem *header = treeWidget_connectedPlayers->headerItem();
- header->setText(0, tr("Connected players"));
- header->setData(0, Qt::UserRole, 0);
-
- showGameDescription(FALSE);
+ showGameDescription(false);
label_typeIcon->setText(" ");
label_typeText->setText(" ");
label_SmallBlind->setText("");
@@ -1273,6 +1277,7 @@ void gameLobbyDialogImpl::leftGameDialogUpdate()
label_GameTiming->setText("");
treeWidget_connectedPlayers->clear();
+ treeWidget_connectedSpectators->clear();
pushButton_StartGame->hide();
pushButton_Leave->hide();
pushButton_Kick->hide();
@@ -1281,8 +1286,6 @@ void gameLobbyDialogImpl::leftGameDialogUpdate()
pushButton_CreateGame->show();
pushButton_JoinGame->show();
pushButton_JoinGame->setEnabled(false);
- pushButton_joinAnyGame->show();
- joinAnyGameButtonRefresh();
lineEdit_ChatInput->setFocus();
}
@@ -1436,6 +1439,7 @@ void gameLobbyDialogImpl::showGameDescription(bool show)
label_gameDesc5->show();
label_gameDesc6->show();
label_gameDesc7->show();
+ checkPlayerQuantity();
} else {
label_gameType->hide();
label_gameDesc2->hide();
@@ -1444,6 +1448,8 @@ void gameLobbyDialogImpl::showGameDescription(bool show)
label_gameDesc5->hide();
label_gameDesc6->hide();
label_gameDesc7->hide();
+ tabWidget_playerSpectators->setTabText(0, tr("Players (%1)").arg(0));
+ tabWidget_playerSpectators->setTabText(1, tr("Spectators (%1)").arg(0));
}
}
@@ -1464,26 +1470,6 @@ void gameLobbyDialogImpl::hideWaitStartGameMsgBox()
waitRejoinStartGameMsgBox->hide();
}
-void gameLobbyDialogImpl::joinAnyGameButtonRefresh()
-{
-
- int openNonPrivateNonFullGamesCounter = 0;
-
- int it = 0;
- while (myGameListModel->item(it)) {
-
- int players = myGameListModel->item(it, 1)->data(Qt::DisplayRole).toString().section("/",0,0).toInt();
- int maxPlayers = myGameListModel->item(it, 1)->data(Qt::DisplayRole).toString().section("/",1,1).toInt();
- if (myGameListModel->item(it, 2)->data(16) == "open" && myGameListModel->item(it, 4)->data(16) == "nonpriv" && players < maxPlayers) {
- openNonPrivateNonFullGamesCounter++;
- }
- ++it;
- }
-
- if(openNonPrivateNonFullGamesCounter) pushButton_joinAnyGame->setEnabled(TRUE);
- else pushButton_joinAnyGame->setEnabled(FALSE);
-}
-
void gameLobbyDialogImpl::reject()
{
myStartWindow->show();
@@ -1663,7 +1649,6 @@ void gameLobbyDialogImpl::showNickListContextMenu(QPoint p)
unsigned playerUid = myNickListSelectionModel->currentIndex().data(Qt::UserRole).toUInt();
if(inGame && mySession->getClientGameInfo(mySession->getClientCurrentGameId()).data.gameType == GAME_TYPE_INVITE_ONLY && playerUid != mySession->getClientUniquePlayerId() && !mySession->getClientPlayerInfo(playerUid).isGuest) {
-
nickListInviteAction->setEnabled(true);
nickListInviteAction->setText(tr("Invite %1").arg(QString::fromUtf8(mySession->getClientPlayerInfo(playerUid).playerName.c_str())));
@@ -1672,16 +1657,22 @@ void gameLobbyDialogImpl::showNickListContextMenu(QPoint p)
nickListInviteAction->setEnabled(false);
}
- if(playerUid != mySession->getClientUniquePlayerId() && !mySession->getClientPlayerInfo(playerUid).isGuest) {
-
+ if(playerUid != mySession->getClientUniquePlayerId() && !mySession->getClientPlayerInfo(playerUid).isGuest && !playerIsOnIgnoreList(playerUid)) {
nickListIgnorePlayerAction->setEnabled(true);
nickListIgnorePlayerAction->setText(tr("Ignore %1").arg(QString::fromUtf8(mySession->getClientPlayerInfo(playerUid).playerName.c_str())));
} else {
-
nickListIgnorePlayerAction->setEnabled(false);
nickListIgnorePlayerAction->setText(tr("Ignore player ..."));
}
+ if(playerUid != mySession->getClientUniquePlayerId() && !mySession->getClientPlayerInfo(playerUid).isGuest && playerIsOnIgnoreList(playerUid)) {
+ nickListUnignorePlayerAction->setEnabled(true);
+ nickListUnignorePlayerAction->setText(tr("Unignore %1").arg(QString::fromUtf8(mySession->getClientPlayerInfo(playerUid).playerName.c_str())));
+ } else {
+ nickListUnignorePlayerAction->setEnabled(false);
+ nickListUnignorePlayerAction->setText(tr("Unignore player ..."));
+ }
+
unsigned gameIdOfPlayer = mySession->getGameIdOfPlayer(playerUid);
QString playerInGameInfoString;
if(gameIdOfPlayer) {
@@ -1692,8 +1683,11 @@ void gameLobbyDialogImpl::showNickListContextMenu(QPoint p)
nickListPlayerInGameInfo->setText(playerInGameInfoString);
//prevent admin to total kickban himself
- if(playerUid == mySession->getClientUniquePlayerId()) { nickListAdminTotalKickBan->setDisabled(true); }
- else { nickListAdminTotalKickBan->setEnabled(true); }
+ if(playerUid == mySession->getClientUniquePlayerId()) {
+ nickListAdminTotalKickBan->setDisabled(true);
+ } else {
+ nickListAdminTotalKickBan->setEnabled(true);
+ }
// check for admin and remove admin actions for non-admins
if(!mySession->getClientPlayerInfo(mySession->getClientUniquePlayerId()).isAdmin) {
@@ -1713,8 +1707,11 @@ void gameLobbyDialogImpl::showGameListContextMenu(QPoint p)
assert(mySession);
unsigned selectedGameId = myGameListSelectionModel->selectedRows().first().data(Qt::UserRole).toUInt();
- if(selectedGameId == mySession->getClientCurrentGameId()) { gameListAdminCloseGame->setDisabled(true); }
- else { gameListAdminCloseGame->setEnabled(true); }
+ if(selectedGameId == mySession->getClientCurrentGameId()) {
+ gameListAdminCloseGame->setDisabled(true);
+ } else {
+ gameListAdminCloseGame->setEnabled(true);
+ }
// check for admin and remove admin actions for non-admins
if(!mySession->getClientPlayerInfo(mySession->getClientUniquePlayerId()).isAdmin) {
@@ -1805,21 +1802,32 @@ bool gameLobbyDialogImpl::playerIsOnIgnoreList(unsigned playerId)
void gameLobbyDialogImpl::putPlayerOnIgnoreList()
{
-
if(myNickListSelectionModel->currentIndex().isValid()) {
-
unsigned playerId = myNickListSelectionModel->currentIndex().data(Qt::UserRole).toUInt();
-
if(!playerIsOnIgnoreList(playerId)) {
-
myMessageDialogImpl dialog(myConfig, this);
- if(dialog.exec(INGNORE_PLAYER_QUESTION, tr("You will no longer receive chat messages or game invitations from this user.
Do you really want to put player %1 on your ignore list?").arg(QString::fromUtf8(mySession->getClientPlayerInfo(playerId).playerName.c_str())), tr("PokerTH - Question"), QPixmap(":/gfx/im-ban-user_64.png"), QDialogButtonBox::Yes|QDialogButtonBox::No, false ) == QDialog::Accepted) {
-
+ if(dialog.exec(IGNORE_PLAYER_QUESTION, tr("You will no longer receive chat messages or game invitations from this user.
Do you really want to put player %1 on your ignore list?").arg(QString::fromUtf8(mySession->getClientPlayerInfo(playerId).playerName.c_str())), tr("PokerTH - Question"), QPixmap(":/gfx/im-ban-user_64.png"), QDialogButtonBox::Yes|QDialogButtonBox::No, false ) == QDialog::Accepted) {
list playerIgnoreList = myConfig->readConfigStringList("PlayerIgnoreList");
playerIgnoreList.push_back(QString("%1").arg(QString::fromUtf8(mySession->getClientPlayerInfo(playerId).playerName.c_str())).toUtf8().constData());
myConfig->writeConfigStringList("PlayerIgnoreList", playerIgnoreList);
myConfig->writeBuffer();
+ myChat->refreshIgnoreList();
+ }
+ }
+ }
+}
+void gameLobbyDialogImpl::removePlayerFromIgnoreList()
+{
+ if(myNickListSelectionModel->currentIndex().isValid()) {
+ unsigned playerId = myNickListSelectionModel->currentIndex().data(Qt::UserRole).toUInt();
+ if(playerIsOnIgnoreList(playerId)) {
+ myMessageDialogImpl dialog(myConfig, this);
+ if(dialog.exec(UNIGNORE_PLAYER_QUESTION, tr("You will receive chat messages and game invitations from this user again!
Do you really want to remove player %1 from your ignore list?").arg(QString::fromUtf8(mySession->getClientPlayerInfo(playerId).playerName.c_str())), tr("PokerTH - Question"), QPixmap(":/gfx/dialog_ok_apply.png"), QDialogButtonBox::Yes|QDialogButtonBox::No, false ) == QDialog::Accepted) {
+ list playerIgnoreList = myConfig->readConfigStringList("PlayerIgnoreList");
+ playerIgnoreList.remove(QString("%1").arg(QString::fromUtf8(mySession->getClientPlayerInfo(playerId).playerName.c_str())).toUtf8().constData());
+ myConfig->writeConfigStringList("PlayerIgnoreList", playerIgnoreList);
+ myConfig->writeBuffer();
myChat->refreshIgnoreList();
}
}
diff --git a/src/gui/qt/gamelobbydialog/gamelobbydialogimpl.h b/src/gui/qt/gamelobbydialog/gamelobbydialogimpl.h
index 2b7f39b7..b3717b07 100644
--- a/src/gui/qt/gamelobbydialog/gamelobbydialogimpl.h
+++ b/src/gui/qt/gamelobbydialog/gamelobbydialogimpl.h
@@ -64,7 +64,7 @@ public:
~gameLobbyDialogImpl();
- void exec();
+ int exec();
ChatTools *getMyChat() {
return myChat;
@@ -84,7 +84,6 @@ public slots:
void createGame();
void joinGame();
- void joinAnyGame();
void gameSelected(const QModelIndex &);
void updateGameItem(QList , unsigned gameId);
void addGame(unsigned gameId);
@@ -131,7 +130,6 @@ public slots:
void showWaitStartGameMsgBox();
void hideWaitStartGameMsgBox();
void stopWaitStartGameMsgBoxTimer();
- void joinAnyGameButtonRefresh();
void reject();
void closeEvent(QCloseEvent *event);
void accept();
@@ -151,6 +149,7 @@ public slots:
void chatInfoPlayerInvitation(unsigned gameId, unsigned playerIdWho, unsigned playerIdFrom);
void chatInfoPlayerRejectedInvitation(unsigned gameId, unsigned playerIdWho, DenyGameInvitationReason reason);
void putPlayerOnIgnoreList();
+ void removePlayerFromIgnoreList();
bool playerIsOnIgnoreList(unsigned playerid);
void searchForPlayerRegExpChanged();
void showAutoStartTimer();
@@ -162,6 +161,10 @@ public slots:
void reportBadGameName();
void adminActionCloseGame();
void adminActionTotalKickBan();
+ void addConnectedSpectator(unsigned spectatorId, QString spectatorName);
+ void removeSpectator(unsigned spectatorId, QString);
+ void gameAddSpectator(unsigned, unsigned);
+ void gameRemoveSpectator(unsigned, unsigned);
private:
@@ -203,6 +206,7 @@ private:
QMenu *nickListContextMenu;
QAction *nickListInviteAction;
QAction *nickListIgnorePlayerAction;
+ QAction *nickListUnignorePlayerAction;
QMenu *nickListPlayerInfoSubMenu;
QMenu *nickListAdminSubMenu;
QAction *nickListAdminTotalKickBan;
diff --git a/src/gui/qt/gamelobbydialog/mygamelisttreewidget.h b/src/gui/qt/gamelobbydialog/mygamelisttreewidget.h
index e46d4b81..ea8985e3 100644
--- a/src/gui/qt/gamelobbydialog/mygamelisttreewidget.h
+++ b/src/gui/qt/gamelobbydialog/mygamelisttreewidget.h
@@ -33,6 +33,9 @@
#include
#include
+#if QT_VERSION >= 0x050000
+#include
+#endif
class MyGameListTreeWidget : public QTreeWidget
{
diff --git a/src/gui/qt/gametable.ui b/src/gui/qt/gametable.ui
index 557211b5..f76fcf38 100644
--- a/src/gui/qt/gametable.ui
+++ b/src/gui/qt/gametable.ui
@@ -2235,7 +2235,16 @@ p, li { white-space: pre-wrap; }
QGroupBox {border-style:none;}
-
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
0
@@ -2306,15 +2315,24 @@ p, li { white-space: pre-wrap; }
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
3
2
-
- 0
-
-
@@ -2556,15 +2574,24 @@ p, li { white-space: pre-wrap; }
-
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
3
2
-
- 0
-
-
@@ -3532,7 +3559,16 @@ p, li { white-space: pre-wrap; }
0
-
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
0
-
@@ -3582,7 +3618,16 @@ p, li { white-space: pre-wrap; }
-
+
+ 4
+
+
+ 4
+
+
+ 4
+
+
4
-
@@ -3598,7 +3643,16 @@ p, li { white-space: pre-wrap; }
Hands
-
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
0
@@ -3618,7 +3672,16 @@ p, li { white-space: pre-wrap; }
Chat
-
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
0
@@ -3650,15 +3713,24 @@ p, li { white-space: pre-wrap; }
Kick
+
+ 5
+
+
+ 5
+
+
+ 5
+
+
+ 5
+
0
6
-
- 5
-
-
@@ -3790,12 +3862,21 @@ p, li { white-space: pre-wrap; }
Player info
+
+ 6
+
+
+ 6
+
+
+ 6
+
+
+ 6
+
3
-
- 6
-
-
@@ -3868,15 +3949,24 @@ p, li { white-space: pre-wrap; }
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
0
1
-
- 0
-
-
@@ -4026,7 +4116,7 @@ p, li { white-space: pre-wrap; }
- 20
+ 0
0
@@ -4039,7 +4129,7 @@ p, li { white-space: pre-wrap; }
- 20
+ 0
0
@@ -4069,7 +4159,16 @@ p, li { white-space: pre-wrap; }
0
-
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
0
-
@@ -4119,15 +4218,24 @@ p, li { white-space: pre-wrap; }
+
+ 4
+
+
+ 4
+
+
+ 4
+
+
+ 4
+
1
2
-
- 4
-
-
@@ -4141,7 +4249,16 @@ p, li { white-space: pre-wrap; }
Log
-
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
0
@@ -4251,7 +4368,16 @@ p, li { white-space: pre-wrap; }
6
-
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
0
-
@@ -4457,13 +4583,13 @@ p, li { white-space: pre-wrap; }
-
-
+
+ 9
+
+
+ 9
+
+
+ 9
+
+
9
@@ -139,7 +148,16 @@
Project
-
+
+ 9
+
+
+ 9
+
+
+ 9
+
+
9
@@ -169,7 +187,16 @@ p, li { white-space: pre-wrap; }
Translation
-
+
+ 9
+
+
+ 9
+
+
+ 9
+
+
9
@@ -199,7 +226,16 @@ p, li { white-space: pre-wrap; }
Thanks to
-
+
+ 9
+
+
+ 9
+
+
+ 9
+
+
9
@@ -226,7 +262,16 @@ p, li { white-space: pre-wrap; }
License
-
+
+ 9
+
+
+ 9
+
+
+ 9
+
+
9
@@ -244,6 +289,16 @@ p, li { white-space: pre-wrap; }
+
+
+ Third party libs
+
+
+ -
+
+
+
+
-
diff --git a/src/gui/qt/gui_800x480/createinternetgamedialog_800x480.ui b/src/gui/qt/gui_800x480/createinternetgamedialog_800x480.ui
index dac0424f..6b6d395f 100644
--- a/src/gui/qt/gui_800x480/createinternetgamedialog_800x480.ui
+++ b/src/gui/qt/gui_800x480/createinternetgamedialog_800x480.ui
@@ -85,45 +85,45 @@
0
- 7
+ 4
- -
-
+
-
+
-
-
+
0
0
-
-
-
- Default game name:
+ Maximum number of players:
-
-
+
+
+
+ 0
+ 0
+
+
- 400
+ 150
0
-
-
- 16777215
- 16777215
-
+
+ 2
-
- Qt::ImhNoPredictiveText
+
+ 10
-
- 48
+
+ 10
@@ -198,7 +198,7 @@
- -
+
-
Blinds
@@ -233,7 +233,7 @@
- -
+
-
10
@@ -298,7 +298,103 @@
- -
+
-
+
+
+ 6
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
-
+
+
+
+ 0
+ 0
+
+
+
+ Password:
+
+
+
+ 32
+ 32
+
+
+
+
+ -
+
+
+ false
+
+
+
+ 400
+ 0
+
+
+
+ QLineEdit::Password
+
+
+
+
+
+ -
+
+
-
+
+
+
+ 0
+ 0
+
+
+
+
+
+
+ Default game name:
+
+
+
+ -
+
+
+
+ 400
+ 0
+
+
+
+
+ 16777215
+ 16777215
+
+
+
+ Qt::ImhNoPredictiveText
+
+
+ 48
+
+
+
+
+
+ -
-
@@ -349,92 +445,12 @@
- -
-
-
- 6
-
-
- 0
-
-
-
-
-
-
- 0
- 0
-
-
-
- Password:
-
-
-
- 32
- 32
-
-
-
-
- -
-
-
- false
-
-
-
- 400
- 0
-
-
-
- QLineEdit::Password
-
-
-
-
-
-
-
-
-
-
-
-
- 0
- 0
-
-
-
- Maximum number of players:
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- 150
- 0
-
-
-
- 2
-
-
- 10
-
-
- 10
-
-
-
-
+
+
+ Allow spectators to watch the game
+
+
@@ -472,7 +488,16 @@
0
-
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
0
-
diff --git a/src/gui/qt/gui_800x480/gamelobbydialog_800x480.ui b/src/gui/qt/gui_800x480/gamelobbydialog_800x480.ui
index 755ea40c..3289c842 100644
--- a/src/gui/qt/gui_800x480/gamelobbydialog_800x480.ui
+++ b/src/gui/qt/gui_800x480/gamelobbydialog_800x480.ui
@@ -63,7 +63,16 @@
Games
-
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
0
@@ -134,7 +143,7 @@
&Leave Game
-
+
:/gfx/go-previous-view.png:/gfx/go-previous-view.png
@@ -196,7 +205,7 @@
&Start Game
-
+
:/gfx/dialog_ok_apply.png:/gfx/dialog_ok_apply.png
@@ -232,7 +241,7 @@
&Kick Player
-
+
:/gfx/list-remove.png:/gfx/list-remove.png
@@ -306,32 +315,22 @@
6
-
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
0
-
-
-
-
- 0
- 0
-
-
-
-
- 16777215
- 16777215
-
-
-
- QObject {font: bold 20px}
-
-
- Join &any game
-
-
-
- :/gfx/transform-rotate.png:/gfx/transform-rotate.png
+
+
+ true
@@ -369,7 +368,7 @@
&Create Game
-
+
:/gfx/list_add.png:/gfx/list_add.png
@@ -395,7 +394,7 @@
&Join Game
-
+
:/gfx/go-next-view.png:/gfx/go-next-view.png
@@ -459,58 +458,127 @@
- QObject {font: bold 16px}
+ QObject {font: bold 14px}
Game Info
-
-
+
+
0
-
+
0
- -
-
-
-
- 0
- 0
-
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
-
+
+
+ 0
-
-
- 221
- 100
-
-
-
- Qt::CustomContextMenu
-
-
- QObject {font: 14px}
-
-
- 1
-
-
-
- 25
- 26
-
-
-
- 15
-
-
-
- Connected Players
-
-
+
+
+ Players
+
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
-
+
+
+
+ 0
+ 0
+
+
+
+
+ 221
+ 100
+
+
+
+ Qt::CustomContextMenu
+
+
+ QObject {font: 14px}
+
+
+ 1
+
+
+
+ 25
+ 26
+
+
+
+ 15
+
+
+ true
+
+
+
+ Connected Players
+
+
+
+
+
+
+
+
+ Spectators
+
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+ -
+
+
+ true
+
+
+
+ 1
+
+
+
+
+
+
- -
+
-
@@ -535,20 +603,29 @@
0
0
- 288
- 195
+ 292
+ 199
+
+ 4
+
+
+ 4
+
+
+ 4
+
+
+ 4
+
- -1
+ 6
2
-
- 4
-
-
@@ -780,7 +857,7 @@
- -
+
-
-
@@ -797,7 +874,7 @@
Fill up with computer opponents
-
+
:/gfx/swbuttonlocalgame.png:/gfx/swbuttonlocalgame.png
@@ -816,7 +893,16 @@
Lobby-Chat
-
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
0
@@ -1117,9 +1203,6 @@ p, li { white-space: pre-wrap; }
- pushButton_joinAnyGame
- pushButton_CreateGame
- pushButton_JoinGame
textBrowser_ChatDisplay
lineEdit_ChatInput
treeWidget_connectedPlayers
@@ -1129,7 +1212,7 @@ p, li { white-space: pre-wrap; }
pushButton_Leave
-
+
diff --git a/src/gui/qt/gui_800x480/gametable_800x480.ui b/src/gui/qt/gui_800x480/gametable_800x480.ui
index ca512667..ba2eb0e9 100644
--- a/src/gui/qt/gui_800x480/gametable_800x480.ui
+++ b/src/gui/qt/gui_800x480/gametable_800x480.ui
@@ -54,7 +54,16 @@
-
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
0
@@ -2749,7 +2758,16 @@ p, li { white-space: pre-wrap; }
QGroupBox {border-style:none;}
-
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
0
@@ -4262,7 +4280,16 @@ p, li { white-space: pre-wrap; }
-
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
0
@@ -4621,13 +4648,13 @@ p, li { white-space: pre-wrap; }
-