mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
Initial release of client ID generation.
This commit is contained in:
parent
44d757f691
commit
52db13a1ca
14 changed files with 246 additions and 186 deletions
|
|
@ -381,11 +381,12 @@ Response::ResponseCode Server_ProtocolHandler::cmdPing(const Command_Ping & /*cm
|
|||
Response::ResponseCode Server_ProtocolHandler::cmdLogin(const Command_Login &cmd, ResponseContainer &rc)
|
||||
{
|
||||
QString userName = QString::fromStdString(cmd.user_name()).simplified();
|
||||
QString clientid = QString::fromStdString(cmd.clientid()).simplified();
|
||||
if (userName.isEmpty() || (userInfo != 0))
|
||||
return Response::RespContextError;
|
||||
QString reasonStr;
|
||||
int banSecondsLeft = 0;
|
||||
AuthenticationResult res = server->loginUser(this, userName, QString::fromStdString(cmd.password()), reasonStr, banSecondsLeft);
|
||||
AuthenticationResult res = server->loginUser(this, userName, QString::fromStdString(cmd.password()), reasonStr, banSecondsLeft, clientid);
|
||||
switch (res) {
|
||||
case UserIsBanned: {
|
||||
Response_Login *re = new Response_Login;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue