コミットグラフ

32 コミット

作成者 SHA1 メッセージ 日付
n9k a6c31179b6 Repo changed domains: git.076.ne.jp -> gitler.moe 2023-02-23 22:36:20 +00:00
n9k 68d6efff4e Chat: show dates in chat when time is ambiguous (nojs) 2022-08-10 00:08:28 +00:00
n9k c2094f1d89 Emotes: reorganize 2022-08-01 00:30:28 +00:00
n9k bab82df319 Emotes: allow automatic width/height 2022-07-24 11:09:27 +00:00
n9k 208ef9abc7 Emotes: one emote, one file 2022-07-20 07:37:33 +00:00
n9k ab0ba513bf Emotes: emotes must have non-empty names 2022-07-20 07:36:06 +00:00
n9k 81de4e4ccd Emotes: expand regex for [a-zA-Z0-9_]-ended emotes
Emote names with non-word characters at an end are now always matched.
Previously they were only matched when adjacent to non-word characters.
This means that an emote named "😂" will now be matched in
"aaa😂zzz" where previously it wouldn't have been.
2022-07-16 06:27:14 +00:00
n9k 6e8d8dc8e9 Emotes
The sheet of emotes goes in `/static/emotes.png`. Emote coordinates go
in emotes.json (by default, there is a config option).
2022-07-14 17:14:04 +00:00
n9k 5a647f2fb7 Allowedness (WIP) 2022-07-03 08:53:02 +00:00
n9k 2a16f6a835 Debug: print colorized tag/token_hash/token 2022-06-23 03:36:37 +00:00
n9k 1c7818cc0b Licence headers formatting 2022-06-16 01:31:10 +00:00
n9k 751664d1c4 More sensible variable names in colour generation 2022-06-14 08:50:31 +00:00
n9k 47ee5fe607 Take a range of contrasts for generating colours 2022-06-14 08:50:31 +00:00
n9k 31ce80b2bf Control socket: view and change users' attributes
Changing things without thinking about it is probably going to cause
weird undefined behaviour.
2022-06-14 02:40:20 +00:00
n9k 542d6c9ae5 Detect chat flooding by counting lines
Reject comments by line count. Ratelimit users by number of lines sent
in chat.
2022-06-11 23:14:16 +00:00
n9k 4b68023cf2 Add websocket ping/pong
Client and server both close the connection if they don't hear from the
other party after a timeout period. This is a failsafe and should
improve reliability.
2022-06-11 23:14:16 +00:00
n9k 829f3f004b Add licences 2022-03-08 16:41:47 +13:00
n9k 4bab173237 Add Content Security Policy meta tags 2022-03-08 16:13:22 +13:00
n9k 4cde4ea07a Add js appearance form (not complete c.f. nojs) 2022-03-08 16:13:22 +13:00
n9k bfa77b738d Tell websockets which users are watching
This adds a field 'watching' in `user_for_websocket` that's True iff WATCHING,
False iff NOTWATCHING, and None otherwise (since clients don't need to know if
a user is tentative or absent). When the value of this field changes for any
user, they get added to the update buffer (like with any other change).

Removed race condition in `t_sunset_users`: `broadcast_users_update` was being
called *after* a user was removed from memory (and for each user being removed,
which was redundant). In that scenario if there's a user in the update buffer
and `t_sunset_users` wins the race between it and `t_broadcast_users_update`,
then when `t_sunset_users` calls `broadcast_users_update` a KeyError would be
raised since the user's already been removed.

Fixed unintended behaviour of `t_sunset_users`: it was removing users based on
the result of `is_visible`, so users who were actually tenative (as opposed to
absent) were being removed.
2022-03-07 12:54:35 +13:00
n9k 8589216bf1 Send new captcha over websocket with js 2022-03-07 12:54:35 +13:00
n9k 672ef10159 Add 3-hexdigit tags for default-name users 2022-02-23 09:21:07 +00:00
n9k 2f4a9739c0 Show and enforce the captcha in js
Also clear the chat form comment input only if the message was accepted.
2022-02-22 16:25:43 +13:00
n9k 6ceb553b29 Buffer new and mutated users before sending to websockets
By default the buffer is exhausted every 4 seconds. This should defend against
a potential DoS against clients with JavaScript enabled. Before this, any
request with no token would generate a new user and immediately broadcast the
new user to all the websockets. It's best to lock down as much as possible the
number of places a client can cause the server to broadcasts to all the
websockets.
2022-02-22 16:25:43 +13:00
n9k b7313eec22 Captchas, require captcha initially, generalize notices to states 2022-02-22 16:25:43 +13:00
n9k 1e6563c4a2 Some more project structure 2022-02-18 14:32:34 +13:00
n9k 43e1a33088 Nojs appearance form, tripcodes, colours 2022-02-18 11:56:51 +13:00
n9k 7dbcd43f30 Logicaler project structure, see rest of commit message
Incoming requests are handled in anonstream/routes/. Route handlers
mainly depend on files in anonstream/, which in turn depend on files in
anonstream/helpers/ and anonstream/utils/. Utils are pure functions and
helpers are almost pure functions; they don't mutate state but they
do depend on the global app config.
2022-02-17 13:30:09 +13:00
n9k e77862f4ff Nojs chat, store all user names/colors in js, forget about inactive users
Project structure evolving a bit
2022-02-17 13:30:05 +13:00
n9k 694c6a4995 Nojs comment submission, notify for rejected comments
Fix with-user wrapper (wasn't collecting users)
2022-02-15 23:11:53 +13:00
n9k 885c10b5de Initial noscript markup for chat form & stream info
Use with-user decorator on routes (instead of with-token)
2022-02-14 23:16:09 +13:00
n9k 71586420b6 Project structure, chat markup/style, websockets 2022-02-13 17:00:10 +13:00