Commit Graph

27 Commits

Author SHA1 Message Date
devgianlu 631fe14d12 Moved min/default/max player limit, spectator limit, score limit and blank card limit to pyx.properties 2019-09-29 14:51:46 +02:00
Andy Janata 8e1c5e805b
Disable inactive card sets by default.
Not sure why this was enabled by default. Kind-of fixes #192.
2018-10-23 19:47:41 -07:00
Andy Janata 57597669fe Add option to disable game chat. 2018-07-28 10:08:16 -07:00
Andy Janata c40c2d194b Add option to disable fill-in-the-blank cards entirely. 2018-07-28 09:50:31 -07:00
Andy Janata d8740258d7 Bugfixes and nick filter.
Add a configurable nickname ban filter, similar to the chat filter except this is defined in the properties file since it doesn't need unicode. Any user that attempts to use a nick that contains anything on this list will be denied.
Fix a bug with /kick and /ban that caused it to only work against users with entirely lower-case nicknames.
Add a check that the user's IP address hasn't changed. This probably isn't as needed now that /kick actually works against everybody.
2018-06-13 11:36:28 -07:00
Andy Janata 1e3351a23b Show more permalinks to users.
When users connect (or reload the page), show a permalink to that session's games as well as a permalink to their entire play history, if they haven't opted out of that tracking. When a game starts, or a player/specator joins a game in progress, show a permalink to that game's rounds.

The "when a game starts" bit required removing the tracking of the 'dealing' state, as there was no other easy way to determine that a game was starting. Nothing actually used that dealing state, so it was harmless to remove. Now, a transition from lobby to playing can be detected as a game start, as opposed to a transition from round over to playing.
2018-05-30 12:22:57 -07:00
Andy Janata 99958c0dcf Display round permalinks after the round is over, if enabled.
This takes advantage of the metrics logging, the metrics processor, and the metrics viewer to provide a permalink to a particular round, instead of requiring players to take a screenshot of the round. This will not be enabled immediately as the viewer is not quite ready for deployment, but this is all that needs done on the game server to support this, so it can just be dynamically enabled when it's ready.
2018-04-04 16:09:17 -07:00
Andy Janata 1c07624a5c Add repeated words filtering to chat filter. 2018-04-01 19:46:26 -07:00
Andy Janata 0678272f29 Fix IPv6 loopback address for admin, and comment. 2018-03-26 13:59:04 -07:00
Andy Janata 783b223d19 Updates for shadowban.
Unicode characters weren't getting loaded correctly for some reason, either literally or via escape sequences. Change to specifying a class name which has a compile-coded list of shadowbanned strings. This prevents changing on the fly, but at least it works for now until a proper database can be implemented.
Update the privacy policy about chat logging due to shadowbans.
2018-03-23 23:18:21 -07:00
Andy Janata 65f74ef816 Add more chat filtering.
CAPS LOCK FILTER if a line is long enough and contains mostly caps.
Shadowban filter blocks messages with configurable substrings present in them. Does not permanently shadowban the user, yet, just drops the message.
Add a test that was missed in a previous commit.
2018-03-23 22:32:16 -07:00
Andy Janata 4bddace596 Add more chat control.
* A certain amount of characters in the message must be latin-ish, if the message is longer than a certain length.
* There must be a certain number of spaces in the message, if the message is longer than a certain length.
* The same message cannot be repeated twice in the same location.
* Switched the separator between parts for the chat control config value from _ to . for the scope.
2018-03-23 17:15:06 -07:00
Andy Janata 88bfa34898 Global and game chats have distinct flood controls.
Split the configuration value into two. Add a tracking object to ChatFilter per user which currently contains the two different last message times. Removed the last message times from the User object. Show chat error messages only in the tab that caused them, not both tabs.
2018-03-23 14:41:08 -07:00
Andy Janata c6f62c1496 Add a ChatFilter class and use it.
Refactored out the flood protection, empty message, and message too long errors out to the new class. This will also easily allow adding other chat protections in the future, in one location. Further refactoring should be possible to not have to hold chat-protection related information in the User object, as well.
2018-03-22 17:12:47 -07:00
Andy Janata 4e2b5e480b Move admin IP addresses to config file. 2018-03-22 16:26:30 -07:00
Andy Janata 7a24c652ac Add ID codes for positive user identification, and minor fixups.
Users can specify an identification code when they connect (8-100 characters), only if they are using HTTPS. This code is combined with their nickname and a server-side secret, hashed with SHA-256, and condensed down to 64 bits by XORing every 8th byte with each other, and finally converted to base64 (with the trailing = removed). This code is displayed in a tooltip when hovering over the user's chat (TODO: mobile way to view it).

Sigils have been added to be displayed before the user's name in the chat. Admins get @, users with an ID code get +, and normal users get nothing. The IS_ADMIN field is now deprecated, as this can be determined from the user's sigil. It will be removed eventually, but is still being included in events even though the official client should not be using it anymore.

Kicks and bans are now always displayed to all users, even if the server isn't transmitting quit events normally.
2018-03-02 17:30:59 -08:00
Andy Janata cb0f2689c6 Let global chat enablement be configured via the properties file. Can be adjusted on the fly, though clients are not notified of the change (which doesn't affect the client's operation anyway). 2018-02-28 11:19:34 -08:00
Andy Janata 942903e60c sasl support for kafka 2017-03-04 15:43:00 -08:00
Andy Janata 5e6791e071 kafka tls 2017-03-04 13:55:41 -08:00
Andy Janata 23ce041bda implement kafka metrics without tls or authentication 2017-02-26 22:27:56 -08:00
Andy Janata e1bc2c4176 document unused build.properties value 2017-02-20 21:46:52 -08:00
Andy Janata 72b4cd9b8b Add persistent IDs to users, stored via cookie (opt-out availabled).
Fix removing cookies.
Add per-server instance unique IDs for games and users, which will not collide between servers or when servers restart.
Add GeoIP capability.
Add beginning of framework for logging card plays.
2017-02-20 21:35:44 -08:00
Andy Janata 7a574d39b8 Use hibernate second-level cache when loading card sets on initial page load. Room for improvement here by using a more production-ready cache provider, but the immediate need is to not crash the database server under crush load. 2015-02-28 11:58:47 -08:00
Andy Janata bdf18c0423 Better handling of properties via Guice. Add property to turn off connect/disconnect notices. 2015-02-21 19:38:23 -08:00
Andy Janata b8e499647e add missing semicolon; pull pyx.properties properties out to build.properties 2015-02-21 18:09:43 -08:00
Andy Janata 07e2ac72c4 sqlite support for local cards 2015-02-15 17:29:45 -08:00
Andy Janata 832bcd8fc4 Maven support.
This is still a bit clunky, but it seems to be working. This supports running both with Jetty directly, and making a .war to throw at Tomcat. You will still need Postgres to run via Jetty; this is super useful for debugging in Eclipse.

mvn clean package war:exploded jetty:run

mvn clean package war:war

You will need to copy build.properties.example to build.properties and fill in the appropriate information.

Also, use correct date format in the cache filter, as Jetty is more strict.
2015-02-14 00:24:38 -08:00