aboutsummaryrefslogtreecommitdiff
path: root/azalea/src/swarm/chat.rs
diff options
context:
space:
mode:
authormat <27899617+mat-1@users.noreply.github.com>2026-01-13 10:51:30 -0600
committerGitHub <noreply@github.com>2026-01-13 10:51:30 -0600
commitd5fa5e32b37754b3b5c136e58821e48cd3b7c2ff (patch)
treeea04702f96ad170fb1d90e5ed2dc875ae8166495 /azalea/src/swarm/chat.rs
parentefb36d5fc0fe56a98f5795c53dfa109887cd5aae (diff)
downloadazalea-drasl-d5fa5e32b37754b3b5c136e58821e48cd3b7c2ff.tar.xz
Rename Instance to World (#304)
Diffstat (limited to 'azalea/src/swarm/chat.rs')
-rw-r--r--azalea/src/swarm/chat.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/azalea/src/swarm/chat.rs b/azalea/src/swarm/chat.rs
index 0bad69c1..c5e3eba3 100644
--- a/azalea/src/swarm/chat.rs
+++ b/azalea/src/swarm/chat.rs
@@ -2,12 +2,12 @@
// How the chat event works (to avoid firing the event multiple times):
// ---
-// There's a shared queue of all the chat messages
-// Each bot contains an index of the farthest message we've seen
-// When a bot receives a chat messages, it looks into the queue to find the
-// earliest instance of the message content that's after the bot's chat index.
-// If it finds it, then its personal index is simply updated. Otherwise, fire
-// the event and add to the queue.
+// There's a shared queue of all the chat messages. Each bot contains an index
+// of the farthest message that it has seen. When a bot receives a chat
+// message, it looks into the shared queue to find the earliest instance of the
+// message content, that's after the bot's current chat index. If it finds it,
+// then its personal index is simply updated. Otherwise, it fires the event and
+// adds to the shared queue.
//
// To make sure the queue doesn't grow too large, we keep a `chat_min_index`
// in Swarm that's set to the smallest index of all the bots, and we remove all