* rework pt setting
save pt as a string serverside
set the pt of cards that enter the battlefield to empty (was -1/0)
implement old behaviour as changePT clientside
display old pt to messagelog
add new keybind for new set behaviour (default ctrl+shift+p)
add flow pt actions and keybinds that increase while decreasing
put more braces everywhere
various refactors like adding consts and for loops
remove a single superfluous semicolon
does not change the way pt is displayed client side
does not fix 3455 fully
* fix drawing of pt
remove search for / in carditem's paint() (crash)
ptstring is now always orange unless it's a faceup card with a pt that
matches the cardinfo pt
set changept to remove the pt if the field is empty
set changept to keep the old value if one side is empty
return in changept for +0/+0
clean up some if statements
* return on change to +0/+0
* change log message for empty original pts
* typo
* remove changept
add parsept to unify reading pt strings
change setpt behavior to be an "upgraded" version of the old setpt
add arbitrary strings as anything that starts with /
* clangify
* remove debug lines
* add tip of the day
* add missing images
* clangify
* - Allow shuffling a subset of a zone
- When moving cards to the bottom of library, shuffle them after
- Process events in the correct order serverside
* Zach fixes
Signed-off-by: Zach Halpern <ZaHalpern+github@gmail.com>
* Comments + additional guard
* Add peglib
* - Add expression engine
- Take an expression when setting a counter
* Shift + Click = Middleclick for counters
* minor cleanup for clangify
Signed-off-by: Zach Halpern <ZaHalpern+github@gmail.com>
* Added tip entry
* set common protobuf files to compile with other tags in debug
force the same flags as release on debug builds
fixes#3431
* check for version first
* use Protobuf_VERSION instead of calling protoc --version
* lower verion requirement
* set tags to disable certain warnings instead of removing all
* improve loading from plain text
Fixes the loadFromStream_Plain function that is used to load plain text
decklists.
The rewritten function uses more regexes and is a bit cleaner.
This fixes multiple bugs with loading the various sources of decklists.
Note that the new function still has a few issues that are shared with
the original version like creating duplicate cards.
* clang format comments
apparently clang-format even complains about the spacing in your
comments
* refactor loading_from_clipboard tests
Remove all heap allocation and use references.
Use std::pair and std::string so gtest will show the cardnames in error messages.
(note that using QPair or QString does not work with gtest)
Improve the last two testcases to include weird names; and name and
comments testing.
Remove empty header file.
* fix compatibility with more formats
skip "sideboard" line
include everything in mainboard when there are multiple empty lines
add removal of the mwdeck cardversion selector in round braces
add replacal of lowercase ae combination that should never occur
Set cardname to lowercase as apparently our checks are hardcoded to only
accept lowercase.
* remove bugged test
The current load from plain is simply broken, removed checking the
comments for correct contents.
* rework load_from_clipboard tests again
rework the test to have less code duplication
add more tests and more special cases
note that text is still all lowercase
* improve loading from plain text
Fixes the loadFromStream_Plain function that is used to load plain text
decklists.
The rewritten function uses more regexes and is a bit cleaner.
This fixes multiple bugs with loading the various sources of decklists.
Note that the new function still has a few issues that are shared with
the original version like creating duplicate cards.
* clang format comments
apparently clang-format even complains about the spacing in your
comments
* refactor loading_from_clipboard tests
Remove all heap allocation and use references.
Use std::pair and std::string so gtest will show the cardnames in error messages.
(note that using QPair or QString does not work with gtest)
Improve the last two testcases to include weird names; and name and
comments testing.
Remove empty header file.
* fix compatibility with more formats
skip "sideboard" line
include everything in mainboard when there are multiple empty lines
add removal of the mwdeck cardversion selector in round braces
add replacal of lowercase ae combination that should never occur
Set cardname to lowercase as apparently our checks are hardcoded to only
accept lowercase.
* remove bugged test
The current load from plain is simply broken, removed checking the
comments for correct contents.
* rework load_from_clipboard tests again
rework the test to have less code duplication
add more tests and more special cases
note that text is still all lowercase
* remove forcing of lowercase cardnames
Cardnames in DeckList::loadFromStream_Plain will no longer be forced
lowercase if they aren't found in the database.
Empty lines in the comments of plaintext decklists will not be skipped.
The loading_from_clipboard_test gets its functions declared in a
separate header "clipboard_testing.h".
Add more edgecase tests.
Refactor code.
* add old QHash version support
QT 5.5 does not support using initializer lists for QHash.
Implement a preprocessor version check for conditionally using inserts
instead of a const with initializer list.
* add old QHash version support
QT 5.5 does not support using initializer lists for QHash.
Implement a preprocessor version check for conditionally using [] access
instead of a const with initializer list.
* add qHash on QRegularExpression below QT 5.6
Apparently QRegularExpression can't be hashed in lower QT versions,
so we add our own hash function, and everyone lived happily ever after,
and none the wiser.
* add header guards to clipboard_testing.h
* Added failing test to demonstrate issue with dec loading
* Prevents empty lines between comments from being interpreted as the start of the sideboard
Migrate from protobuf.js 5.x to 6.x (remove long.js and bytebuffer.js)
Upgrade jQuery from 1.x to 3.x
Upgrade jQueryUI to 1.12.x
Use minimized version of js libraries
Disable debug messages
Fix default value for Event_RoomSay’s RoomMessageType field
* Added VIP only room
* Added DONATOR room.
* Extended Room to include privilege level.
* Updated room join logic
* Updated server tab permissions column display based on perm+privlevel definitions
* Fixed new client -> old server blank permissions column on server tab
Added the ability for registered user - VIP/DONATOR/PRIVILEGED room.
* Creating of server side audit table for auditing actions such as password resets, account registrations and log queries.
* Add migration script
Add migration script for database
* Update database script
Update database script to reflect new audit table
* Creating of server side audit table for auditing actions such as password resets, account registrations and log queries.
* Add migration script
Add migration script for database
* Update database script
Update database script to reflect new audit table
* Corrected results column possible value(s).
* Fixed migration script.
* Added boolean audit logic
Added enable/disable audit options
Added audit functionality for forgot password
* Added registration auditing
Added registration auditing
* Updated ActivateAccount Function
Created clientid variable and used it in preporation for future
potential protocol expansion.
* Extended activation protocol
Added clientid to activation command protocol
* Typo correction
Fix typo's
* Missed type fix
Found the infamous E!
* Updated database function syntax
Updated if/else syntax in db add audit function
* Untabify content
Untab files changed in PR
* Added registration email blacklist
Added the ability to define email blacklist for user registration. Now
server operators can prevent users from registering accounts that
contain providers they do not wish users to use.
* Update ini option for clarity
Updated servatrice ini option name for clarity.
* Updated description for clarity
Added implicit explination
* Add ability to limit number of account registrations with same email address
This commit adds server side functionality that will allow operators to
limit the number of accounts that can be registered to the server with
the same email address.
* Updated ini wording
Updated configuration file wording for better description.
Fix#2319
This should resolve the issue of users getting the popup immediately when logging in and the time out value is set to 0.
This needs tested, its a quick fix put in with the web editor.
* 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
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.
* 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
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.
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.
* main.cpp: removed path checking and db loading
* card database: merge card loading methods into a single one
* settings cache: take care of returning safe paths for decks,
replays, etc..
* main window: if db loading fails (eg. first run), propose to run
oracle
NSIS: propose to run cockatrice instead of oracle
Rework card database loading
* Move carddatabase-related method out of deckeditor tab
* Load cards in another thread and render them progressively
* Optimize database reload after enabled sets change
Fix deck editor column width
* removed the noCard hack.
* getCard() no more creates cards instead of just returning existing
ones
* Fix the “edit tokens” dialog.
* PictureLoader: avoid trying to download twice the same card
* PictureLoader: correct return of card background
* AbstractCardItem: avoid recalculating card color at every paint
Use a different file to save custom tokens
Misc required improvements
* Use nullptr;
* Refactor CardInfoWidget to use CardInfoPicture and CardInfoText
instead of duplicating code;
* Added CardInfo::getColorChar()
* Fixed some potential crashes
* removed dead code related to CardInfoWidget
* Don't require a restart after adding a new custom sets file
* Bump CMake requirements to 3.1
That marker is only recognized by pb3-compatible compilers, meaning that
tools which are otherwise compatible with our files break on them.
Notably, this includes hprotoc (for haskell).
With this update a new chat history definition is added on a per
room bases which allows operators to specify the number of chat
messages to store and present to the user on join. Please see
the sample ini for room definitions.
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.