summaryrefslogtreecommitdiff
path: root/nanochat/pylon.lua
diff options
context:
space:
mode:
authorrebecca <ubq323@ubq323.website>2026-09-24 16:42:28 +0100
committerrebecca <ubq323@ubq323.website>2026-09-24 18:20:25 +0100
commit3f54007ab621d2e6b652523259b1cb2d3d158e22 (patch)
tree101d01f242a14119a31f838be6a97a7d36847f5c /nanochat/pylon.lua
parentc6bf8876a0949214ce3fc151b2dbb957e40523a3 (diff)
create Thing class for general tuples of (pylon,descriptor)
Diffstat (limited to 'nanochat/pylon.lua')
-rw-r--r--nanochat/pylon.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/nanochat/pylon.lua b/nanochat/pylon.lua
index dfd8532..aa3aaa6 100644
--- a/nanochat/pylon.lua
+++ b/nanochat/pylon.lua
@@ -3,7 +3,7 @@ local socket = require 'cqueues.socket'
local class = require 'r.class'
local BasePylon = require 'pylon'
-local Channel = require 'channel'
+local Thing = require 'thing'
local Nanochat = class.extend(BasePylon)
@@ -30,9 +30,9 @@ function Nanochat:recving()
if chan then
local sender, body = msg:match("^([^:]+): (.+)$", msgi)
if sender then
- deliverables[i] = { source_channel=Channel(self, chan), sender=sender, body=body }
+ deliverables[i] = { source_channel=Thing(self, chan), sender=sender, body=body }
else
- deliverables[i] = { source_channel=Channel(self, chan), sender="", body=msg:sub(msgi,-1) }
+ deliverables[i] = { source_channel=Thing(self, chan), sender="", body=msg:sub(msgi,-1) }
end
else -- luacheck: ignore 542
-- ignore messages without a channel, they stay nanochat-local