servatrice/cockatrice
Kevin Boxhoorn 0b7f4c134c Disallow usernames that contain certain words and RegExp (#2200)
* 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`
2016-10-17 12:24:42 +02:00
..
resources Themes: remove all hardcoded extensions 2015-09-13 00:14:36 +02:00
sounds updated to new folder locations 2016-02-24 15:41:04 +01:00
src Disallow usernames that contain certain words and RegExp (#2200) 2016-10-17 12:24:42 +02:00
themes updated to new folder locations 2016-02-24 15:41:04 +01:00
translations Updates translations 2016-09-20 22:23:36 +02:00
.qdevelop icon_draw and icon_untap added, icon_general and icon_messages modified 2009-07-31 13:37:16 +02:00
CMakeLists.txt Fix #601; Fix #725 (#2126) 2016-09-02 01:34:56 -04:00
cockatrice.desktop Updated Spanish translation 2011-07-16 11:38:57 +02:00
cockatrice.qrc Themes: remove all hardcoded extensions 2015-09-13 00:14:36 +02:00
cockatrice.rc Included uninstaller for Windows version 2010-09-17 15:26:07 +02:00