summaryrefslogtreecommitdiff
path: root/nanochat
diff options
context:
space:
mode:
authorolive <olive@olive.ooo>2026-09-27 01:29:02 +0100
committerolive <olive@olive.ooo>2026-09-27 01:29:02 +0100
commit59d210c7139358f769441db8c5c0d92db17065f1 (patch)
treec9abd266f4285c641943c9f4436c3171fd3a0ad4 /nanochat
parente18625310d9e71a1297634e46ea60bde8a782d44 (diff)
Pylon Message IDsolive
Not stored. Not IRC.
Diffstat (limited to 'nanochat')
-rw-r--r--nanochat/pylon.lua7
1 files changed, 4 insertions, 3 deletions
diff --git a/nanochat/pylon.lua b/nanochat/pylon.lua
index 6fbd725..c92897d 100644
--- a/nanochat/pylon.lua
+++ b/nanochat/pylon.lua
@@ -44,9 +44,8 @@ function Nanochat:recving()
body=msg:sub(msgi,-1)
}
end
- else -- luacheck: ignore 542
- -- ignore messages without a channel, they stay nanochat-local
end
+ -- else ignore messages without a channel, they stay nanochat-local
end
local s = self.sock:read("*l")
self.lastid = tonumber(assert(s))
@@ -58,6 +57,7 @@ function Nanochat:recving()
self.usids[id] = nil
else
self.log:proto('<', msg.channel.id, msg.author, msg.body)
+ msg.pylon_ids = { [self]=id }
self.wilson:deliver(msg)
end
end
@@ -76,7 +76,8 @@ function Nanochat:sending()
..message.author:name_with_shortname()
..": "..message.body
.."\n"))
- local id = tonumber(assert(self.sock:read("*l")))
+ local id = assert(tonumber(self.sock:read("*l")))
+ message.pylon_ids[self] = id
self.usids[id] = true
end
end