Commit Graph

556 Commits

Author SHA1 Message Date
Andy Janata 4cd2af9b23
Merge pull request #182 from tyzoid/master
Allow admins to join passworded games
2018-08-02 08:46:45 -07:00
Tyler Dence 332da9b77e
Allow admins to join any game 2018-07-31 22:27:24 -04: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
Gianlu 5d05f2e85b Fix for #174 (#176)
* Fix for #174 (https://github.com/ajanata/PretendYoureXyzzy/issues/174)

* Avoid NPE

* Sorted AZ
2018-07-01 18:24:49 -05:00
Andy Janata 9e8aa1eb7b Check user address against X-Forwarded-For 2018-06-13 11:46:59 -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 67c0e0e954 changelog updates 2018-06-01 09:46:09 -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 2906ffaa33
Merge pull request #169 from devgianlu/master
Send global chat enabled with FirstLoad
2018-05-18 18:46:22 -05:00
Gianlu c71e01b573 Send global chat enabled with FirstLoad 2018-05-13 18:14:46 +02:00
Andy Janata f88ed593c2 Update changelog 2018-04-05 08:59:50 -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 88ab1ac640 Merge branch 'master' of github.com:ajanata/PretendYoureXyzzy 2018-04-01 19:46:45 -07:00
Andy Janata 1c07624a5c Add repeated words filtering to chat filter. 2018-04-01 19:46:26 -07:00
Andy Janata 9bbdd38f36
Create LICENSE 2018-03-31 13:04:46 -07:00
Andy Janata 43f9b70d54 Fix Go data type for WHITE_CARDS and WINNING_CARD cuz I just guessed when I made them in the first place. 2018-03-30 16:28:01 -07:00
Andy Janata 6d289ef925 Fix a typo in a variable name 2018-03-30 16:27:29 -07:00
Andy Janata 21e8f7a571 AjaxResponse PLAYER_INFO is also an array, oops. 2018-03-29 18:54:37 -07:00
Andy Janata 3cb0e554fb GameId needs to be an *int in AjaxResponse for Go, just like LongPollResponse. 2018-03-29 14:44:50 -07:00
Andy Janata dcb9553837 Fix /whois not showing spectators as spectating 2018-03-29 14:44:27 -07:00
Andy Janata a505598c0d Tell admins about filtered chat content.
Including chat in games that the admin isn't in.
2018-03-27 17:59:31 -07:00
Andy Janata 612bd09978 Always send admins connect and quit events 2018-03-27 17:58:55 -07:00
Andy Janata 4afab98c76 Include ? as a basic character, and count spaces as them too. 2018-03-27 11:14:16 -07:00
Andy Janata 8211726118 Refer to verification code in the ui for the mangled version 2018-03-27 11:13:51 -07:00
Andy Janata 28e040aaec Send sigil/id code/persistent id when reconnecting.
First load handler needs to send those things so the client actually has it. Doesn't really need the persistent id there, but it definitely needs the sigil to avoid undefined errors.
2018-03-27 11:05:01 -07:00
Andy Janata 988f63887b Include some creation times in responses.
Server startup time is included in first load response, and game creation time is included in game info. IRC bridge uses these, and perhaps a way to see them in the web client will be added too.
2018-03-26 16:57:40 -07:00
Andy Janata 0678272f29 Fix IPv6 loopback address for admin, and comment. 2018-03-26 13:59:04 -07:00
Andy Janata fa996ab1c8 Update change log. 2018-03-26 12:00:27 -07:00
Andy Janata ace019d7d9 Clarify that shadowbanned strings should be provided in lower-case.
And also make that check essentially be case-insentive as well as case-sensitive (check them both).
2018-03-26 09:58:00 -07:00
Andy Janata 6e6bf612dc Add logging to (FirstLoad|Register)Handler.
Trying to figure out why some people can still get in while banned. I cannot reproduce this, and it does not make sense that it is possible as the admin page lists their current IP address in the ban list... and those are all trimmed, so it can't be spaces. Weird.
2018-03-26 09:56:58 -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 4f9edbb97a Bump the version since I'm adding so much stuff. 2018-03-23 17:16:11 -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 0cf261f6e4 Fix an NPE when logging out while in a game.
The fix for #124 apparently introduced another bug wherein logging out while playing in a game caused an NPE while ensuring that the user was also not spectating the game. Hold onto that value a little bit longer to make sure we can call that method as well, even though it shouldn't need to be called at that point (but an NPE is worse).
2018-03-23 14:41:31 -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 ac48ea044c Delete some old stuff that was never fully implemented or needed. 2018-03-22 16:23:41 -07:00
Andy Janata 270b590ec7 Always return serial as a number, never a string. Errors were returning string for some reason. 2018-03-19 21:18:46 -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 f7386c8a09 Uncomment and fix annotation spelling 2018-03-15 21:31:18 -07:00
Andy Janata 89e164e1e4 Fixes for Go code generation.
Timestamps have to be int64 (duh), and have to include json:"" around the field name for it to actually work (the documentation is terrible on this).
2018-03-13 16:48:54 -07:00
Andy Janata 72fd7f827a More extensive Go code generation for constants.
Add annotations to Constants to specify that a Go struct should be created, and what data type the fields should use (if not string). Rough pass at assigning these annotations correctly. It almost certainly will need further tweaking after trying to use the results in the Go code extensively.
2018-03-13 15:47:02 -07:00
Andy Janata 6a6172742b just type everything as strings for go 2018-03-12 21:44:35 -07:00
Andy Janata b5c9bffeb1 port UpdateJsConstants to make Go constants 2018-03-12 16:11:28 -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 204c6be94d Fix stop spectating a game when user disconnects.
Previously, when users disconnected (either manually or automatically via ping timeout or whatever), they were only being removed from their game if they were a player, not a spectator. This is not consolidated inside the Game class for whatever reason, so add this call to the path that runs when a user is logging out. I've verified other code paths that remove players and all of the ones that need to remove a spectator already do so.

Fixes #124.
2018-03-06 19:01:42 -08:00
Andy Janata 24881d1d55 Allow white cards with images, and minor cleanup.
Refactor out the formatting code from CardcastService to its own class.
Add [img][/img] support for white cards to have images on cards.
Force line wrapping for cards with words that do no fit onto a card.
2018-03-06 16:21:59 -08:00