Commit graph

3522 commits

Author SHA1 Message Date
woogerboy21
c78eed576f Fix store replays (#2301)
* Fix Store Replays Functionality

For whatever reason we have a variable in the servers ini to
enable/disable the storing of replays but there is no code that uses
that variable.  At one time there was but in light of it being removed
some were along the line this add's the ability back in for server
owners to disable the storing of game replay data.

* Added code

* Moved store replay check

Moved the check for storing replay information into existing routine.

* Updated Per Request

Combined lines per request
2016-12-07 07:52:39 -05:00
woogerboy21
f86b9e0be7 Remedy connection type query at every login (#2298)
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.
2016-12-07 01:35:35 -05:00
woogerboy21
a6f1f4c01d Add enable/disable log query functionality (#2294)
* 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.
2016-12-06 15:37:36 -05:00
skwerlman
c90c4ea41f Delete aps file (#2296)
* Delete aps file

This is a VS cache file, and was probably committed accidentally.

* add aps to gitignore
2016-12-06 02:52:23 -05:00
woogerboy21
d039c9b6bd Add missing feature rememberance to client (#2275)
Fix #2249
Add the ability for the client to remember the missing features that it
received from the server it last connected to and not display the
"missing/optional feature" message at every login.
2016-11-29 15:50:00 -05:00
woogerboy21
f6e4ee9a4a Fix #2270 (#2271)
Fix #2270
Check userinfo first before trying to use it.
2016-11-09 14:40:18 +01:00
woogerboy21
6962777ded Rework idle timeout, now server side (#2259)
* 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
2016-11-08 22:18:12 -05:00
woogerboy21
1cebe030f6 Fix one to many zero's (#2260)
Looks like I typo'd the default value for the number of seconds in 1
hour for the default client side idle time out.  This fixes it.
2016-11-02 01:26:00 -04:00
Jeff
a2f4fa916e Adds !corrected_name! and !corrected_name_lower! to customURL (#2255) 2016-11-01 00:13:39 -04:00
Zach H
9ebbd0c3ca travis osx 10.10 min (#2252) 2016-10-31 10:45:52 +01:00
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