Commit graph

3512 commits

Author SHA1 Message Date
woogerboy21
21a34eaaa1 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.
2016-10-31 10:30:12 +01:00
Zach H
3498b16e01 update wordings (#2246) 2016-10-30 03:54:43 -04:00
ctrlaltca
a1840ea9d3 translations galore (#2245) 2016-10-29 11:31:35 +02:00
woogerboy21
63a4f147f4 Add client UI setting for idleclientdisconnect (#2244)
* Add client UI setting for idleclientdisconnect

Added disabled option in client UI for client disconnect.

* Updated settings text

Updated settings text for clarity.

* Updated descripton text (again)

Per request for clarity
2016-10-29 04:24:18 -04:00
Gavin Bisesi
dfc4d9937b Merge pull request #2243 from Cockatrice/remote-client-timer-from-featureset
Remove client idle timer flag from feature set
2016-10-28 18:08:07 -04:00
Gavin Bisesi
e67dfe05db Remove client idle timer flag from feature set
There's no protocol item at hand here so this isn't a protocol 'feature'
2016-10-28 18:04:29 -04:00
woogerboy21
f17a0da434 Added user privilege level (#2228)
* Update log path example when running under windows

Added example of log path syntax when running servatrice under windows.

* Missed example bra cket

* Added user privilege level

Added a enum column in the users table named "privilevel" with the
current values of "none", "vip", and "donator".  Also allowed anyone
with a higher privilege level than "none" to log in even if the server
is set to limit the user total and the user limit is reached.  This
change add's the new user information into the users container that gets
populated and passed between client and server.

* Added user privilege level

Added a enum column in the users table named "privilevel" with the
current values of "none", "vip", and "donator".  Also allowed anyone
with a higher privilege level than "none" to log in even if the server
is set to limit the user total and the user limit is reached.  This
change add's the new user information into the users container that gets
populated and passed between client and server.

* don't use corrected name when downloading card (#2164)

* Fix dynamic user limit settings

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.

* Call class functions for consistency

Updated code to call functions for consistency.

* don't use corrected name when downloading card (#2164)

* Added user privilege level

Added a enum column in the users table named "privilevel" with the
current values of "none", "vip", and "donator".  Also allowed anyone
with a higher privilege level than "none" to log in even if the server
is set to limit the user total and the user limit is reached.  This
change add's the new user information into the users container that gets
populated and passed between client and server.

* Corrected Typo

Corrected typo in DB Migration Script

* Git fuckup?

* Added word column

Added the word column to migration script for backwards compatibility
2016-10-26 02:07:42 -04:00
woogerboy21
1197c10a70 Merge pull request #2236 from woogerboy21/fix_dynamic_user_limit
Fix dynamic user limit settings
2016-10-25 18:04:56 -04:00
woogerboy21
b060f4ea6b Call class functions for consistency
Updated code to call functions for consistency.
2016-10-24 08:05:33 -04:00
woogerboy21
749bc5d6f5 Fix dynamic user limit settings
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.
2016-10-24 00:30:58 -04:00
ctrlaltca
b808d3824b don't use corrected name when downloading card (#2164) 2016-10-22 19:07:58 -04:00
woogerboy21
2dd7158802 Merge pull request #2227 from Cockatrice/servatricelogpathsyntaxexample
Update log path example when running under windows
2016-10-19 23:34:27 -04:00
woogerboy21
32d2fa13f6 Missed example bra cket 2016-10-19 19:26:06 -04:00
woogerboy21
05f90a74a4 Update log path example when running under windows
Added example of log path syntax when running servatrice under windows.
2016-10-19 19:24:44 -04:00
ctrlaltca
989c91f1d1 [ci skip] Don't send connection form when enter is pressed on the host autocompleter (#2225) 2016-10-18 14:47:54 +02:00
ctrlaltca
c3ef53d6fd Removed unused class (#2222) 2016-10-18 14:34:11 +02:00
woogerboy21
632a2db18e Merge pull request #2220 from woogerboy21/CleanupMaxUserCheck
Cleanup max user check at login
2016-10-17 09:38:30 -04:00
ctrlaltca
40468a79ea Merge branch 'master' into CleanupMaxUserCheck 2016-10-17 12:27:20 +02:00
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
woogerboy21
10b677acdf Cleanup max user check at login
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.
2016-10-16 12:48:39 -04:00
ctrlaltca
f20e2ce2bd Merge pull request #2185 from tritoch/pending-mtgjson-Ae
Pending mtgjson/gatherer Æ-->Ae conversion
2016-10-14 14:07:19 +02:00
tritoch
696b11475e Merge pull request #2 from Cockatrice/master
Bring current
2016-10-13 16:05:40 -05:00
woogerboy21
a4b1a79cd4 Merge pull request #2195 from wincinderith/login-error-fix
Prevent login error handler being incorrectly called
2016-10-11 11:33:48 -04:00
Kevin Boxhoorn
1cbf67ab57 Merge branch 'master' of https://github.com/Cockatrice/Cockatrice into login-error-fix 2016-10-10 20:52:58 +11:00
woogerboy21
89ceb889e0 Merge pull request #2209 from woogerboy21/inactivetimeout
Idle Client Timeout Functionality
2016-10-09 14:40:53 -04:00
woogerboy21
7af2f3f057 Idle Client Timeout Functionality
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.
2016-10-09 13:55:07 -04:00
Kevin Boxhoorn
000f6ea2c0 Merge branch 'master' into login-error-fix 2016-10-06 20:39:46 +11:00
ctrlaltca
e4127fead3 Merge pull request #2199 from wincinderith/load-remote-fix
Disable "Load remote deck..." button in local game
2016-10-05 14:25:50 +02:00
ctrlaltca
d8f7c57eff Fixed travis build on osx 2016-10-05 14:24:50 +02:00
Kevin Boxhoorn
2376a7dbc0 Make isLocalGame const 2016-10-05 09:43:22 +11:00
Kevin Boxhoorn
c1aebc1af5 Fix member variable initialization order 2016-10-03 13:16:16 +11:00
Kevin Boxhoorn
3680f40981 Disable "Load remote deck..." button in local game 2016-10-03 12:36:18 +11:00
Kevin Boxhoorn
2a7fc827f4 Add getIsLocalGame to TabGame 2016-10-03 12:33:40 +11:00
Kevin Boxhoorn
6825486776 Prevent login error handler being incorrectly called (#2176)
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`).
2016-09-29 12:21:06 +10:00
tooomm
a7a0ea23ca removed tr() for URLs (#2190) 2016-09-25 19:28:34 -04:00
tritoch
85063859e0 Pending mtgjson/gatherer Æ-->Ae conversion
This is to prepare for when mtgjson converts all Æ cards to 'Ae'.  Formerly it was 'AE'.
2016-09-23 09:23:47 -05:00
tritoch
b23a53eb1e No "Ae" --> "AE" translate (#2182) 2016-09-23 00:03:38 -04:00
Zach H
6c7ba06930 add pow/toughness filters (#2169) 2016-09-20 18:17:53 -04:00
ctrlaltca
65c98c8422 Merge pull request #2179 from ctrlaltca/fix_gtest
fix google tests
2016-09-20 22:39:35 +02:00
ctrlaltca
c4bb16e74b Merge pull request #2175 from Cockatrice/add_new_pub_server
add mtg.tetrarch.co server
2016-09-20 22:28:54 +02:00
ctrlaltca
54cc0c2af6 Merge pull request #2178 from ctrlaltca/translations
Updated translations
2016-09-20 22:27:17 +02:00
Fabio Bas
0e8206a36f Updates translations 2016-09-20 22:23:36 +02:00
Fabio Bas
018a4736c6 fix google tests 2016-09-20 21:50:32 +02:00
tooomm
8b1aaea79d add mtg.tetrarch.co server
added `mtg.tetrarch.co` server hosted by @skwerlman to the in-client default list
2016-09-20 21:18:58 +02:00
ctrlaltca
7f28a7e844 Fix #601; Fix #725 (#2126)
Analyze deck on tappedout
Fix small bug in deckstats interface
2016-09-02 01:34:56 -04:00
ctrlaltca
680277ad6a fix #2129 (#2132)
Remove selection move at all
2016-08-31 14:13:30 -04:00
Gavin Bisesi
bf4fba6bc5 Readme: Reference "easy" changes issue tickets (#2157) 2016-08-31 14:13:13 -04:00
ctrlaltca
8571815cbd Merge pull request #2134 from ctrlaltca/fix_1992
Renamed !setnumber! to !collectornumber!
2016-08-27 10:02:58 +02:00
Fabio Bas
ae456a5bc3 Renamed !setnumber! to !collectornumber! 2016-08-20 10:27:23 +02:00
ctrlaltca
da2eb97c7b Merge pull request #2125 from ctrlaltca/fix_1762
Fix clipboard behavior in deck editor and game
2016-08-10 09:23:33 +02:00