From 71cee0014368f5d83fe94989526a4ffb2824f50c Mon Sep 17 00:00:00 2001 From: rebecca Date: Thu, 24 Sep 2026 17:20:42 +0100 Subject: change fields on Message to include author --- irc/pylon.lua | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'irc/pylon.lua') diff --git a/irc/pylon.lua b/irc/pylon.lua index 039ec38..1be3ab2 100644 --- a/irc/pylon.lua +++ b/irc/pylon.lua @@ -34,10 +34,11 @@ function Irc.recving(self) local channel_name = msg.args[1] local body = msg.args[2] local sender = msg.source - self.wilson:deliver({ - source_channel = Thing(self, channel_name), + self.wilson:deliver(Message { + pylon = self, + channel = Thing(self, channel_name), + author = Thing(self, sender), body = body, - sender = sender, }) elseif msg.op == 'ERROR' then error(msg.args[1]) @@ -65,7 +66,7 @@ function Irc.sending(self) say('WILSON', '#test', 'i am wilson') for dest_channel, message in self.inbox:iter() do - local nick = message.sender.."["..message.source_channel.pylon.shortname.."]" + local nick = message.author:name_with_shortname() local channel_name = dest_channel.id say(nick, channel_name, message.body) end -- cgit v1.2.3