コミットグラフ

33 コミット

作成者 SHA1 メッセージ 日付
n9k a6c31179b6 Repo changed domains: git.076.ne.jp -> gitler.moe 2023-02-23 22:36:20 +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 bce381376a Emotes: HTML-escape <img> `src` attribute 2022-07-24 11:02:10 +00:00
n9k 208ef9abc7 Emotes: one emote, one file 2022-07-20 07:37:33 +00:00
n9k 6d6991e4e4 Emotes: was checking wrong Markup type
This broke chat. Adding a chat message would never happen because of
AssertionError.
2022-07-16 06:24:31 +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 283c630b82 Optionally force captcha every n messages
By default every 40 messages. 0 means never force captcha in this way.
2022-07-03 08:50:35 +00:00
n9k 492078f6ce Record users' most recent HTTP headers 2022-06-29 04:30:27 +00:00
n9k 3bb2a81c5a Bypass initial chat captcha if solved access captcha 2022-06-23 02:53:41 +00:00
n9k 1d5b446291 Track the last time users were sent chat messages 2022-06-19 08:21:40 +00:00
n9k 88d3785ec6 Rename config section from 'thresholds' to 'presence' 2022-06-17 00:40:02 +00:00
n9k 1c7818cc0b Licence headers formatting 2022-06-16 01:31:10 +00:00
n9k 65d28a6937 Event socket
This commit adds a unix socket on which you can receive internal events
as they happen. Currently the only supported event is a chat message
being added. Intended for external applications that depend on chat
messages, e.g. text-to-speech or Twitch Plays Pokémon.
2022-06-15 03:53:34 +00:00
n9k 47ee5fe607 Take a range of contrasts for generating colours 2022-06-14 08:50:31 +00:00
n9k 7db8895750 Eyes: send Retry-After header during cooldown 2022-06-14 03:33:14 +00:00
n9k 84ad17f13d Eyes
This commit adds the concept of eyes. One "eyes" is one instance of a
response to GET /stream.mp4. Currently the number of eyes clients can
have is unbounded, but this is a DoS vector.
2022-06-14 02:40:18 +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 5153f5d112 Add config option for old tripcode algorithm 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 3016705783 Keep track of stream viewership (number of viewers) 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 4889449e1f Properly handle captcha signature exceptions
BadSignature is raised is the digest is empty, and SignatureExpired is a
descendant of BadSignature so it needs to be handled first.
2022-02-22 16:25:43 +13:00
n9k 41ee90870d Minor non-breaking changes to captcha
Added image/jpeg content-type header to /captcha.jpg. Made unsigned digests
urlsafe (as they were intended to be).
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 e9a4b511a3 Formalize/tidy user presence logic 2022-02-22 16:25:43 +13:00
n9k 6109de37ec Nojs chat: ETag, limit scrollback, timeout notice
Limiting scrollback is happening for the js chat too. Also reject long
comments.
2022-02-22 16:25:41 +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