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.
* Add `disallowedwords` setting and perform check
Check if any of the words in `disallowedwords` are contained in the username. If
so, return false like other checks.
NOTE: Needs testing for advanced bugs.
* Remove "administrator" from `disallowedwords`
"administrator" contains "admin" anyway, so it is not needed.
* Add error message if username contains a disallowed word
* Add `disallowedregexp` setting and perform check
Check if each expression in `disallowedregexp` exactly matches the username. If
so, return false.
TODO: Add specific error to dialog in `window_main.cpp`.
* Add error message for username matching RegExp
* Fix indentation
* Compile `disallowedregexp` into a QList upon initialization
Reduces system load with each registration request.
* Clean up `isUsernameValid` function
* Fix indentation
* Add backwards compatibility to client
Client can accept either 7 or 9 rules to maintain compatibility with older
versions of server.
* Add examples and warnings to `servatrice.ini`
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.
Added the functionality client side to log users out of servers if they
are idle for more than 1 hour without joining either a game or room.
Sending a message (room/game/private) or performing a game action.
In some situations, when the server disconnects the client during a login,
multiple dialogs will be shown. This is undesirable behavior, and hence
`loginError` should only be called when the client is actually connected
(`response.response_code() != Response::RespNotConnected`).
Add an autocomplete with known server names to the connect dialog;
Added support for server messages (identification, shutdown, user
warning and promotion)
Connection dialog’s inputs are now wider
Only declare implemented client features
Added check for protocol version on connect before login
Avoid listbox being rendered as dropdown on mobiles