mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
added admin tab; server status message update
This commit is contained in:
parent
714a0eee50
commit
bd9e142d1d
20 changed files with 242 additions and 65 deletions
|
|
@ -43,15 +43,16 @@ void RemoteClient::slotConnected()
|
|||
|
||||
void RemoteClient::loginResponse(ProtocolResponse *response)
|
||||
{
|
||||
Response_Login *resp = qobject_cast<Response_Login *>(response);
|
||||
if (!resp)
|
||||
disconnectFromServer();
|
||||
|
||||
if (resp->getResponseCode() == RespOk) {
|
||||
if (response->getResponseCode() == RespOk) {
|
||||
Response_Login *resp = qobject_cast<Response_Login *>(response);
|
||||
if (!resp) {
|
||||
disconnectFromServer();
|
||||
return;
|
||||
}
|
||||
setStatus(StatusLoggedIn);
|
||||
emit userInfoChanged(resp->getUserInfo());
|
||||
} else {
|
||||
emit serverError(resp->getResponseCode());
|
||||
emit serverError(response->getResponseCode());
|
||||
setStatus(StatusDisconnecting);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue