Fixes related to kicking players.

This commit is contained in:
lotodore
2007-12-10 20:56:00 +00:00
parent 8485db5ade
commit e2c18bfbfd
2 changed files with 5 additions and 7 deletions
@@ -100,13 +100,10 @@ void LobbyChat::playerKicked(QString nickName, QString byWhom, QString reason)
{ {
if (myNick == nickName) if (myNick == nickName)
{ {
myLobby->accept(); myLobby->treeWidget_NickList->clear();
QMessageBox::warning(myLobby, tr("Network Notification"), myLobby->lineEdit_ChatInput->setEnabled(false);
tr("You were kicked from the server."),
QMessageBox::Close);
} }
else myLobby->textBrowser_ChatDisplay->append(nickName + " " + tr("was kicked from the server by") + " " + byWhom + " (" + reason + ")");
myLobby->textBrowser_ChatDisplay->append(nickName + " " + tr("was kicked from the server by") + " " + byWhom + " (" + reason + ")");
} }
void LobbyChat::playerLeft(QString playerName) void LobbyChat::playerLeft(QString playerName)
+2 -1
View File
@@ -3194,7 +3194,8 @@ void mainWindowImpl::networkError(int errorID, int /*osErrorID*/) {
QMessageBox::Close); } QMessageBox::Close); }
break; break;
case ERR_NET_PLAYER_KICKED: case ERR_NET_PLAYER_KICKED:
{ QMessageBox::warning(this, tr("Network Error"), { mySession->terminateNetworkClient();
QMessageBox::warning(this, tr("Network Error"),
tr("You were kicked from the server."), tr("You were kicked from the server."),
QMessageBox::Close); } QMessageBox::Close); }
break; break;