コミットグラフ

26 コミット

作成者 SHA1 メッセージ 日付
n9k a1862b9080 one giant veiny commit 2022-08-02 04:59:00 +00:00
n9k 4a22ca8a92 Minor: `add_chat_message` returns seq (or None)
It now returns the seq of the just-added message if one was added, and
None otherwise.  The previous behaviour was to return True and False
respectively.
2022-08-02 04:52:11 +00:00
n9k c2094f1d89 Emotes: reorganize 2022-08-01 00:30:28 +00:00
n9k 85ccd7b96e Never gonna give broadcaster a clock captcha 2022-07-16 22:17:58 +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 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 6046598ed8 Fix deletion of old messages exceeding threshold 2022-06-22 08:34:16 +00:00
n9k e147aa0d22 Chat: always enforce length limits from config 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 5751297f10 Control socket: delete chat messages 2022-06-13 21:25:25 +00:00
n9k ae6c1ba5a9 Reject whitespace-only comments 2022-06-11 23:14:16 +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 829f3f004b Add licences 2022-03-08 16:41:47 +13:00
n9k 93409f8095 Message dates and times in chat
Now using `get_message_for_websocket` when sending an individual message.
2022-02-23 15:57:05 +13: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 7058677000 Setup background tasks, create t_sunset_users task 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 d848d1532e Reflect appearance changes with js 2022-02-18 18:17:01 +13:00
n9k 1e6563c4a2 Some more project structure 2022-02-18 14:32:34 +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 71586420b6 Project structure, chat markup/style, websockets 2022-02-13 17:00:10 +13:00