Commit graph

107 commits

Author SHA1 Message Date
ZeldaZach
b02adccf87 Support Qt6, Min Qt5.8, Fix Win32, Fix Servatrice
Add lock around deleting arrows for commanding cards

Add support for Qt6 w/ Backwards Qt5

Handle Qt5/6 cross compilation better

Last cleanups

caps matter

Fix serv

Prevent crash on 6.3.0 Linux & bump to 5.8 min

Prevent out of bounds indexing

Delete shutdown timer if it exists

Fixup ticket comments, remove unneeded guards

Try to add support for missing OSes

Update .ci/release_template.md

Update PR based on comments

Update XML name after done and remove Hirsute

Address local game crash

Address comments from PR (again)
Tests don't work on mac, will see if a problem on other OSes

make soundengine more consistent across qt versions

disable tests on distros that are covered by others

Fix Oracle Crash due to bad memory access

Update Oracle to use new Qt6 way of adding translations

Add support for Qt5/Qt6 compiling of Cockatrice

Remove unneeded calls to QtMath/cmath/math.h

Update how we handle bitwise comparisons for enums with Tray Icon

Change header guards to not duplicate function

Leave comment & Fix Path for GHA Qt

Update common/server.h

Update cockatrice/src/window_main.cpp

Rollback change on cmake module path for NSIS

check docker image requirements

add size limit to ccache

put variables in quotes

properly set build type on mac

avoid names used in cmake

fix up cmake module path

cmake 3.10 does not recognize prepend

Support Tests in FindQtRuntime

set ccache size on non debug builds as well

immediately return when removing non existing client

handle incTxBytes with a signal instead

don't set common link libraries in cockatrice/CMakeLists.txt

add comments

set macos qt version to 6

Try upgrading XCode versions to latest they can be supported on

Ensure Qt gets linked

add tmate so i can see what's going on

Qt6 points two directories further down than Qt5 with regard to the top lib path, so we need to account for this

Establish Plugins directory for Qt6

Establish TLS plugins for Qt6 services

Minor change for release channel network manager

Let windows build in parallel cores

Wrong symbols

Qt6 patch up for signal

add missing qt6 package on deb builds

boolean expressions are hard

negative indexes should go to the end

Intentionally fail cache

move size checks to individual zone types

Hardcode libs needed for building on Windows, as the regex was annoying

Update wording

use the --parallel option in all builds

clean up the .ci scripts some more

tweak fedora build

add os parameter to compile.sh

I don't really like this but it seems the easiest way
I'd prefer if these types of quirks would live in the main configuration
file, the yml

fixup yml

readd appended cache key to vcpkg step

fix windows 32 quirk

the json hash is already added to the key as well

remove os parameter and clean up ci files

set name_build.sh to output relative paths

set backwards compatible version of xcode and qt on mac

set QTDIR for mac builds on qt5

has no effect for qt6

export BUILD_DIR to name_build.sh

merge mac build steps

merge homebrew steps, set package suffix

link qt5

remove brew link

set qtdir to qt5 only

compile.sh vars need to be empty not 0

fix sets manager search bar on qt 5.12/15

fix oracle subprocess errors being ignored on qt 5

clean up translation loading

move en@source translation file so it will not get included in packages
NOTE: this needs to be done at transifex as well!

Use generator platform over osname

Short circuit if not Win defined
2022-05-06 17:31:08 -04:00
ebbit1q
7108eb42c8
implement custom protobuf debug string creation (#4532)
* implement custom protobuf debug log string creation

* add version guards

* add missing header

* debian10 repository misses headers

* clean up logging messages a bit

* fix some more formatting on debug messages
2022-02-23 23:46:23 +01:00
ebbit1q
45d86e7ab7
allow login using hashed passwords (#4464)
* Support getting a user's password salt via initial websocket connection (added to Event_ServerIdentification)

* Nonsense stuff to figure out later

* move passwordhasher to correct location

* protobuf changes

* add ext to protobuf

* implement request password salt server side

* add supportspasswordhash to server identification

* check backwards compatibility

* reset some changes to master

* implement get password salt client side

* implement checking hashed passwords on server login

* check for registration requirement on getting password salt

* properly check password salt response and show errors

* remove unused property

* add password salt to list of response types

Co-authored-by: ZeldaZach <zahalpern+github@gmail.com>
2021-11-09 20:00:41 -05:00
ebbit1q
1e995cd97c
add option to delete a user's messages (#4362)
* add option to delete a user's messages

add optional parameter remove_messages to the ban and warn commands
add event for clients to redact messages
implement server side command and message handling
implement server history removal
todo: client side implementation

add option to remove messages to moderator action dialogs

add storage of message beginnings to chatview

add redactMessage command
handle Event_RemoveMessages on rooms

this approach is favored over parsing the chatroom after the fact but
will use additional memory to store the block indexes

this also leaves a problem in that user messages from the chat backlog
are not removed in the same way because they don't have a user
associated with them

add workaround for old qt versions

add action for users to remove messages from users in chats

add chat history to userMessagePositions with regex

proper const usage for userName

allow removing the messages of unregistered users

add menus to usernames in chat history

this allows you to remove user messages on chat history as well
this also allows moderators to take actions on users in chat history

Apply suggestions from code review

* readd missing call to handler
2021-09-14 16:05:20 -04:00
ebbit1q
e034de9083
don't log in users while giving them an error for missing the clientid (#4335) 2021-05-08 18:12:05 -04:00
ebbit1q
18a07274d4
clangify everything with the new header sorting (#3908) 2020-03-18 17:36:02 -04:00
Zach H
2520d07ef2
log moderation stats in the uptime table (#3215) 2018-05-02 17:31:54 -04:00
ctrlaltca
e127cb74b6 Fixed most issues from codacy (#3050) 2018-01-27 13:31:44 -05:00
ctrlaltca
b29bd9e070
Clang-format (#3028)
* 1/3 Add .clang-format file and travis compilation check

* 2/3 Run clang-format

* 3/3 Fix compilation problems due to include reordering

* 3bis/3 AfterControlStatement: false
2018-01-27 10:41:32 +01: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
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
Fabio Bas
d61d9c98a0 Avoid locking on local server shutdown 2016-07-20 16:53:57 +02:00
Fabio Bas
5b21dc8cde Implementation of websockets in servatrice and test js client 2016-06-26 19:38:53 +02:00
Fabio Bas
b462f95343 Warning/ban notifications: null check userInfo pointer before dereferencing it 2016-02-24 23:47:35 +01:00
woogerboy21
acbe2b0b3c Re-Implemented the moderator notification upon user warning/ban 2015-09-28 18:21:39 -04:00
woogerboy21
7d7151135e Removed mod notification code that causes crashes 2015-09-26 23:19:49 -04:00
woogerboy21
6ad2a59367 Added official warning messages moderators can use to inform users 2015-09-22 22:27:46 -04:00
woogerboy21
b0693299c7 Added server private message functionality to allow server based PM notifications.
Ban based notification to other online moderators is the first form implemented by this PR.
2015-09-17 22:40:29 -04:00
woogerboy21
90cb890cc2 Added the ability or moderation staff to request user ban history 2015-09-10 16:02:45 -04:00
woogerboy21
d7d50def51 Added user analytics table to database 2015-09-08 14:56:10 -04:00
woogerboy21
044c2356ff Added server/client feature set communication 2015-09-02 17:54:06 -04:00
woogerboy21
de073a51d6 Log inconsistent session / session table situation 2015-08-31 08:29:26 -04:00
woogerboy21
66dce1bf46 Fix bug that crashes server when old session is logged out during login 2015-08-30 23:33:11 -04:00
woogerboy21
b0630b81ca Log old session out of server if logging in from a second location 2015-08-22 13:41:02 -04:00
woogerboy21
bb0b626cee Add last_login column to user table and populate upon login 2015-08-15 03:00:34 -04:00
woogerboy21
b102a05a36 Add ability to ban by client id 2015-08-14 00:06:37 -04:00
woogerboy21
eb5833609a Add clientid field to sessions table. 2015-08-11 12:45:04 -04:00
woogerboy21
17392f1ae5 Moved the RegOnlyRequirement functions out of the Database interface into the proper Server block of code. 2015-08-08 16:24:37 -04:00
woogerboy21
bc99024e4f Added server side setting to allow the requirement of a client id from clients. 2015-08-08 08:52:19 -04:00
woogerboy21
94942e1a92 Commit to resolve requests made by @Daenyth discussed after the commit.
See https://github.com/Cockatrice/Cockatrice/pull/1340 for details.
2015-08-08 08:52:19 -04:00
woogerboy21
52db13a1ca Initial release of client ID generation. 2015-08-05 10:15:49 -04:00
Fabio Bas
471f6371b5 More work
* Refactored code out of common/ into servatrice/
 * added smtp client library
 * disable registration when connected
 * validate email address
 * send activation token via email
2015-05-24 23:02:51 +02:00
Fabio Bas
ff1aed717e Added token generation, user activation command and response. 2015-05-24 00:37:45 +02:00
Fabio Bas
16d9534757 fix for -Werror=unused-parameter 2015-05-23 21:09:29 +02:00
Fabio Bas
5ace0dd892 Almost completed registration
* added missing bits of serverside code;
 * added fronted in client;
 * removed demo python scripts;
2015-05-23 20:13:03 +02:00
Gavin Bises
735fcbf311 Add first draft of protocol extension for registration
Stub for registration command handling in server

First draft of handling registration requests

WIP (will be rebased)

clean up bad imports (rebase this later)

Finish checkUserIsBanned method

Add username validity check

Check servatrice registration settings

WIP

Finish(?) server side of registration

Needs testing

Fix switch case compile failure

I have no idea why I have to do this

WIP for registration testing python script

Stub register script initial attempt

Rearrange register script

First try at sending reg

register.py sends commands correctly now

Add more debug to register.py

Pack bytes the right way - servatrice can parse py script sends now

register.py should be working now

Parse xml hack correctly

Log registration enabled settings on server start

Insert gender correctly on register

Show tcpserver error message on failed gameserver listen

Fail startup if db configured and can't be opened.

TIL qt5 comes without mysql by default in homebrew...
2015-05-22 18:55:51 +02:00
Fabio Bas
cd69bc8f9d Add configuration options to enable database logging 2015-01-01 15:48:53 +01:00
Fabio Bas
c875054fb5 Log messages from rooms, games and chats 2014-12-13 18:43:59 +01:00
Fabio Bas
15555c16fd Fix servatrice's regonly mode 2014-10-06 22:56:09 +02:00
woogerboy21
6b8ca1e8a2 Cleaned up potential memory leak 2014-08-10 15:48:15 -04:00
woogerboy21
021f0911c4 Merge remote-tracking branch 'upstream/master' into registered-user-only-server
Conflicts:
	common/server.cpp
	common/server_protocolhandler.cpp
	servatrice/src/servatrice.cpp
2014-07-18 23:46:56 -04:00
arxanas
4e8ba699d2 Tabs to spaces. 2014-07-08 22:53:02 -04:00
woogerboy21
0a1fe7f5a8 Requested Cleanup
Corrected tab to 4 space (per request)
Moved regonly option under authentication ini location (per request)
2014-07-02 22:27:05 -04:00
woogerboy21
d246fa39fe Registered Only Server
Implemented the ability to set the server to only allow registered
users.  Also updated client to reflect the log-in rejection as well as
put a check in place for the server to not start if db connection is not
available yet registration is required.
2014-07-02 20:52:22 -04:00
Daenyth
347d30a84b Merge branch 'master' of git://github.com/mbruker/Cockatrice 2013-02-27 12:36:14 -05:00
Max-Wilhelm Bruker
7a30b827c8 changed Server_Room::gamesMutex to QReadWriteLock 2013-02-11 15:43:31 +01:00
Max-Wilhelm Bruker
c65f327e71 server crash fixes 2013-01-27 15:15:27 +01:00
Max-Wilhelm Bruker
d5ccda49a1 server code cleanup 2013-01-23 11:51:59 +01:00
Max-Wilhelm Bruker
2789116d03 fixed cmdDeckSelect (2) 2013-01-12 16:33:29 +01:00
Max-Wilhelm Bruker
43d7cf6a1a removed recursive lock in server; moved object serialisation to worker thread 2012-10-14 13:19:03 +02:00