From 9157750d04dfb2863bc5822b908336e663b141b1 Mon Sep 17 00:00:00 2001 From: olive Date: Thu, 17 Sep 2026 20:29:09 +0100 Subject: Use shortname config rather than hard-coding [x] and so on. Pylons may also make their own choce in how they format the short-name when sending out (or do it differently altogether), rather than it being baked-in by the receiving pylon. --- irc/pylon.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'irc/pylon.lua') diff --git a/irc/pylon.lua b/irc/pylon.lua index db88c6c..11c8250 100644 --- a/irc/pylon.lua +++ b/irc/pylon.lua @@ -34,9 +34,10 @@ function Irc.recving(self) local channel_name = msg.args[1] local body = msg.args[2] local sender = msg.source - self.wilson:deliver(Channel(self, channel_name), { + self.wilson:deliver({ + source_channel = Channel(self, channel_name), body = body, - sender = sender..'[i]' + sender = sender, }) elseif msg.op == 'ERROR' then error(msg.args[1]) @@ -64,8 +65,9 @@ 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 channel_name = dest_channel.descriptor - say(message.sender, channel_name, message.body) + say(nick, channel_name, message.body) end end -- cgit v1.2.3