diff --git a/src/gui/qt/chattools/chattools.cpp b/src/gui/qt/chattools/chattools.cpp index 7781ab6a..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,15 +146,24 @@ 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); + } + } if(!myConfig->readConfigInt("DisableChatEmoticons")) { tempMsg = checkForEmotes(tempMsg); diff --git a/src/gui/qt/newgamedialog.ui b/src/gui/qt/newgamedialog.ui index 2e547bb8..3158dfa3 100755 --- a/src/gui/qt/newgamedialog.ui +++ b/src/gui/qt/newgamedialog.ui @@ -6,7 +6,7 @@ 0 0 - 225 + 239 271 @@ -78,9 +78,6 @@ Blinds - - 0 -