From 702f949196f6927a60c4bb349effefc93488cd64 Mon Sep 17 00:00:00 2001 From: woogerboy21 Date: Sat, 15 Aug 2015 21:17:32 -0400 Subject: [PATCH] Updated response block to look better --- cockatrice/src/tab_server.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/cockatrice/src/tab_server.cpp b/cockatrice/src/tab_server.cpp index 927e522d..d15f6d8c 100644 --- a/cockatrice/src/tab_server.cpp +++ b/cockatrice/src/tab_server.cpp @@ -138,13 +138,12 @@ void RoomSelector::joinClicked() void RoomSelector::joinFinished(const Response &r, const CommandContainer & /*commandContainer*/, const QVariant &extraData) { - if (r.response_code() != Response::RespOk) { - switch (r.response_code()) { - case Response::RespUserLevelTooLow: QMessageBox::critical(this, tr("Error"), tr("You do not have the proper permission to join this room.")); return; - default: - QMessageBox::critical(this, tr("Error"), tr("Failed to join the room due to an unknown error.")); - return; - } + switch (r.response_code()) { + case Response::RespOk: break; + case Response::RespUserLevelTooLow: QMessageBox::critical(this, tr("Error"), tr("You do not have the proper permission to join this room.")); return; + default: + QMessageBox::critical(this, tr("Error"), tr("Failed to join the room due to an unknown error.")); + return; } const Response_JoinRoom &resp = r.GetExtension(Response_JoinRoom::ext);