From 59d210c7139358f769441db8c5c0d92db17065f1 Mon Sep 17 00:00:00 2001 From: olive Date: Sun, 27 Sep 2026 01:29:02 +0100 Subject: Pylon Message IDs Not stored. Not IRC. --- nanochat/pylon.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'nanochat/pylon.lua') 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 -- cgit v1.2.3