Commit Graph

208 Commits

Author SHA1 Message Date
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 7375dd8a57 Minor fixes for Go API client.
* GameId needs to be an *int not an int so we can tell the difference between lack of value and value 0.
* Add the description strings to DisconnectReason.
* Add Sigil and IdCode to NewPlayer messages.
* Add if join/quit events are being broadcast to JavascriptConfigServlet. It works much better if they are but it should still work if they aren't.
2018-03-15 21:35:00 -07:00
Andy Janata b20562d6da Add a crude scrollbar to user preferences and game list filters.
This is done with even more dumb on-resize handling. Tested lightly in Chrome, Edge, and IE, and it seemed to work well enough.

Helps #93, though I don't want to use the f-word just yet.
2018-03-09 10:14:51 -08:00
Andy Janata f7378e0d42 Show the /whois result in the window it was typed in. 2018-03-06 00:30:04 -08:00
Andy Janata e1578532e3 Add a /whois command.
Cleaned up some synchronization around ConnectedUsers.users while I was in there. The list itself wasn't synchronized, which could have been a slight problem.
2018-03-06 00:15:05 -08: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 dc31b1f2ce Fix not focusing the nickname box on page load. 2018-03-02 14:28:28 -08:00
Andy Janata cdd38465fa HTML cleanup.
* Fix not being able to scroll the index page. Oops. Cleaned up how that was managed.
* Clean up things in changelog and known issues and future features. Some of it has been done for years, oops.
* Make the label for the join button for passworded games word-wrap.
2018-03-02 14:18:46 -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 216ff638bf Sort full games to the end of the game list. Fixes #157. 2018-02-27 16:03:09 -08:00
Andy Janata d143791321 * Fix some cases of not all decks being listed because the javascript code assumed that duplicate weights would never occur.
* Re-enable view cards page.
2018-02-27 14:05:57 -08:00
Andy Janata 17ac4078d0 Disable global chat except for admins. Add release notes. 2017-08-13 12:17:42 -07: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 50d48e8b8d Merge pull request #146 from allquixotic/adjustable-timers
Feature: Adjustable timer multiplier instead of idle timer checkbox.
2016-04-03 21:38:23 -07:00
Sean McNamara 795bf48fde Let game hosts adjust the timer duration as a multiplier of the defaults. 2016-01-02 22:07:39 -05:00
Sean McNamara ec859e37d0 Update jQuery and jQuery UI dependencies to the latest (1.x). 2016-01-02 20:25:32 -05:00
Andy Janata c49787d1df fix card set filters. fixes #114 2015-02-21 20:03:51 -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 ea36f82897 Count the number of cards added to the game and compare to known minimums (statically determined for black cards, and based on player limit for white cards). This allows games to run only on Cardcast decks. Fixes #125.
Update my IP address for admin purposes.
2015-02-16 00:58:01 -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
David R. Bild 1c154efcaf correctly render cardcast codes with leading zeros
The /listcardcast output drops leading zeros from the deck codes, due to the string -> number -> string conversion process.

This commit fixes the displayed output by zero-padding the code to ensure it has the full five digits.

I don't know if this same issue manifests elsewhere.
2014-09-10 17:40:07 -05:00
Andy Janata d948ea3879 Fix my IP address. Display a header before listing Cardcast decks in use (which will still show up when no decks are in use, to make the feature more discoverable). Show Cardcast messages in game chat in blue. 2014-08-12 18:33:43 -07:00
Andy Janata 05239299e3 Initial Cardcast UI, with chat commands. Javascript formatter stuff in the project. 2014-08-10 22:16:15 -07:00
Andy Janata f5060113db Refactor CardSet, BlackCard, and WhiteCard to enable adding Cardcast card set support.
Blank white cards are no longer indicated by an ID of less than -1. There is a new field on WhiteCardData. (They will still have a negative ID, but so will external cards.)
2014-08-10 15:55:42 -07:00
Andy Janata 1f06fb0fac Merge pull request #107 from clutterskull/master
Adds a simple regex based filter to the game list.
2014-05-03 19:40:20 -07:00
John Hutchison 1ebd5cf831 Filtering on keyup, error catching, empty filters
Binds filtering to keyup instead of keydown.
Catches invalid regular expression errors (filter is not set unless
valid).
Fixes empty filter not setting properly.
2014-05-03 18:03:39 -07:00
John Hutchison 92cd5dcd32 Adds a simple regex based filter to the game list.
Adds cah.GameList methods for creating and applying the filter, as well
as a filter text input element next to the create game button. Filtering
is bound to the input keydown.
2014-04-29 20:59:41 -07:00
uecasm 417c97f1b3 Refactor game options into subobject. 2014-04-08 23:20:40 +12:00
Andy Janata 5ad372ee19 Force a higher z-index when mousing over a card in your hand. This should help with the face-down cards other people have played covering your own hand while deciding what to play. 2014-02-16 22:45:22 -08:00
Andy Janata be7768e03b Refactor preferences code out to its own file. Add game list filters, allowing users to ban and require card sets for a game to be in their game list. 2014-01-26 23:22:37 -08:00
Andy Janata e50a19f19d Merge pull request #80 from uecasm/stop-games
Add a button to Stop an in-progress game.
2014-01-25 07:56:28 -08:00
uecasm bb83cef8a3 Add a button to Stop an in-progress game. 2014-01-25 00:33:15 +13:00
uecasm 8bca23ed9d Keep playfield intact when players join/leave. 2014-01-25 00:17:09 +13:00
Andy Janata 77151e327b Let all players adjust the 'hide password' checkbox. 2013-12-07 19:40:29 -08:00
Andy Janata 014495007a Kick non-admins after being idle for an hour. Any user activity resets this timer. This is a roundabout way of addressing #52, but brings more to the table in general and is significantly simpler than making each game have a timer task to manage it.
Increase the ping timeout delay from 45 seconds to 90 seconds, while reducing the timeout on long poll requests on the client side to 30 seconds. (This is still less than the 25 seconds that LongPollServlet will wait.)
2013-12-02 04:00:57 +00:00
Andy Janata 9a571804aa Use max_users config option and deny access to new users if there are too many connected. 2013-12-01 18:18:35 +00:00
Andy Janata ef4c172fca add cookie domain to pyx.properties so all servers can share the same cookie 2013-11-30 22:35:53 -08:00
Andy Janata 3ecb4f59a6 Merge branch 'score-cmd' of https://github.com/uecasm/PretendYoureXyzzy into uecasm-score-cmd 2013-11-30 05:04:09 +00:00
Andy Janata 76959c3b2a refactor emote code to have withEmote in one place. 2013-11-30 04:54:56 +00:00
Andy Janata b679412cb0 Merge branch 'emotes' of https://github.com/uecasm/PretendYoureXyzzy into uecasm-emotes 2013-11-30 04:52:29 +00:00
Andy Janata 93abb3a29d Looks like cah.constants.js wasn't updated for BLANKS_LIMIT. 2013-11-30 04:47:09 +00:00
Andy Janata 4ccd8b4c59 Merge branch 'blanks' of https://github.com/uecasm/PretendYoureXyzzy into uecasm-blanks 2013-11-30 04:26:22 +00:00
Andy Janata 632ce7f4b0 Disable being able to click card while waiting for the server to acknowledge the previous card play. This should fix the client removing the incorrect card from the hand. Also fixes losing a card when it is selected but not confirmed, but you run out of time to play, the card was removed from your hand. This ought to fix #55. 2013-11-30 00:07:40 +00:00
uecasm fba2652fd9 Fix formatting. 2013-11-29 21:12:25 +13:00
uecasm 0dc7a56e79 Merge upstream changes. 2013-11-29 21:03:12 +13:00
Andy Janata 4584f06e25 Merge branch 'uecasm-resync-hand'
Eclipse auto-formatted some other stuff, too.
2013-11-29 03:57:14 +00:00
Andy Janata d334abccdc formatting; change /hand to /sync 2013-11-29 03:52:19 +00:00
Andy Janata 2392883c32 Merge branch 'resync-hand' of https://github.com/uecasm/PretendYoureXyzzy into uecasm-resync-hand 2013-11-29 03:50:34 +00:00