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:
woogerboy21
2016-10-31 05:30:12 -04:00
committed by ctrlaltca
parent 3498b16e01
commit 21a34eaaa1
9 changed files with 279 additions and 170 deletions

View File

@@ -348,7 +348,7 @@ void Server_ProtocolHandler::pingClockTimeout()
int cmdcountinterval = server->getCommandCountingInterval();
int msgcountinterval = server->getMessageCountingInterval();
int pingclockinterval = server->getPingClockInterval();
int pingclockinterval = server->getClientKeepAlive();
int interval = server->getMessageCountingInterval();
if (interval > 0) {
@@ -443,7 +443,7 @@ Response::ResponseCode Server_ProtocolHandler::cmdLogin(const Command_Login &cmd
// limit the number of non-privileged users that can connect to the server based on configuration settings
if (QString::fromStdString(userInfo->privlevel()).toLower() == "none") {
if (server->getMaxUserLimitEnabled()) {
if (server->getUsersCount() > server->getMaxUserLimit()) {
if (server->getUsersCount() > server->getMaxUserTotal()) {
qDebug() << "Max Users Total Limit Reached, please increase the max_users_total setting.";
return Response::RespServerFull;
}