Fix#2285
This change adds an internal counter for each tcp/web socket connection
that the server makes and queries the stored memory count at login
rather than the previous way that quired the database during each login.
Each login that quired the DB put a significant load on the server as
the user base grew.
* Add enable/disable log query functionality
This change adds the ability for server owners to allow log querying
from inside the client. In the event the functionality is not allowed a
result is returned indicating the functionality is disabled.
* Added translation
Added the ability for the disabled messages to be translated.
* Server side idle timeout
Initial commit for server side idle timeout counter. This adds a new
int value that is updated when room/game/mod/admin commands occur and is
checked during the regular ping timout function that if the users new
"idle" value exceeds the idleclienttimeout value defined in the servers
configuration file the user is logged out. The user will receive a
warning at the 90% time frame mark about being idle.
* Use round instead of ceil
Travis fix for older xcode issue's.
* Fixed requested items
Mis-spelleed function, added header, added warning message sent check
value. Also corrected the protobuf declaration file for
event_notifyuser
* Moved bool to protected
* Re-Ordered Declarations
* Removed most stylistic items
Resolved most noted things.
* Remove client side idle timeout
Removed client side idle timeout functionality
* 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.
PR #2220 removed the ability to be able to change the max user limit
count while the server is running requiring a restart to make the
settings change. This PR reverts the behavior back to how it operated
prior to the PR.
This change accomplishes two goals. The first is it moves the checking
for if the servers set user limit is reached out of the socket interface
and into the protocol handler portion of the code (were it should live).
It also eleminates the need for a DB query at login to check the user
count. The user account is actually already maintained by the server
and a function already existed to get the user count total.
When in none auth mode, registered users don't exist; hence the setting
makes the game impossible to join.
Normally the setting would be greyed out when the user is unregistered,
but commit 475c54bf introduced a new edge case where the stored setting
would apply to the field even if the user is unregistered, making the
setting possible to apply in no-reg mode. Regardless, any client could
have done this, not just the default cockatrice.
The server side fix should prevent all issues in the future.
Changed the default value for the client keep alive variable back to 1 (since that is what the setting is if the value is not found in the configuration ini file).
Stub for registration command handling in server
First draft of handling registration requests
WIP (will be rebased)
clean up bad imports (rebase this later)
Finish checkUserIsBanned method
Add username validity check
Check servatrice registration settings
WIP
Finish(?) server side of registration
Needs testing
Fix switch case compile failure
I have no idea why I have to do this
WIP for registration testing python script
Stub register script initial attempt
Rearrange register script
First try at sending reg
register.py sends commands correctly now
Add more debug to register.py
Pack bytes the right way - servatrice can parse py script sends now
register.py should be working now
Parse xml hack correctly
Log registration enabled settings on server start
Insert gender correctly on register
Show tcpserver error message on failed gameserver listen
Fail startup if db configured and can't be opened.
TIL qt5 comes without mysql by default in homebrew...
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.