mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
small protocol change
This commit is contained in:
parent
40d292c4ac
commit
2e0b16e90b
2 changed files with 9 additions and 12 deletions
|
|
@ -111,21 +111,20 @@ void Client::readLine()
|
|||
} else
|
||||
emit gameEvent(event);
|
||||
} else if (prefix == "resp") {
|
||||
if (values.size() != 2) {
|
||||
// XXX
|
||||
}
|
||||
bool ok;
|
||||
int msgid = values.takeFirst().toInt(&ok);
|
||||
if (!ok) {
|
||||
// XXX
|
||||
}
|
||||
|
||||
if (values.empty()) {
|
||||
// XXX
|
||||
}
|
||||
|
||||
ServerResponse resp;
|
||||
if (values[0] == "ok")
|
||||
resp = RespOk;
|
||||
else if (values[1] == "password")
|
||||
resp = RespPassword;
|
||||
else if (values[0] == "password")
|
||||
resp = RespPassword;
|
||||
else
|
||||
resp = RespErr;
|
||||
emit responseReceived(msgid, resp);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue