Registered Only Server

Implemented the ability to set the server to only allow registered
users.  Also updated client to reflect the log-in rejection as well as
put a check in place for the server to not start if db connection is not
available yet registration is required.
This commit is contained in:
woogerboy21 2014-07-02 20:52:22 -04:00
parent fb4a7b3274
commit d246fa39fe
7 changed files with 27 additions and 6 deletions

View file

@ -1,4 +1,4 @@
/***************************************************************************
/***************************************************************************
* Copyright (C) 2008 by Max-Wilhelm Bruker *
* brukie@gmx.net *
* *
@ -225,7 +225,7 @@ void MainWindow::actAbout()
+ tr("French:") + " Yannick Hammer, Arnaud Faes<br>"
+ tr("Japanese:") + " Nagase Task<br>"
+ tr("Russian:") + " Alexander Davidov<br>"
// + tr("Czech:") + " Ondřej Trhoň<br>"
// + tr("Czech:") + " Ondrej Trhon<br>"
// + tr("Slovak:") + " Ganjalf Rendy<br>"
+ tr("Italian:") + " Luigi Sciolla<br>"
+ tr("Swedish:") + " Jessica Dahl<br>"
@ -261,6 +261,9 @@ void MainWindow::loginError(Response::ResponseCode r, QString reasonStr, quint32
case Response::RespUsernameInvalid:
QMessageBox::critical(this, tr("Error"), tr("Invalid username."));
break;
case Response::RespRegistrationRequired:
QMessageBox::critical(this, tr("Error"), tr("This server requires user registration."));
break;
default:
QMessageBox::critical(this, tr("Error"), tr("Unknown login error: %1").arg(static_cast<int>(r)));
}