Fixes related to kicking players.
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user