mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-01-03 16:47:53 -08:00
Cleanup server running variable information (#2239)
* Created first round of helper functions Started to go through server init function and move statically defined variables that the server uses into helper functions to allow for dynamic changing while the server is up rather than requiring a restart. * Completed Helper Function Creation Completed adding all the helper functions along with updated the virtual server function calls and renamed helper functions to match settings cached ini value names for clarity. * Comment Cleanup Removed lines commented out throughout previous changes as well as cleaned up variable declarations that are no longer needed with helper functions that query the settingsCache * Added featureset dynamic refreshing Added slots/functions/calls for updating the required feature sets dynamically. * Created first round of helper functions Started to go through server init function and move statically defined variables that the server uses into helper functions to allow for dynamic changing while the server is up rather than requiring a restart.
This commit is contained in:
@@ -115,7 +115,7 @@ AuthenticationResult Server::loginUser(Server_ProtocolHandler *session, QString
|
||||
} else if (authState == UnknownUser) {
|
||||
// Change user name so that no two users have the same names,
|
||||
// don't interfere with registered user names though.
|
||||
if (getRegOnlyServer()) {
|
||||
if (getRegOnlyServerEnabled()) {
|
||||
qDebug("Login denied: registration required");
|
||||
databaseInterface->unlockSessionTables();
|
||||
return RegistrationRequired;
|
||||
@@ -155,7 +155,7 @@ AuthenticationResult Server::loginUser(Server_ProtocolHandler *session, QString
|
||||
|
||||
if (clientid.isEmpty()){
|
||||
// client id is empty, either out dated client or client has been modified
|
||||
if (getClientIdRequired())
|
||||
if (getClientIDRequiredEnabled())
|
||||
return ClientIdRequired;
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user