diff options
| author | olive <olive@olive.ooo> | 2026-09-17 20:29:09 +0100 |
|---|---|---|
| committer | olive <olive@olive.ooo> | 2026-09-17 20:29:09 +0100 |
| commit | 9157750d04dfb2863bc5822b908336e663b141b1 (patch) | |
| tree | 3ec8ac81aef2ea1e67db38d6c2b013ee8dddab33 /irc/pylon.lua | |
| parent | 87ed4adab569504e4ce053f8288a84404f63c8dc (diff) | |
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.
Diffstat (limited to 'irc/pylon.lua')
| -rw-r--r-- | irc/pylon.lua | 8 |
1 files changed, 5 insertions, 3 deletions
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 |
