From 7cd4cef9d398213fbfce369430539f0dcc476e88 Mon Sep 17 00:00:00 2001 From: Max-Wilhelm Bruker Date: Mon, 30 May 2011 16:15:01 +0200 Subject: [PATCH] banning bug fixed --- cockatrice/src/userlist.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cockatrice/src/userlist.cpp b/cockatrice/src/userlist.cpp index b63c6805..c904513c 100644 --- a/cockatrice/src/userlist.cpp +++ b/cockatrice/src/userlist.cpp @@ -217,7 +217,8 @@ void UserList::showContextMenu(const QPoint &pos, const QModelIndex &index) else if (actionClicked == aBan) { bool ok; int minutes = QInputDialog::getInt(this, tr("Duration"), tr("Please enter the duration of the ban (in minutes).\nEnter 0 for an indefinite ban."), 0, 0, 2147483647, 10, &ok); - client->sendCommand(new Command_BanFromServer(userName, minutes)); + if (ok) + client->sendCommand(new Command_BanFromServer(userName, minutes)); } delete menu;