Lobby chat works now, but player list ist not yet shown.

This commit is contained in:
lotodore
2009-08-15 14:51:21 +00:00
parent 68ed10fd1e
commit 4cf42d2113
5 changed files with 39 additions and 28 deletions
@@ -42,20 +42,16 @@ LobbyChat::~LobbyChat()
void LobbyChat::sendMessage() {
// TODO nick needs to be set earlier.
if (myNick.isEmpty())
myNick = QString::fromUtf8(myConfig->readConfigString("MyName").c_str());
if (!myNick.isEmpty())
fillChatLinesHistory(myLobby->lineEdit_ChatInput->text());
QString tmpMsg(myLobby->lineEdit_ChatInput->text());
if (tmpMsg.size())
{
fillChatLinesHistory(myLobby->lineEdit_ChatInput->text());
QString tmpMsg(myLobby->lineEdit_ChatInput->text());
if (tmpMsg.size())
{
myLobby->getSession()->sendLobbyChatMessage(tmpMsg.toUtf8().constData());
myLobby->lineEdit_ChatInput->setText("");
displayMessage(myNick, tmpMsg);
}
myLobby->getSession()->sendLobbyChatMessage(tmpMsg.toUtf8().constData());
myLobby->lineEdit_ChatInput->setText("");
}
}