From f7885f9116f11074c34ac32682329053f909ddcb Mon Sep 17 00:00:00 2001 From: doitux Date: Mon, 17 Aug 2009 08:43:58 +0000 Subject: [PATCH] adding secrects to chatcleaner --- pokerth.pro | 2 +- src/chatcleaner/cleanerserver.cpp | 4 ++++ src/gui/qt/gamelobbydialog/gamelobbydialogimpl.cpp | 2 ++ src/gui/qt/gamelobbydialog/lobbychat/lobbychat.cpp | 6 ++---- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/pokerth.pro b/pokerth.pro index dd546e03..8d433fe1 100755 --- a/pokerth.pro +++ b/pokerth.pro @@ -1,5 +1,5 @@ # QMake pro-file for PokerTH TEMPLATE = subdirs -SUBDIRS = pokerth_protocol.pro pokerth_lib.pro pokerth_game.pro pokerth_server.pro +SUBDIRS = pokerth_protocol.pro pokerth_lib.pro pokerth_game.pro pokerth_server.pro chatcleaner.pro CONFIG += ordered diff --git a/src/chatcleaner/cleanerserver.cpp b/src/chatcleaner/cleanerserver.cpp index 962ff9e4..7da824b5 100644 --- a/src/chatcleaner/cleanerserver.cpp +++ b/src/chatcleaner/cleanerserver.cpp @@ -14,6 +14,10 @@ using namespace std; CleanerServer::CleanerServer(): config(0), blockConnection(false) { config = new CleanerConfig; + + clientSecret = QString::fromUtf8(config->readConfigString("ClientAuthString").c_str()); + serverSecret = QString::fromUtf8(config->readConfigString("ServerAuthString").c_str()); + qDebug() << clientSecret << serverSecret; myMessageFilter = new MessageFilter(config); tcpServer = new QTcpServer(); diff --git a/src/gui/qt/gamelobbydialog/gamelobbydialogimpl.cpp b/src/gui/qt/gamelobbydialog/gamelobbydialogimpl.cpp index 0a1c0f60..1afd79dd 100644 --- a/src/gui/qt/gamelobbydialog/gamelobbydialogimpl.cpp +++ b/src/gui/qt/gamelobbydialog/gamelobbydialogimpl.cpp @@ -254,6 +254,8 @@ void gameLobbyDialogImpl::refresh(int actionID) { myGameListSelectionModel->clearSelection(); myGameListSortFilterProxyModel->clear(); + treeWidget_NickList->clear(); + QStringList headerList; headerList << tr("Game") << tr("Players") << tr("State") << tr("Private"); myGameListModel->setHorizontalHeaderLabels(headerList); diff --git a/src/gui/qt/gamelobbydialog/lobbychat/lobbychat.cpp b/src/gui/qt/gamelobbydialog/lobbychat/lobbychat.cpp index f42765d1..cef544a1 100644 --- a/src/gui/qt/gamelobbydialog/lobbychat/lobbychat.cpp +++ b/src/gui/qt/gamelobbydialog/lobbychat/lobbychat.cpp @@ -33,6 +33,8 @@ using namespace std; LobbyChat::LobbyChat(gameLobbyDialogImpl* l, ConfigFile *c) : myLobby(l), myConfig(c) { myChatTools = new ChatTools(myLobby->lineEdit_ChatInput, myConfig, 1, myLobby->textBrowser_ChatDisplay, myLobby->treeWidget_NickList); + + myNick = QString::fromUtf8(myConfig->readConfigString("MyName").c_str()); } LobbyChat::~LobbyChat() @@ -42,10 +44,6 @@ LobbyChat::~LobbyChat() void LobbyChat::sendMessage() { - // TODO nick needs to be set earlier. - if (myNick.isEmpty()) - myNick = QString::fromUtf8(myConfig->readConfigString("MyName").c_str()); - fillChatLinesHistory(myLobby->lineEdit_ChatInput->text()); QString tmpMsg(myLobby->lineEdit_ChatInput->text()); if (tmpMsg.size())