Commit Graph

57 Commits

Author SHA1 Message Date
Andy Janata 296a692db9 big link to server list page 2020-04-04 09:57:04 -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 dcb9553837 Fix /whois not showing spectators as spectating 2018-03-29 14:44:27 -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 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 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 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 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 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 05239299e3 Initial Cardcast UI, with chat commands. Javascript formatter stuff in the project. 2014-08-10 22:16:15 -07:00
uecasm bb83cef8a3 Add a button to Stop an in-progress game. 2014-01-25 00:33:15 +13: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 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
Andy Janata 72e1a061bc formatting 2013-11-29 03:18:55 +00:00
uecasm 6e32e81bee Merge branch 'upstream' into spectator
NOTE: I have not yet considered how to support spectators with the new hash URLs; it's likely something will go funny with the current implementation.
2013-11-21 23:01:00 +13:00
uecasm 249a308b5b Add "score" command, which can be used by any user to view the current score of any other user (even across games). Also allows admins to modify a user's current score, which can be useful on private servers where admins are playing and can "repair" a score if someone gets disconnected or kicked accidentally. 2013-11-15 23:27:30 +13:00
Andy Janata 7e7be6c54e Fix reloading page when inside a game from trying to rejoin the game twice. Fixes #30, again. 2013-11-11 03:27:23 +00:00
Andy Janata 844ce99cdb Update the URL bar with a deeplink to the current game, and process these deeplinks when the app loads. Fixes #30. 2013-11-11 03:22:54 +00:00
Gavin Lambert 4ac0de4ff6 Add spectator feature 2013-06-11 00:14:32 +12:00
Gavin Lambert 84d191d30c Fix logout error handler
Looks like a missed edit.
2013-06-11 00:09:31 +12:00
Gavin Lambert 07d87c9c91 Add some error handlers for leaving games.
Trying to leave an invalid game always succeeds.  Trying to get game
info about an invalid game (that you think you're still in) makes you
leave it.
2013-06-11 00:09:23 +12:00
Gavin Lambert 467725641f Fix gamelist refresh on leaving game
Game list update was skipped if the game list wasn't visible.  Fix up a
couple of cases when switching back to the game list the update was
called in the wrong order.
2013-06-11 00:09:15 +12:00
Andy Janata 9d47959f13 Make the client re-try the first load request once if it got a no session error, otherwise it won't know anything about card sets which causes the game list to break. This is marginally related to #35.
Had to actually return the client's serial number to them when returning errors. Whoops.
2013-04-13 17:13:11 -07:00
Andy Janata 300e7e09b7 Fix up per-game chats so global chat still works. Fix graphical glitch with game chat tab. Make enter work in game chat box. Clear game chat log when joinging game. 2013-02-24 18:47:05 -08:00
Andy Janata 86703070ec show brief welcome banner on nickbox screen 2012-09-09 22:08:24 -07:00
Andy Janata 7fccd69b15 Kicks and bans.
Admin chat in blue.
Chat commands (/names, /kick, /ban to start).
Close Hibernate session after loading card sets when a user connects -- Oops!
Games have their own Hibernate session for their duration, and this is used instead of a per-request session for loading card sets when changing options.
Fix changing game options without having a card set selected.
2012-08-20 22:41:06 -07:00
Andy Janata 5bba53ef7d client parses CardSet data the server sends it when connecting 2012-07-07 10:48:22 -07:00
Andy Janata a6f1a139be game host can configure maximum players and score goal 2012-03-15 20:06:23 -07:00
Andy Janata ae5bc1d594 fix some problems with using hard-coded strings instead of values from Constants 2012-03-12 21:05:43 -07:00
Andy Janata 88b68c87b6 comment ALL the files! 2012-02-06 14:00:24 -08:00
Andy Janata 4d5fddd293 add 2-clause bsd-style license to source files 2012-02-02 14:47:23 -08:00
Andy Janata a5f82eb08e TODO cleanup 2012-01-30 23:53:00 -08:00
Andy Janata 6cdb68efc2 - "points" -> "Awesome Points"
- move divs around and mess with the styling and js to make vertical resizing, and resizing of the chat in general, work
2012-01-30 00:35:27 -08:00
Andy Janata 0e11e59207 - judge can select card
- game goes to next round
2012-01-27 15:41:57 -08:00
Andy Janata 2e26e938e5 - reload the round white cards when page reloaded
- can't select a hand card after playing a card
2012-01-26 19:25:40 -08:00
Andy Janata 7600ec27de - refactor game handlers a bit to add another abstract class that ensures the user requesting is in the game in question
- add play card handler. need to send the white card count down to users that refresh the page.
- ajax event handlers get the request object as well as the result object so the server doesn't have to send the game id back in a response
2012-01-26 18:07:39 -08:00
Andy Janata 234b82afd2 - display black card in game
- display message indicating what the game is currently waiting for
- reload the black card when reloading page
- change the js constant generator to explain what the dummy things are for in the output
- add support for enums that need two user-visible values (specifically the game player state: the short message for the scoreboard and the long message telling the player what they need to do)
- hide the start game button after the game is started
- refactor game event longpoll handlers to use a helper that gets the game and reports an error if it can't
- game (should) reset to a lobby if it loses players to put it less than 3
2012-01-24 16:20:43 -08:00
Andy Janata 5915a3558d - reload hand after reloading page
- use transform animation in all browsers to reduce complexity :(
2012-01-23 23:02:59 -08:00
Andy Janata 1f9d4722be delete local game object after leaving game 2012-01-23 17:40:21 -08:00
Andy Janata c73ce88646 deal cards to players when the game starts 2012-01-23 15:06:20 -08:00
Andy Janata 44dcc45c48 update the scoreboard when a player leaves or joins the game 2012-01-23 13:37:11 -08:00
Andy Janata eec3ad81ca - make currentGames be a list instead of a single object, just in case I do multiple games later
- add event handlers for leave and start game buttons
- leave game button works
2012-01-23 13:20:15 -08:00
Andy Janata 8e3c1372dc - fix formatting in css file
- add some templates for game lobbies
- client properly joins a game and shows the lobby!
- reconnect to in-progress game when refreshing page
2012-01-22 23:58:36 -08:00
Andy Janata 577586139e - escape html in chat on client and server
- rework how the gamelist was shown
2012-01-20 14:55:08 -08:00
Andy Janata 79f2f59716 - add game list ajax call
- skeleton for game lobby list
- fix ajax handlers to use the constants instead of literals for the ops
2012-01-17 17:48:21 -08:00