diff options
Diffstat (limited to 'nanochat/pylon.lua')
| -rw-r--r-- | nanochat/pylon.lua | 7 |
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 |
