mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
Merge pull request #1205 from ZeldaZach/fix_1173
Server Name Rules Information
This commit is contained in:
commit
31890450dc
7 changed files with 75 additions and 17 deletions
|
|
@ -789,8 +789,14 @@ Response::ResponseCode ServerSocketInterface::cmdRegisterAccount(const Command_R
|
|||
}
|
||||
|
||||
// TODO: Move this method outside of the db interface
|
||||
if (!sqlInterface->usernameIsValid(userName))
|
||||
QString errorString;
|
||||
if (!sqlInterface->usernameIsValid(userName, errorString))
|
||||
{
|
||||
Response_Register *re = new Response_Register;
|
||||
re->set_denied_reason_str(errorString.toStdString());
|
||||
rc.setResponseExtension(re);
|
||||
return Response::RespUsernameInvalid;
|
||||
}
|
||||
|
||||
if(sqlInterface->userExists(userName))
|
||||
return Response::RespUserAlreadyExists;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue