Commit graph

38 commits

Author SHA1 Message Date
Zach H
ee674cb0cf
Support MacOS 12 & 13. Support Protobuf 23. Deprecate MacOS 11. (#4884) 2023-10-13 14:45:22 -04:00
Zach H
a95b338c80
Add cmake format (#4618)
* Support CMakeify operation

* Run Cmakeify

* Update cmakeify.sh

Co-authored-by: ebbit1q <ebbit1q@gmail.com>
2022-05-08 21:22:43 +02: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
ebe2c494aa
remove the stop dump zone command from the protocol (#4326)
the stop dump zone command was implemented as a courtesy to other
players in order to take into account when they would stop looking at
unknown information

however, this can be abused, a malicious client can send this command
whenever they would like

cockatrice is not a physical tabletop nor does it aim to be, if you can
take a screenshot of your deck and then close the view, you are not
cheating as you have been given this information

in order to prevent anyone from abusing this we should remove the
command from the protocol, this means servers will ignore this message
and clients will get a little invalid command reply in their debug log

the extension id will remain reserved

shuffling your deck will always invalidate any card view looking at
those cards

if players wish to signal that they stopped looking at their deck for
whatever reason they should just use the chat instead, optionally using
one of the chat macros
2021-06-01 21:52:20 -04:00
ebbit1q
257f2eb34c warning message is way too scary (#3805)
People keep complaining they can't compile on ubuntu 16.04 because of this warning message, while it just disables 2 "prettyness" warnings and only in the automatically generated code by protobuf which should never be a problem anyway!
original pr: #3432
2019-09-05 15:43:51 +02:00
ctrlaltca
f54165025e Add a new command to reverse turn order (#3802) 2019-08-27 20:04:27 -04:00
ebbit1q
8028bad7b1 set common protobuf files to compile with other tags in debug (#3432)
* 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
2018-11-09 11:05:11 +01:00
woogerboy21
0cfa6863d5 Simpler forgot password functionality (#2393)
* Simpler forgot password functionality (Server/Client)
2017-02-15 17:41:40 -05:00
Fabio Bas
1e3fb6c6e1 Rework "paths" settings loading and card database loading
* 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
2016-03-15 22:27:55 +01:00
woogerboy21
62ffcde6bd Added logs tab to allow moderators the ability to review log history/details 2015-09-23 00:50:01 -04:00
woogerboy21
6ad2a59367 Added official warning messages moderators can use to inform users 2015-09-22 22:27:46 -04:00
woogerboy21
87a64da1bc Added chat history to a room that is displayed on join.
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.
2015-09-14 17:54:04 -04:00
woogerboy21
90cb890cc2 Added the ability or moderation staff to request user ban history 2015-09-10 16:02:45 -04:00
woogerboy21
39fcabe921 Allows moderators to promote users to mod and demote mod to user 2015-08-20 22:42:10 -04:00
Fabio Bas
ff1aed717e Added token generation, user activation command and response. 2015-05-24 00:37:45 +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
Matt Lowe
878b760321 Removed lprotobuf error on building
Will need @ctrlaltca to confirm this wont mess anything up. I have
removed a option to se set from the cmake file. This option is not
needed.

Windows users, you will need to run cmake to create the sln again.
2015-05-01 22:32:31 +02:00
Fabio Bas
a4fbf8b677 Force linking with pthread under unix
Protobuf depends on pthread under unix, but cmake’s FindProtobuf
doesn’t add -lpthread to link flags
2014-06-13 19:09:33 +02:00
Fabio Bas
721cf6fe4f Re-indent CMakeLists.txt using spaces 2014-06-11 18:08:30 +02:00
Fabio Bas
ed0311d59e Added comments for comment's CMakeLists.txt 2014-06-11 01:26:54 +02:00
Fabio Bas
4fd8c94df0 Overhaul common's CMakeLists.txt
* Use automoc instead of a manual list of headers
* Remove Qt4 detection
* Created missing .cpp for .h files (for automoc detection)
* Remove pthread linking
* Forcing -lprotobuf is not needed for mingw; msvc only?
2014-06-11 01:24:34 +02:00
Max-Wilhelm Bruker
e5a0a08569 fixed #43: add delete button to local dir view in deck storage tab and in remote dir view in replays tab 2012-05-01 12:08:09 +02:00
Max-Wilhelm Bruker
7417236c3a preliminary AlwaysRevealTopCard support related to issue #31, server code cleanup (finally removed getGameState) 2012-03-31 21:47:30 +02:00
Max-Wilhelm Bruker
b2b7242802 changed lock icon, added sideboard locking, issue #15 fixed 2012-03-27 20:32:24 +02:00
Max-Wilhelm Bruker
5963c2239c renamed servernetwork to ISL (inter-server link), join/leave is working 2012-03-10 19:02:15 +01:00
Max-Wilhelm Bruker
c9b66e4239 more ServerNetwork code 2012-03-04 19:23:43 +01:00
Max-Wilhelm Bruker
acb03c2bf2 replays expire after two weeks, lock can be toggled to prevent that 2012-03-04 11:35:56 +01:00
Max-Wilhelm Bruker
a876a0bf5f tell logged in clients about new replays 2012-03-03 18:10:16 +01:00
Max-Wilhelm Bruker
8481e61e8f Replays split up, one for each subgame 2012-03-02 20:45:04 +01:00
Max-Wilhelm Bruker
65d4c77ee8 cmake fix 2012-02-25 23:18:08 +01:00
Max-Wilhelm Bruker
89b8fe1e21 cmake fix 2012-02-25 23:10:56 +01:00
Max-Wilhelm Bruker
c6c6a970c6 interface & client tab for replay transfer 2012-02-25 19:33:44 +01:00
Max-Wilhelm Bruker
703426d848 cmake fix 2012-02-25 15:18:14 +01:00
Max-Wilhelm Bruker
96213fc3f3 Windows fixes 2012-02-25 14:50:06 +01:00
Max-Wilhelm Bruker
d50d179b2f server-side replay support 2012-02-20 22:13:48 +01:00
Max-Wilhelm Bruker
4895f2b4fd server code cleanup, changed in-game ping event to not use any bandwidth as long as nothing changes 2012-01-29 13:36:43 +01:00
Max-Wilhelm Bruker
3c24899de6 switched from qmake to cmake 2012-01-21 19:21:57 +01:00