adding secrects to chatcleaner

This commit is contained in:
doitux
2009-08-17 08:43:58 +00:00
parent c88b6b292d
commit f7885f9116
4 changed files with 9 additions and 5 deletions
+1 -1
View File
@@ -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
+4
View File
@@ -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();
@@ -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);
@@ -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())